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> {
|
class _addbusinessdetailsState extends State<addbusinessdetails> {
|
||||||
final List<String> items = <String>['All Days', 'Specific days & timing'];
|
final List<String> items = <String>['All Days', 'Specific days & timing'];
|
||||||
String selectedItem = 'All Days';
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
loadData();
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Column(
|
child: Column(
|
||||||
@ -53,7 +72,7 @@ class _addbusinessdetailsState extends State<addbusinessdetails> {
|
|||||||
fontFamily: "Manrope",
|
fontFamily: "Manrope",
|
||||||
fontStyle: FontStyle.normal,
|
fontStyle: FontStyle.normal,
|
||||||
fontWeight: FontWeight.w300,
|
fontWeight: FontWeight.w300,
|
||||||
fontSize: 14,
|
fontSize: 15,
|
||||||
color: Color(0xFF333333)),
|
color: Color(0xFF333333)),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -74,42 +93,72 @@ class _addbusinessdetailsState extends State<addbusinessdetails> {
|
|||||||
fontFamily: "Manrope",
|
fontFamily: "Manrope",
|
||||||
fontStyle: FontStyle.normal,
|
fontStyle: FontStyle.normal,
|
||||||
fontWeight: FontWeight.w300,
|
fontWeight: FontWeight.w300,
|
||||||
fontSize: 14,
|
fontSize: 15,
|
||||||
color: Color(0xFF333333),
|
color: Color(0xFF333333),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 15,
|
||||||
|
),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: InputDecorator(
|
||||||
padding: EdgeInsets.all(10),
|
decoration: InputDecoration(
|
||||||
child: DropdownButtonHideUnderline(
|
contentPadding: EdgeInsets.only(
|
||||||
child: Padding(
|
left: 10, top: 1, bottom: 1, right: 5),
|
||||||
padding: const EdgeInsets.all(8.0),
|
border: OutlineInputBorder(
|
||||||
child: DropdownButton(
|
borderRadius: BorderRadius.only(
|
||||||
icon: Icon(Icons.keyboard_arrow_down_rounded),
|
topLeft: Radius.circular(5),
|
||||||
iconSize: 30,
|
bottomLeft: Radius.circular(5),
|
||||||
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: 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