flutter/packages
Taha Tesser d2c8552944
Fix disabled DropdownMenu doesn't defer the mouse cursor (#145686)
fixes [DropdownMenu cursor in disabled state](https://github.com/flutter/flutter/issues/144611)

This was added in https://github.com/flutter/flutter/pull/121353

### 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) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: Scaffold(
        body: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: <Widget>[
              const Spacer(),
              const Text('enabled: true,\nrequestFocusOnTap: true,'),
              const SizedBox(height: 16),
              DropdownMenu<String>(
                enabled: true,
                initialSelection: 'First',
                requestFocusOnTap: true,
                width: 200,
                dropdownMenuEntries: ['First', 'Second', 'Third']
                    .map((e) => DropdownMenuEntry(value: e, label: e))
                    .toList(),
              ),
              const Text('Expected: text cursor'),
              const Spacer(),
              const Text('enabled: true,\nrequestFocusOnTap: false,'),
              const SizedBox(height: 16),
              DropdownMenu<String>(
                enabled: true,
                initialSelection: 'First',
                requestFocusOnTap: false,
                width: 200,
                dropdownMenuEntries: ['First', 'Second', 'Third']
                    .map((e) => DropdownMenuEntry(value: e, label: e))
                    .toList(),
                // label: const Text('requestFocusOnTap: false'),
              ),
              const Text('Expected: clickable cursor'),
              const Spacer(),
              const Text('enabled: false,\nrequestFocusOnTap: true,'),
              const SizedBox(height: 16),
              DropdownMenu<String>(
                enabled: false,
                initialSelection: 'First',
                requestFocusOnTap: true,
                width: 200,
                dropdownMenuEntries: ['First', 'Second', 'Third']
                    .map((e) => DropdownMenuEntry(value: e, label: e))
                    .toList(),
              ),
              const Text('Expected: deferred cursor'),
              const Spacer(),
              const Text('enabled: false,\nrequestFocusOnTap: false,'),
              const SizedBox(height: 16),
              DropdownMenu<String>(
                enabled: false,
                initialSelection: 'First',
                requestFocusOnTap: false,
                width: 200,
                dropdownMenuEntries: ['First', 'Second', 'Third']
                    .map((e) => DropdownMenuEntry(value: e, label: e))
                    .toList(),
              ),
              const Text('Expected: deferred cursor'),
              const Spacer(),
            ],
          ),
        ),
      ),
    );
  }
}
```

</details>

### Preview
![Screenshot 2024-03-25 at 14 52 31](https://github.com/flutter/flutter/assets/48603081/cf4361a5-d3bb-4635-9825-5eefa4efe6cc)
2024-03-26 20:15:48 +00:00
..
flutter Fix disabled DropdownMenu doesn't defer the mouse cursor (#145686) 2024-03-26 20:15:48 +00:00
flutter_driver flutter test --wasm support (#145347) 2024-03-21 20:08:07 +00:00
flutter_goldens Fix skipping golden comparator for CI environments (#145619) 2024-03-22 20:45:35 +00:00
flutter_localizations Roll pub packages (#145476) 2024-03-21 00:09:24 +00:00
flutter_test flutter test --wasm support (#145347) 2024-03-21 20:08:07 +00:00
flutter_tools Be tolerant of backticks around directory name in pub output. (#145768) 2024-03-26 19:04:52 +00:00
flutter_web_plugins Roll pub packages (#145476) 2024-03-21 00:09:24 +00:00
fuchsia_remote_debug_protocol Roll pub packages (#145476) 2024-03-21 00:09:24 +00:00
integration_test flutter test --wasm support (#145347) 2024-03-21 20:08:07 +00:00
analysis_options.yaml