add business screen

dropdown button create
This commit is contained in:
vignesh 2022-05-11 12:40:14 +05:30
parent af4800054a
commit 83edbd27c4
2 changed files with 33 additions and 30 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -1,20 +1,16 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
class addbusiness extends StatelessWidget {
// Initial Selected Value
String dropdownvalue = 'Item 1';
// List of items in our dropdown menu
var items = [
'Item 1',
'Item 2',
'Item 3',
'Item 4',
'Item 5',
];
class addbusiness extends StatefulWidget {
addbusiness({Key? key}) : super(key: key);
@override
State<addbusiness> createState() => _addbusinessState();
}
class _addbusinessState extends State<addbusiness> {
late String valuChoose;
List ListItem = ["item 1", "item 2", "item 3", "item 4", "item 5"];
@override
Widget build(BuildContext context) {
return Scaffold(
@ -48,7 +44,6 @@ class addbusiness extends StatelessWidget {
],
),
),
Spacer(),
Container(
child: Column(
children: [
@ -72,10 +67,9 @@ class addbusiness extends StatelessWidget {
shape: BoxShape.circle,
color: Colors.black,
),
margin: EdgeInsets.all(24),
padding: EdgeInsets.all(45),
margin: EdgeInsets.all(15),
padding: EdgeInsets.all(30),
),
Spacer(),
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@ -155,14 +149,15 @@ class addbusiness extends StatelessWidget {
),
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
width: 24,
width: 28,
),
Text('Industry'),
SizedBox(
width: 100,
width: 120,
),
Text('Category'),
],
@ -170,19 +165,27 @@ class addbusiness extends StatelessWidget {
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Spacer(),
SizedBox(
width: 28,
),
DropdownButton(
value: dropdownvalue,
icon: const Icon(Icons.keyboard_arrow_down),
items: items.map(
(String items) {
return DropdownMenuItem(
value: items,
child: Text(items),
);
},
).toList(),
onChanged: (String? newValue) {},
hint: Text(
'Food',
style: TextStyle(color: Color(0xff3D3D3D)),
),
iconSize: 14,
icon: Icon(Icons.keyboard_arrow_down, size: 24),
items: [
DropdownMenuItem<String>(
value: "1",
child: Center(
child: Text("one"),
),
)
],
onChanged: (_value) => {
print(_value.toString()),
},
),
Spacer(),
DropdownButton(