diff --git a/docs/components/dartpad/menus/exposed_dropdown/main.dart b/docs/components/dartpad/menus/exposed_dropdown/main.dart index 50115a7..1e584d1 100644 --- a/docs/components/dartpad/menus/exposed_dropdown/main.dart +++ b/docs/components/dartpad/menus/exposed_dropdown/main.dart @@ -20,18 +20,18 @@ class ExposedDropdownMenuDemo extends StatefulWidget { } class _ExposedDropdownMenuDemoState extends State { - String dropdownValue = 'Option 1'; + String dropdownValue = 'Option 2'; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - title: Text('Exposed Menu Demo'), + title: const Text('Exposed Menu Demo'), ), body: Center( - child: DropdownButton( + child: DropdownButton( value: dropdownValue, - items: [ + items: const >[ DropdownMenuItem( value: 'Option 1', child: Text('Option 1'), @@ -59,7 +59,7 @@ class _ExposedDropdownMenuDemoState extends State { ], onChanged: (value) { setState(() { - dropdownValue = value; + dropdownValue = value as String; }); }, ), @@ -67,3 +67,5 @@ class _ExposedDropdownMenuDemoState extends State { ); } } + +