Bruno Leroux
21381d843f
Fix DropdownMenu does not rematch initialSelection when entries have changed ( #155757 )
...
## Description
This PR makes DropdownMenu rematching the initialSelection when the entries are updated.
If the new entries contains one entry whose value matches `initialSelection` this entry's label is used to initialize the inner text field, if no entries matches `initialSelection` the text field is emptied.
## Related Issue
Fixes [DropdownMenu.didUpdateWidget should re-match initialSelection when dropdownMenuEntries have changed](https://github.com/flutter/flutter/issues/155660 ).
## Tests
Adds 3 tests.
2024-10-02 12:03:20 +00:00
Taha Tesser
80d774d8dc
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

2024-04-03 16:31:06 +00:00
huycozy
c2b1e483dd
Improve DropdownMenu sample code for requestFocusOnTap on mobile platforms ( #134867 )
...
### Description
This PR is to improve `DropdownMenu` sample code. By default, `requestFocusOnTap` is false on mobile platforms. When users run API sample code on mobile platforms, they can not edit the text field and think it is a bug. Although it is detailed at https://api.flutter.dev/flutter/material/DropdownMenu/requestFocusOnTap.html , users often do not pay attention to it.
### Related issue
Fixes https://github.com/flutter/flutter/issues/127672
2023-09-18 08:33:14 +00:00
Hans Muller
336d60d29c
Updated DropdownMenu example and added a test ( #133592 )
2023-08-30 14:33:54 -07:00
Hans Muller
4022864c65
Added DropdownMenuEntry.labelWidget ( #133491 )
2023-08-29 13:01:49 -07:00
Leigha Jarett
6848110ff3
Update menu API docs to help developers migrate to m3 ( #128351 )
...
Fixes: https://github.com/flutter/flutter/issues/127215
2023-06-07 13:21:12 +00:00
Greg Spencer
e3bc8efd39
Rename Sample classes ( #124080 )
...
Rename Sample classes
2023-04-04 20:34:29 +00:00
Qun Cheng
ad1a44d0a7
Add requestFocusOnTap
to DropdownMenu
( #117504 )
...
* Add canRequestFocus to TextField and requestFocusOnTap to DropdownMenu
* Address comments
* Address comments
---------
Co-authored-by: Qun Cheng <quncheng@google.com>
2023-01-27 18:47:57 +00:00
Michael Goderbauer
b308555ed1
Enable dangling_library_doc_comments
and library_annotations
lints ( #117365 )
2022-12-20 16:03:21 -08:00
Qun Cheng
6bb412e35e
Added controller
and onSelected
properties to DropdownMenu ( #116259 )
2022-11-30 16:58:21 -08:00
Qun Cheng
8b86d238b4
Create DropdownMenu
Widget to Support Material 3 ( #116088 )
...
* Created ComboBox
* Fixed failing tests
* Reverted the menu style tests change
* Addressed comments
* Updated documentation and rename foregroundColor variable
* Remamed ComboBox to DropdownMenu
* Removed a unused import
* Removed unused import
Co-authored-by: Qun Cheng <quncheng@google.com>
2022-11-29 22:36:35 +00:00