Taha Tesser e6d43ac6d4
Fix Chips with Tooltip throw an assertion when enabling or disabling (#138799)
fixes [Enabling or disabling a `Chip`/`RawChip` with a tooltip throws an exception](https://github.com/flutter/flutter/issues/138287) 

### Code sample

<details>
<summary>expand to view the code sample</summary> 

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    bool isEnabled = true;

    return MaterialApp(
      home: Material(
        child: Center(
          child: StatefulBuilder(
              builder: (BuildContext context, StateSetter setState) {
            return Column(
              mainAxisSize: MainAxisSize.min,
              children: [
                RawChip(
                  tooltip: 'This is a tooltip',
                  isEnabled: isEnabled,
                  label: const Text('RawChip'),
                  onPressed: isEnabled ? () {} : null,
                ),
                const SizedBox(height: 20),
                ElevatedButton(
                  onPressed: () {
                    setState(() {
                      isEnabled = !isEnabled;
                    });
                  },
                  child: Text('${isEnabled ? 'Disable' : 'Enable'} Chip'),
                )
              ],
            );
          }),
        ),
      ),
    );
  }
}
```

</details>
2023-11-21 17:00:06 +00:00
..
2023-11-15 15:03:21 -08:00

Flutter

Flutter is a new way to build high-performance, cross-platform mobile, web, and desktop apps. Flutter is optimized for today's — and tomorrow's — mobile and desktop devices. We are focused on low-latency input and high frame rates on all platforms.

See the getting started guide for information about using Flutter.