Add DropdownMenu cursor behavior sample (#146133)

fixes [Add `DropdownMenu` cursor behavior sample to  `DropdownMenu.enabled` & `DropdownMenu.requestFocusOnTap`  docs](https://github.com/flutter/flutter/issues/146131)

### Preview
![Screenshot 2024-04-02 at 17 12 43](https://github.com/flutter/flutter/assets/48603081/33865ca0-d48d-4651-9c83-9bdcd6369cb8)
This commit is contained in:
Taha Tesser
2024-04-03 19:31:06 +03:00
committed by GitHub
parent e868e2b383
commit 80d774d8dc
3 changed files with 226 additions and 0 deletions

View File

@@ -170,6 +170,13 @@ class DropdownMenu<T> extends StatefulWidget {
/// Determine if the [DropdownMenu] is enabled.
///
/// Defaults to true.
///
/// {@tool dartpad}
/// This sample demonstrates how the [enabled] and [requestFocusOnTap] properties
/// affect the textfield's hover cursor.
///
/// ** See code in examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart **
/// {@end-tool}
final bool enabled;
/// Determine the width of the [DropdownMenu].
@@ -338,6 +345,13 @@ class DropdownMenu<T> extends StatefulWidget {
/// focus when activated.
///
/// Set this to true or false explicitly to override the default behavior.
///
/// {@tool dartpad}
/// This sample demonstrates how the [enabled] and [requestFocusOnTap] properties
/// affect the textfield's hover cursor.
///
/// ** See code in examples/api/lib/material/dropdown_menu/dropdown_menu.2.dart **
/// {@end-tool}
final bool? requestFocusOnTap;
/// Descriptions of the menu items in the [DropdownMenu].