3.6 DropDown Button in flutter - DropdownFormField Flutter 2023
Вставка
- Опубліковано 26 чер 2022
- In this flutter tutorial, we are going to learn how to create a dropdown button in flutter.
PLAYLIST: • Flutter Crash Course f...
We will create two types of dropdown button in flutter. Simple Dropdown flutter widget and 2nd dropdownformfield flutter material design widget 2022. We will use decoration in flutter dropdownformfield decoration property to set border and add material design to our dropdown button.
SOURCE CODE
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
🧑💻 CODE & RESOURCES codingwitht.com/flutter-crash...
❤️ COURSES
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
► FLUTTER CRASH COURSE • Flutter Crash Course f...
► LOGIN APP with GETX • Flutter Login App - UI...
► E-COMMERCE APP • Professional Flutter E...
❤️ SUPPORT
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Like and Subscribe @CODINGwithT for more amazing content
► Subscribe ua-cam.com/users/Codingwithtea...
FOLLOW @CodingwithT on SOCIAL MEDIA!
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
💻 Facebook: / codingwithtea
💻 Instagram: / coding_with_tea
#flutter_crash_course_2023 #coding_with_T #flutter_course_2023 - Наука та технологія
I literally watched different flutter tutorials and even enrolled on some courses, but your tutorial is the best I've watched. Thank you very much 💖
So nice of you 😊. I'm very glad that my content is helpful 🤠 🎉.
Stay tuned for more. ✌️
My man, THANK YOU VERY MUCH for this! You just helped me a lot!
You welcome dear 😃
yes, useful. I remember once doing a drop down list half a year ago, I couldn’t form normally, it turns out dropdownbuttonformFild had to be used
Thanks 👍
Great Tutorial !! Thanks
You welcome
Simply the best
Thank you
@@CodingwithT you're welcome
Thanks brother❤️
this playlist is very informative. when will you teach us backend i'm waiting for that.
You welcome 😁 🤠. I'm about to start an e-commerce app from scratch with a frontend backend DB
informative
😃👍
How do I make the dropdown stay open until a user selects an item, instead of dismissing when they touch outside of it?
great
Thank you 😊
Very nice tutorial sir
Thank you so much dear! ✌️😃
May you please share your git URL for this project?
Hi, Really love your tutorials, however I am having issues trying to refactor the dropdownbuttonformfield, so if you could kindly assist or anyone assist. Thanks
Thanks 😊.
How can I help you?
How to give different background color to dropdownmenuitem? Like I want to give blue color to odd dropdownmenuitem and red color to even dropdownmenuitem.
Hi Freiza Gen, have you solved your problem? 🤠
Simply wrap the dropdown button with a Container and give it a background color.
Cheers 🥂
MashaAllah
Thank you 😌
I'm having trouble getting past 4:26, where the value is added to the DropdownButton(). Everything is working fine and looking like your example up until that point, but once I create the constructor and add 'value: _selectedVal', after hot reloading I get a massive red error screen in my emulator with the following message,
"The following assertion was thrown building MyForm(dirty, state: _MyFormState#36db4):
There should be exactly one item with [DropdownButton]'s value: .
Either zero or 2 or more [DropdownMenuItem]s were detected with the same value
'package:flutter/src/material/dropdown.dart':
dropdown.dart:1
Failed assertion: line 888 pos 15: 'items == null || items.isEmpty || value == null ||
items.where((DropdownMenuItem item) {
return item.value == value;
}).length == 1"
I tried to delete all the code that I wrote and rewatch the video 3 times and I still am getting that error no matter what. Thanks for all these tutorials, they're very helpful and everything has been smooth sailing up until this point. Any help would be greatly appreciated.
EDIT: I walked away from my computer out of frustration, came back and reloaded the code for the hundredth time and it randomly is working perfect and the red error screen is gone. I changed nothing, so I have no idea what was going on lol. Thanks again.
how do you make dropdown button in flutter with string and int value at the same time?
Simply create a list of any type of values
Thank you, but can you show me an example? I'm new in flutter
sir is there any reference if i use data from firebase?
I have started a new playlist which you can get from my channel.
In that I'll explain complete CRUD
Form validation not working on this dropdownformfield
What is the error dear?
when I input setState() it turns into an error how do i Fix this?
What is the error?
وعليكم السلام ورحمة الله وبركاته.
جزاك الله خيرا.
Big thanks from Agleria.
please sir i follow your tutorial ,
but i have a probleme to see my selected item.
here it is my code:
import 'package:flutter/material.dart';
class Test extends StatefulWidget {
@override
State createState() => _TestState();
}
class _TestState extends State {
@override
Widget build(BuildContext context) {
String selectedFruits = 'BN';
return Scaffold(
appBar: AppBar(),
body: Center(
child: DropdownButton(
items: ["BN", "OR", "MD", "PO"]
.map((e) => DropdownMenuItem(
value: e,
child: Text("$e"),
))
.toList(),
onChanged: (val) {
print('$val');
setState(() {
selectedFruits = val as String;
});
},
value: selectedFruits,
),
),
);
}
}
Thank you so much 🥰, and sorry for the delay. You are still facing the issues?
@@CodingwithT No,
الحمد لله.
بارك الله فيك.
Alhamdolillah
Iits sad to see so small number of likes
Nevermind I hope people like you will come ✌️😃
please how can i get access to the source code
I will share that with you all