2022-05-09 06:54:36 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2022-05-12 17:39:43 +00:00
|
|
|
import 'package:openclosenew/businessaddedsuccess.dart';
|
2022-05-09 06:54:36 +00:00
|
|
|
|
2022-06-01 16:36:23 +00:00
|
|
|
import 'FontFamily.dart';
|
2022-05-31 13:48:18 +00:00
|
|
|
import 'colors.dart';
|
2022-06-01 16:36:23 +00:00
|
|
|
import 'fontsize.dart';
|
2022-05-31 13:48:18 +00:00
|
|
|
|
2022-05-11 07:10:14 +00:00
|
|
|
class addbusiness extends StatefulWidget {
|
2022-05-10 06:55:08 +00:00
|
|
|
addbusiness({Key? key}) : super(key: key);
|
2022-05-09 06:54:36 +00:00
|
|
|
|
2022-05-11 07:10:14 +00:00
|
|
|
@override
|
|
|
|
State<addbusiness> createState() => _addbusinessState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _addbusinessState extends State<addbusiness> {
|
2022-05-12 17:39:43 +00:00
|
|
|
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',
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
List<DropdownMenuItem<String>> listDrop1 = [];
|
|
|
|
String? selected1 = null;
|
|
|
|
void loadData1() {
|
|
|
|
listDrop1 = [];
|
|
|
|
listDrop1.add(new DropdownMenuItem(
|
|
|
|
child: new Text('Item No.1'),
|
|
|
|
value: 'val-1',
|
|
|
|
));
|
|
|
|
listDrop1.add(new DropdownMenuItem(
|
|
|
|
child: new Text('Item No.2'),
|
|
|
|
value: 'val-2',
|
|
|
|
));
|
|
|
|
listDrop1.add(new DropdownMenuItem(
|
|
|
|
child: new Text('Item No.3'),
|
|
|
|
value: 'val-3',
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
2022-05-09 06:54:36 +00:00
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2022-05-12 17:39:43 +00:00
|
|
|
loadData();
|
|
|
|
loadData1();
|
2022-05-09 06:54:36 +00:00
|
|
|
return Scaffold(
|
2022-05-10 06:55:08 +00:00
|
|
|
backgroundColor: Colors.white,
|
2022-05-14 20:28:31 +00:00
|
|
|
body: SafeArea(
|
2022-05-16 19:05:03 +00:00
|
|
|
child: SingleChildScrollView(
|
2022-05-31 13:48:18 +00:00
|
|
|
reverse: true,
|
2022-05-16 19:05:03 +00:00
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 15, right: 24),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
IconButton(
|
|
|
|
icon: Icon(Icons.arrow_back, size: 24),
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
2022-05-10 06:55:08 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
SizedBox(
|
|
|
|
width: 20,
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
Text(
|
|
|
|
'Add Business',
|
2022-05-12 17:39:43 +00:00
|
|
|
style: TextStyle(
|
2022-06-01 16:36:23 +00:00
|
|
|
fontSize: HeadText,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: DarkGray,
|
2022-06-01 16:36:23 +00:00
|
|
|
fontFamily: Font,
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
2022-05-10 06:55:08 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
'assets/images/gallery-icon.png',
|
2022-05-31 13:48:18 +00:00
|
|
|
color: primaryColor,
|
2022-05-10 06:55:08 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
SizedBox(
|
|
|
|
height: 10,
|
2022-05-10 06:55:08 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
Text(
|
|
|
|
'Uploading Logo',
|
2022-05-12 17:39:43 +00:00
|
|
|
style: TextStyle(
|
2022-06-01 16:36:23 +00:00
|
|
|
color: Gray,
|
|
|
|
fontSize: HeadText,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontFamily: Font,
|
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
margin: EdgeInsets.all(15),
|
|
|
|
padding: EdgeInsets.all(30),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
left: 24,
|
|
|
|
right: 24,
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
'Business Name',
|
|
|
|
style: TextStyle(
|
2022-06-01 16:36:23 +00:00
|
|
|
fontFamily: Font,
|
|
|
|
fontSize: HeadText,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: DarkGray,
|
2022-05-16 19:05:03 +00:00
|
|
|
),
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
2022-05-10 06:55:08 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
const EdgeInsets.only(left: 24, right: 24, top: 5),
|
|
|
|
child: TextField(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding:
|
|
|
|
EdgeInsets.only(left: 10, top: 5, bottom: 5),
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(5),
|
|
|
|
),
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
hintText: 'Type here...',
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
|
|
|
),
|
2022-05-11 07:10:14 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
left: 24,
|
2022-06-03 17:41:07 +00:00
|
|
|
top: 15,
|
2022-05-16 19:05:03 +00:00
|
|
|
right: 24,
|
|
|
|
),
|
|
|
|
child: Text(
|
|
|
|
'Contact Number',
|
|
|
|
style: TextStyle(
|
2022-06-01 16:36:23 +00:00
|
|
|
fontFamily: Font,
|
|
|
|
fontSize: HeadText,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: DarkGray,
|
2022-05-16 19:05:03 +00:00
|
|
|
),
|
2022-05-11 07:10:14 +00:00
|
|
|
),
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
const EdgeInsets.only(left: 24, right: 24, top: 5),
|
|
|
|
child: TextField(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding:
|
|
|
|
EdgeInsets.only(left: 10, top: 5, bottom: 5),
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(5),
|
|
|
|
),
|
2022-05-11 07:10:14 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
hintText: 'Type here...',
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
keyboardType: TextInputType.number,
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
Padding(
|
|
|
|
padding:
|
2022-06-03 17:41:07 +00:00
|
|
|
const EdgeInsets.only(left: 24, top: 15, right: 24),
|
2022-05-16 19:05:03 +00:00
|
|
|
child: Text(
|
|
|
|
'Tell about your business...',
|
|
|
|
style: TextStyle(
|
2022-06-01 16:36:23 +00:00
|
|
|
fontFamily: Font,
|
|
|
|
fontSize: HeadText,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: DarkGray,
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
),
|
2022-05-10 06:55:08 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
const EdgeInsets.only(left: 24, right: 24, top: 5),
|
|
|
|
child: TextField(
|
|
|
|
maxLines: 4,
|
|
|
|
keyboardType: TextInputType.multiline,
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding:
|
|
|
|
EdgeInsets.only(left: 10, top: 5, bottom: 5),
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(5),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
hintText: 'Type here...',
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
2022-06-03 17:41:07 +00:00
|
|
|
padding: const EdgeInsets.only(top: 15),
|
2022-05-16 19:05:03 +00:00
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
SizedBox(
|
|
|
|
width: 28,
|
|
|
|
),
|
2022-05-31 13:48:18 +00:00
|
|
|
Text(
|
|
|
|
'Industry',
|
2022-06-01 16:36:23 +00:00
|
|
|
style: TextStyle(
|
|
|
|
color: DarkGray,
|
|
|
|
fontSize: HeadText,
|
|
|
|
fontFamily: Font,
|
|
|
|
),
|
2022-05-31 13:48:18 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
SizedBox(
|
|
|
|
width: 120,
|
|
|
|
),
|
2022-05-31 13:48:18 +00:00
|
|
|
Text(
|
|
|
|
'Category',
|
2022-06-01 16:36:23 +00:00
|
|
|
style: TextStyle(
|
|
|
|
color: DarkGray,
|
|
|
|
fontFamily: Font,
|
|
|
|
fontSize: HeadText),
|
2022-05-31 13:48:18 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(top: 5, right: 24),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
SizedBox(
|
|
|
|
width: 28,
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
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(() {});
|
|
|
|
},
|
2022-05-13 18:10:28 +00:00
|
|
|
),
|
|
|
|
),
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: InputDecorator(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
contentPadding: EdgeInsets.only(
|
|
|
|
left: 10, top: 1, bottom: 1, right: 5),
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topRight: Radius.circular(5),
|
|
|
|
bottomRight: Radius.circular(5),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: DropdownButtonHideUnderline(
|
|
|
|
child: new DropdownButton(
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
value: selected1,
|
|
|
|
items: listDrop1,
|
|
|
|
icon:
|
|
|
|
Icon(Icons.keyboard_arrow_down, size: 24),
|
|
|
|
hint: new Text('Choose...'),
|
|
|
|
onChanged: (value) {
|
|
|
|
selected1 = value as String?;
|
|
|
|
setState(() {});
|
|
|
|
},
|
|
|
|
),
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
|
|
|
),
|
2022-05-10 06:55:08 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: 5,
|
|
|
|
),
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Padding(
|
2022-06-03 17:41:07 +00:00
|
|
|
padding: const EdgeInsets.only(left: 28, top: 15),
|
2022-05-16 19:05:03 +00:00
|
|
|
child: Text(
|
|
|
|
'Address',
|
|
|
|
style: TextStyle(
|
2022-06-01 16:36:23 +00:00
|
|
|
fontFamily: Font,
|
|
|
|
fontSize: HeadText,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: DarkGray,
|
2022-05-16 19:05:03 +00:00
|
|
|
),
|
|
|
|
),
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
SizedBox(
|
|
|
|
height: 5,
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 28, right: 24),
|
|
|
|
child: TextField(
|
2022-05-12 17:39:43 +00:00
|
|
|
decoration: InputDecoration(
|
2022-05-16 19:05:03 +00:00
|
|
|
contentPadding:
|
|
|
|
EdgeInsets.only(left: 10, top: 5, bottom: 5),
|
2022-05-12 17:39:43 +00:00
|
|
|
border: OutlineInputBorder(
|
2022-05-16 19:05:03 +00:00
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(5),
|
2022-05-13 18:10:28 +00:00
|
|
|
),
|
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
hintText: 'Type here...',
|
|
|
|
suffixIcon: Icon(
|
|
|
|
Icons.location_on_outlined,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: primaryColor,
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2022-05-13 18:10:28 +00:00
|
|
|
),
|
2022-05-31 13:48:18 +00:00
|
|
|
SizedBox(
|
2022-06-03 17:41:07 +00:00
|
|
|
height: 45,
|
2022-05-31 13:48:18 +00:00
|
|
|
),
|
|
|
|
MaterialButton(
|
|
|
|
height: 50,
|
|
|
|
minWidth: double.infinity,
|
|
|
|
color: primaryColor,
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (_) => businessaddedsuccess()));
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
'Save',
|
2022-06-01 16:36:23 +00:00
|
|
|
style: TextStyle(
|
|
|
|
color: White,
|
|
|
|
fontSize: HeadText,
|
|
|
|
fontFamily: Font,
|
|
|
|
),
|
2022-05-31 13:48:18 +00:00
|
|
|
),
|
|
|
|
),
|
2022-05-16 19:05:03 +00:00
|
|
|
],
|
|
|
|
),
|
2022-05-12 17:39:43 +00:00
|
|
|
),
|
2022-05-09 06:54:36 +00:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|