business profile form design continue
This commit is contained in:
parent
e9176cf63d
commit
a749d36967
@ -10,9 +10,28 @@ class addbusinessdetails extends StatefulWidget {
|
||||
class _addbusinessdetailsState extends State<addbusinessdetails> {
|
||||
final List<String> items = <String>['All Days', 'Specific days & timing'];
|
||||
String selectedItem = 'All Days';
|
||||
bool isVisibile = true;
|
||||
List<DropdownMenuItem<String>> listDrop = [];
|
||||
String? selected = null;
|
||||
void loadData() {
|
||||
listDrop = [];
|
||||
listDrop.add(new DropdownMenuItem(
|
||||
child: new Text('Item No.1'),
|
||||
value: 'val-1',
|
||||
));
|
||||
listDrop.add(new DropdownMenuItem(
|
||||
child: new Text('Item No.2'),
|
||||
value: 'val-2',
|
||||
));
|
||||
listDrop.add(new DropdownMenuItem(
|
||||
child: new Text('Item No.3'),
|
||||
value: 'val-3',
|
||||
));
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
loadData();
|
||||
return Scaffold(
|
||||
body: SafeArea(
|
||||
child: Column(
|
||||
@ -53,7 +72,7 @@ class _addbusinessdetailsState extends State<addbusinessdetails> {
|
||||
fontFamily: "Manrope",
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
fontSize: 14,
|
||||
fontSize: 15,
|
||||
color: Color(0xFF333333)),
|
||||
),
|
||||
SizedBox(
|
||||
@ -74,42 +93,72 @@ class _addbusinessdetailsState extends State<addbusinessdetails> {
|
||||
fontFamily: "Manrope",
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
fontSize: 14,
|
||||
fontSize: 15,
|
||||
color: Color(0xFF333333),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: DropdownButtonHideUnderline(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: DropdownButton(
|
||||
icon: Icon(Icons.keyboard_arrow_down_rounded),
|
||||
iconSize: 30,
|
||||
value: selectedItem,
|
||||
onChanged: (String? string) =>
|
||||
setState(() => selectedItem = string!),
|
||||
selectedItemBuilder: (BuildContext context) {
|
||||
return items.map<Widget>((String item) {
|
||||
return Text(item);
|
||||
}).toList();
|
||||
},
|
||||
items: items.map((String item) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: item,
|
||||
child: Text('$item'),
|
||||
);
|
||||
}).toList(),
|
||||
child: InputDecorator(
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.only(
|
||||
left: 10, top: 1, bottom: 1, right: 5),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(5),
|
||||
bottomLeft: Radius.circular(5),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: DropdownButtonHideUnderline(
|
||||
child: new DropdownButton(
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
value: selected,
|
||||
items: listDrop,
|
||||
icon: Icon(Icons.keyboard_arrow_down, size: 24),
|
||||
hint: new Text('Choose...'),
|
||||
onChanged: (value) {
|
||||
selected = value as String?;
|
||||
setState(() => isVisibile = !isVisibile);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Visibility(
|
||||
visible: isVisibile,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
"From",
|
||||
style: TextStyle(
|
||||
fontFamily: "Manrope",
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 120,
|
||||
),
|
||||
Text(
|
||||
"To",
|
||||
style: TextStyle(
|
||||
fontFamily: "Manrope",
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
40
openclosenew/lib/pages/page_1.dart
Normal file
40
openclosenew/lib/pages/page_1.dart
Normal file
@ -0,0 +1,40 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class page1 extends StatelessWidget {
|
||||
const page1({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: Container(
|
||||
height: 400,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
"From",
|
||||
style: TextStyle(
|
||||
fontFamily: "Manrope",
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 120,
|
||||
),
|
||||
Text(
|
||||
"To",
|
||||
style: TextStyle(
|
||||
fontFamily: "Manrope",
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user