A small Flutter demo showing how to add a dropdown list using Material 3's dropdown widgets.
- Tutorial video: https://bit.ly/3PcnV1E
- Channel: https://bit.ly/41Ryons
This repository demonstrates how to implement dropdowns in Flutter using Material 3's DropdownMenu widget
DropdownMenu— https://api.flutter.dev/flutter/material/DropdownMenu-class.htmlDropdownButton— https://api.flutter.dev/flutter/material/DropdownButton-class.html
- Install Flutter: https://docs.flutter.dev/get-started/install
- From the project root run:
flutter pub get
flutter run- The demo targets Material 3. To enable Material 3, set
useMaterial3: truein your app theme:
MaterialApp(
theme: ThemeData(useMaterial3: true),
home: const MyHomePage(),
);