Posts

Showing posts with the label Flutter Dropdown Option | Spinner Example

Flutter Dropdown Option | Spinner Example

Hi, In this Flutter tutorial I am going to explain how to make a dropdown options menu in flutter using spinner widget,  Spinner allows you to select an item from a drop-down  menu ,  so let's understand complete dropdown option menu example. import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( appBar: AppBar(title: Text('Spinner Drop Down List in Flutter')), body: DropDown(), ), ); } } class DropDown extends StatefulWidget { @override DropDownWidget createState() => DropDownWidget(); } class DropDownWidget extends State { String dropdownValue = 'Two'; List <String> spinnerItems = ['One','Two','Three','Four','Five']; @override Widget build(BuildContext context) { return Scaffold( body: Cen