Answers for "flutter dropdown button style flutter"

0

dropdown decoration flutter

DropdownButtonFormField(
              decoration: InputDecoration(
                  border: OutlineInputBorder(
                    borderRadius: const BorderRadius.all(
                      const Radius.circular(30.0),
                    ),
                  ),
                  filled: true,
                  hintStyle: TextStyle(color: Colors.grey[800]),
                  hintText: "Name",
                  fillColor: Colors.blue[200]
                ),
                items: <your items>,
                value: <your value>
)
Posted by: Guest on August-17-2021
5

flutter dropdownbutton

String dropdownValue = 'One';
DropdownButton<String>(
            value: dropdownValue,
            onChanged: (String? newValue) {
              setState(() {
                dropdownValue = newValue!;
              });
            },
            items: <String>['One', 'Two', 'Free', 'Four']
                .map<DropdownMenuItem<String>>((String value) {
              return DropdownMenuItem<String>(
                value: value,
                child: Text(value),
              );
            }).toList(),
          ),
Posted by: Guest on September-11-2021

Code answers related to "Dart"

Browse Popular Code Answers by Language