2022-05-27 06:57:43 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2022-05-31 13:48:18 +00:00
|
|
|
import 'package:openclosenew/colors.dart';
|
2022-05-27 06:57:43 +00:00
|
|
|
|
2022-05-29 18:28:03 +00:00
|
|
|
import '17-BusinessProfileFormSuccess.dart';
|
2022-06-01 16:36:23 +00:00
|
|
|
import 'FontFamily.dart';
|
|
|
|
import 'fontsize.dart';
|
2022-05-29 18:28:03 +00:00
|
|
|
|
2022-05-27 06:57:43 +00:00
|
|
|
class addbusinessdetails extends StatefulWidget {
|
|
|
|
const addbusinessdetails({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
State<addbusinessdetails> createState() => _addbusinessdetailsState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _addbusinessdetailsState extends State<addbusinessdetails> {
|
2022-05-29 18:28:03 +00:00
|
|
|
var _fields = ['All Days', 'Specific days & timing'];
|
|
|
|
var _currentItemSelected = 'All Days';
|
|
|
|
TimeOfDay _TimeofDay = TimeOfDay(hour: 8, minute: 30);
|
|
|
|
void _showTimePicker() {
|
|
|
|
showTimePicker(
|
|
|
|
context: context,
|
|
|
|
initialTime: TimeOfDay.now(),
|
|
|
|
).then((value) {
|
|
|
|
setState(() {
|
|
|
|
_TimeofDay = value!;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
TimeOfDay _TimeofDay1 = TimeOfDay(hour: 8, minute: 30);
|
|
|
|
void _showTimePicker1() {
|
|
|
|
showTimePicker(
|
|
|
|
context: context,
|
|
|
|
initialTime: TimeOfDay.now(),
|
|
|
|
).then((value) {
|
|
|
|
setState(() {
|
|
|
|
_TimeofDay1 = value!;
|
|
|
|
});
|
|
|
|
});
|
2022-05-28 07:00:42 +00:00
|
|
|
}
|
2022-05-27 17:33:29 +00:00
|
|
|
|
2022-05-27 06:57:43 +00:00
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
body: SafeArea(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
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);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
width: 20,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'Add Business Detail',
|
|
|
|
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-27 06:57:43 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(top: 30, left: 30, right: 20),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
"Website",
|
|
|
|
style: TextStyle(
|
2022-06-01 16:36:23 +00:00
|
|
|
fontFamily: Font,
|
2022-05-31 13:48:18 +00:00
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w300,
|
2022-06-01 16:36:23 +00:00
|
|
|
fontSize: HeadText,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: DarkGray,
|
|
|
|
),
|
2022-05-27 06:57:43 +00:00
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: 10,
|
|
|
|
),
|
|
|
|
TextField(
|
|
|
|
decoration: InputDecoration(
|
|
|
|
border: InputBorder.none,
|
|
|
|
hintText: "Add if you have...",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: 15,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"Your working days & hours",
|
|
|
|
style: TextStyle(
|
2022-06-01 16:36:23 +00:00
|
|
|
fontFamily: Font,
|
2022-05-27 17:33:29 +00:00
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w300,
|
2022-06-01 16:36:23 +00:00
|
|
|
fontSize: HeadText,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: DarkGray,
|
2022-05-27 17:33:29 +00:00
|
|
|
),
|
2022-05-27 06:57:43 +00:00
|
|
|
),
|
2022-05-28 07:00:42 +00:00
|
|
|
SizedBox(
|
|
|
|
height: 15,
|
|
|
|
),
|
2022-05-27 06:57:43 +00:00
|
|
|
Row(
|
|
|
|
children: [
|
2022-05-27 17:33:29 +00:00
|
|
|
Expanded(
|
2022-05-29 18:28:03 +00:00
|
|
|
child: DropdownButtonHideUnderline(
|
|
|
|
child: DropdownButton<String>(
|
|
|
|
icon: Icon(Icons.keyboard_arrow_down_rounded),
|
|
|
|
items: _fields.map((String dropdownStringItem) {
|
|
|
|
return DropdownMenuItem<String>(
|
|
|
|
value: dropdownStringItem,
|
|
|
|
child: Text(dropdownStringItem),
|
|
|
|
);
|
|
|
|
}).toList(),
|
|
|
|
onChanged: (value) {},
|
|
|
|
value: _currentItemSelected,
|
2022-05-28 07:00:42 +00:00
|
|
|
),
|
2022-05-27 17:33:29 +00:00
|
|
|
),
|
2022-05-27 06:57:43 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2022-05-29 18:28:03 +00:00
|
|
|
SizedBox(
|
|
|
|
height: 10,
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
"From",
|
|
|
|
style: TextStyle(
|
2022-06-01 16:36:23 +00:00
|
|
|
fontFamily: Font,
|
2022-05-29 18:28:03 +00:00
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w300,
|
2022-06-01 16:36:23 +00:00
|
|
|
fontSize: HeadText,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: DarkGray,
|
2022-05-29 18:28:03 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
width: 120,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"To",
|
|
|
|
style: TextStyle(
|
2022-06-01 16:36:23 +00:00
|
|
|
fontFamily: Font,
|
2022-05-29 18:28:03 +00:00
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w300,
|
2022-06-01 16:36:23 +00:00
|
|
|
fontSize: HeadText,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: DarkGray,
|
2022-05-28 07:00:42 +00:00
|
|
|
),
|
2022-05-29 18:28:03 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
SizedBox(
|
|
|
|
height: 10,
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
_showTimePicker();
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
height: 40,
|
|
|
|
width: 150,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
color: Color(0xFFE6E6E6),
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(5),
|
|
|
|
bottomLeft: Radius.circular(5),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
_TimeofDay.format(context).toString(),
|
|
|
|
style: TextStyle(
|
2022-06-01 16:36:23 +00:00
|
|
|
fontFamily: Font,
|
2022-05-29 18:28:03 +00:00
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
2022-06-01 16:36:23 +00:00
|
|
|
fontSize: HeadText,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: DarkGray,
|
2022-05-29 18:28:03 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Icon(Icons.access_time)
|
|
|
|
],
|
|
|
|
),
|
2022-05-28 07:00:42 +00:00
|
|
|
),
|
2022-05-29 18:28:03 +00:00
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
|
|
_showTimePicker1();
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
height: 40,
|
|
|
|
width: 150,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border.all(
|
|
|
|
color: Color(0xFFE6E6E6),
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topRight: Radius.circular(5),
|
|
|
|
bottomRight: Radius.circular(5),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
_TimeofDay1.format(context).toString(),
|
|
|
|
style: TextStyle(
|
2022-06-01 16:36:23 +00:00
|
|
|
fontFamily: Font,
|
2022-05-29 18:28:03 +00:00
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
2022-06-01 16:36:23 +00:00
|
|
|
fontSize: HeadText,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: DarkGray,
|
2022-05-29 18:28:03 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Icon(Icons.access_time)
|
|
|
|
],
|
2022-05-28 07:00:42 +00:00
|
|
|
),
|
|
|
|
),
|
2022-05-29 18:28:03 +00:00
|
|
|
),
|
|
|
|
],
|
2022-05-28 07:00:42 +00:00
|
|
|
),
|
2022-05-27 06:57:43 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
2022-05-29 18:28:03 +00:00
|
|
|
Spacer(),
|
|
|
|
Row(
|
|
|
|
children: [
|
2022-05-31 13:48:18 +00:00
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 24, bottom: 24),
|
|
|
|
child: MaterialButton(
|
|
|
|
height: 50,
|
|
|
|
minWidth: double.infinity,
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.circular(4)),
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
"Cancel",
|
2022-06-01 16:36:23 +00:00
|
|
|
style: TextStyle(
|
|
|
|
color: Gray,
|
|
|
|
fontFamily: Font,
|
|
|
|
),
|
2022-05-31 13:48:18 +00:00
|
|
|
),
|
2022-05-29 18:28:03 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
child: Padding(
|
2022-05-31 13:48:18 +00:00
|
|
|
padding: const EdgeInsets.only(right: 24, bottom: 24),
|
2022-05-29 18:28:03 +00:00
|
|
|
child: MaterialButton(
|
|
|
|
height: 50,
|
|
|
|
minWidth: double.infinity,
|
2022-05-31 13:48:18 +00:00
|
|
|
color: primaryColor,
|
2022-05-29 18:28:03 +00:00
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.circular(4)),
|
|
|
|
onPressed: () {
|
2022-06-09 18:43:12 +00:00
|
|
|
Navigator.push(
|
|
|
|
context,
|
|
|
|
MaterialPageRoute(
|
|
|
|
builder: (_) => profileformsuccess()));
|
2022-05-29 18:28:03 +00:00
|
|
|
},
|
|
|
|
child: Text(
|
|
|
|
'Save',
|
2022-06-01 16:36:23 +00:00
|
|
|
style: TextStyle(
|
|
|
|
color: White,
|
|
|
|
fontSize: HeadText,
|
|
|
|
fontFamily: Font,
|
|
|
|
),
|
2022-05-29 18:28:03 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2022-05-27 06:57:43 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|