add business screen
dropdown button create
This commit is contained in:
parent
af4800054a
commit
83edbd27c4
Binary file not shown.
Before Width: | Height: | Size: 7.4 KiB |
@ -1,20 +1,16 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
|
||||||
class addbusiness extends StatelessWidget {
|
class addbusiness extends StatefulWidget {
|
||||||
// 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',
|
|
||||||
];
|
|
||||||
addbusiness({Key? key}) : super(key: key);
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@ -48,7 +44,6 @@ class addbusiness extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Spacer(),
|
|
||||||
Container(
|
Container(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -72,10 +67,9 @@ class addbusiness extends StatelessWidget {
|
|||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.all(24),
|
margin: EdgeInsets.all(15),
|
||||||
padding: EdgeInsets.all(45),
|
padding: EdgeInsets.all(30),
|
||||||
),
|
),
|
||||||
Spacer(),
|
|
||||||
Container(
|
Container(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@ -155,14 +149,15 @@ class addbusiness extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 24,
|
width: 28,
|
||||||
),
|
),
|
||||||
Text('Industry'),
|
Text('Industry'),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 100,
|
width: 120,
|
||||||
),
|
),
|
||||||
Text('Category'),
|
Text('Category'),
|
||||||
],
|
],
|
||||||
@ -170,19 +165,27 @@ class addbusiness extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Spacer(),
|
SizedBox(
|
||||||
|
width: 28,
|
||||||
|
),
|
||||||
DropdownButton(
|
DropdownButton(
|
||||||
value: dropdownvalue,
|
hint: Text(
|
||||||
icon: const Icon(Icons.keyboard_arrow_down),
|
'Food',
|
||||||
items: items.map(
|
style: TextStyle(color: Color(0xff3D3D3D)),
|
||||||
(String items) {
|
),
|
||||||
return DropdownMenuItem(
|
iconSize: 14,
|
||||||
value: items,
|
icon: Icon(Icons.keyboard_arrow_down, size: 24),
|
||||||
child: Text(items),
|
items: [
|
||||||
);
|
DropdownMenuItem<String>(
|
||||||
},
|
value: "1",
|
||||||
).toList(),
|
child: Center(
|
||||||
onChanged: (String? newValue) {},
|
child: Text("one"),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
onChanged: (_value) => {
|
||||||
|
print(_value.toString()),
|
||||||
|
},
|
||||||
),
|
),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
DropdownButton(
|
DropdownButton(
|
||||||
|
Loading…
Reference in New Issue
Block a user