![]() ![]() Target of URI doesnât exist âpackage:flutter/material.Exception in thread âmainâ in flutter.And please comment below on which solution worked for you. Please Comment Below if You stucks anywhere with my code. I hope this tutorial helps you to Solve your error. Return DropdownMenuItem(value: items, child: Text(items)) Style: TextStyle(color: Colors.white, fontSize: 16), Margin: EdgeInsets.symmetric(horizontal: 20), We have created a custom class Item with name and icon param thatll keep info of one item of dropdown. As we have set our theme and change debug banner property of Application. After that open main.dart file and edit it. Padding: EdgeInsets.symmetric(horizontal: 20), Create a new project from File New Flutter Project with your development IDE. MainAxisAlignment: MainAxisAlignment.center, Title: new Text('DropDownList - FlutterCorner'), ![]() Then, I have used a map function that simply iterates to a list of items (items â Array list), so the map function in the first iteration will set item to the drop-down, then in the second iteration, the second item will be set and so on up to the end of the array string.Ĭomplete source code of Drop Down Button import 'dart:async' Ĭlass MyApp extends StatefulWidget createState() => new _State()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |