2022-05-15 19:40:15 +00:00
|
|
|
import 'dart:ffi';
|
|
|
|
|
2022-05-14 20:28:31 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2022-05-15 19:40:15 +00:00
|
|
|
import 'package:openclosenew/businessempty.dart';
|
|
|
|
import 'package:flutter_switch/flutter_switch.dart';
|
2022-05-14 20:28:31 +00:00
|
|
|
|
|
|
|
class businesshome extends StatefulWidget {
|
|
|
|
const businesshome({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
State<businesshome> createState() => _businesshomeState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _businesshomeState extends State<businesshome> {
|
2022-05-15 19:40:15 +00:00
|
|
|
bool status = true;
|
|
|
|
|
|
|
|
static const Color newColor = Colors.black;
|
|
|
|
|
2022-05-14 20:28:31 +00:00
|
|
|
int _selectedIndex = 0;
|
|
|
|
static const TextStyle optionStyle = TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontSize: 10,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
);
|
|
|
|
static const List<Widget> _widgetOptions = <Widget>[
|
|
|
|
Text(
|
|
|
|
'Index 0: Home',
|
|
|
|
style: optionStyle,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'Index 1: Business',
|
|
|
|
style: optionStyle,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'Index 2: School',
|
|
|
|
style: optionStyle,
|
|
|
|
),
|
|
|
|
];
|
|
|
|
|
|
|
|
void _onItemTapped(int index) {
|
|
|
|
setState(() {
|
|
|
|
_selectedIndex = index;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
body: Column(
|
|
|
|
children: [
|
|
|
|
SafeArea(
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
height: 50,
|
|
|
|
width: 50,
|
|
|
|
margin: EdgeInsets.all(20),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(50),
|
|
|
|
color: Colors.grey,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
SizedBox(
|
|
|
|
height: 25,
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'Hi, Sudharsan',
|
|
|
|
style: TextStyle(
|
|
|
|
color: Colors.black,
|
|
|
|
fontSize: 16,
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
'Mon, 02 May 2022',
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
fontSize: 11,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(top: 20),
|
|
|
|
child: IconButton(
|
|
|
|
icon: Image.asset('assets/images/bell.png'),
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
2022-05-15 19:40:15 +00:00
|
|
|
Container(
|
|
|
|
height: 100,
|
|
|
|
child: ListView(
|
|
|
|
scrollDirection: Axis.horizontal,
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 22),
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {},
|
|
|
|
child: Container(
|
|
|
|
width: 320,
|
2022-05-14 20:28:31 +00:00
|
|
|
margin: EdgeInsets.only(right: 10),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
image: const DecorationImage(
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
image: AssetImage('assets/images/status.png'),
|
|
|
|
),
|
|
|
|
color: Color(0xFF09CD99),
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(5),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(14),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
"Today",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 14,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"42",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 26,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"Visitors viewed Barbeque Nation",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 12,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2022-05-15 19:40:15 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 10),
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {},
|
|
|
|
child: Container(
|
|
|
|
width: 320,
|
2022-05-14 20:28:31 +00:00
|
|
|
margin: EdgeInsets.only(right: 10),
|
|
|
|
decoration: BoxDecoration(
|
2022-05-15 19:40:15 +00:00
|
|
|
image: const DecorationImage(
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
image: AssetImage('assets/images/status.png'),
|
|
|
|
),
|
|
|
|
color: Color(0xFF09CD99),
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(5),
|
|
|
|
),
|
|
|
|
),
|
2022-05-14 20:28:31 +00:00
|
|
|
child: Padding(
|
2022-05-15 19:40:15 +00:00
|
|
|
padding: const EdgeInsets.all(14),
|
2022-05-14 20:28:31 +00:00
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
"Today",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 14,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
2022-05-15 19:40:15 +00:00
|
|
|
"43",
|
2022-05-14 20:28:31 +00:00
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 26,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"Visitors viewed Barbeque Nation",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 12,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2022-05-15 19:40:15 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 10),
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {},
|
|
|
|
child: Container(
|
|
|
|
width: 320,
|
2022-05-14 20:28:31 +00:00
|
|
|
margin: EdgeInsets.only(right: 10),
|
|
|
|
decoration: BoxDecoration(
|
2022-05-15 19:40:15 +00:00
|
|
|
image: const DecorationImage(
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
image: AssetImage('assets/images/status.png'),
|
|
|
|
),
|
|
|
|
color: Color(0xFF09CD99),
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(5),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.all(14),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
"Today",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 14,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"44",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 26,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"Visitors viewed Barbeque Nation",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 12,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 24),
|
|
|
|
child: Text(
|
|
|
|
'My Businesses',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(right: 15),
|
|
|
|
child: TextButton.icon(
|
|
|
|
icon: Icon(
|
|
|
|
Icons.add,
|
|
|
|
color: Color(0xFF09CD99),
|
|
|
|
),
|
|
|
|
label: Text(
|
|
|
|
"Add Business",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontSize: 12,
|
|
|
|
color: Color(0xFF09CD99),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onPressed: () {},
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
height: 420,
|
|
|
|
child: ListView(
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 24),
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {},
|
|
|
|
child: Container(
|
|
|
|
width: 165,
|
|
|
|
height: 200,
|
|
|
|
margin: EdgeInsets.only(right: 20),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: newColor,
|
|
|
|
image: const DecorationImage(
|
|
|
|
image: AssetImage('assets/images/bg.png'),
|
|
|
|
fit: BoxFit.fitHeight,
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(5),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
left: 15,
|
|
|
|
top: 100,
|
|
|
|
),
|
|
|
|
child: RichText(
|
|
|
|
text: TextSpan(
|
|
|
|
text: "Barbeque Nation ",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontSize: 18,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
children: [
|
|
|
|
TextSpan(
|
|
|
|
text: "42 ",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 15,
|
|
|
|
color: Color(0xFFFFBE3F),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
WidgetSpan(
|
|
|
|
child: Icon(
|
|
|
|
Icons.star,
|
|
|
|
color: Color(0xFFFFBE3F),
|
|
|
|
size: 18,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding:
|
|
|
|
const EdgeInsets.only(top: 100, left: 3),
|
|
|
|
child: FlutterSwitch(
|
|
|
|
width: 105,
|
|
|
|
height: 40,
|
|
|
|
valueFontSize: 15,
|
|
|
|
toggleSize: 25,
|
|
|
|
value: status,
|
|
|
|
borderRadius: 30.0,
|
|
|
|
padding: 8.0,
|
|
|
|
showOnOff: true,
|
|
|
|
onToggle: (val) {
|
|
|
|
setState(() {
|
|
|
|
status = val;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
activeText: "OPEN",
|
|
|
|
activeTextColor: Colors.white,
|
|
|
|
activeTextFontWeight: FontWeight.w600,
|
|
|
|
activeColor: Color(0xFF09CD99),
|
|
|
|
inactiveText: "CLOSED",
|
|
|
|
inactiveTextColor: Colors.white,
|
|
|
|
inactiveTextFontWeight: FontWeight.w600,
|
|
|
|
inactiveColor: Color(0xFFFF4B4C),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
2022-05-14 20:28:31 +00:00
|
|
|
),
|
2022-05-15 19:40:15 +00:00
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
left: 10,
|
|
|
|
),
|
|
|
|
child: RichText(
|
|
|
|
text: TextSpan(
|
|
|
|
children: [
|
|
|
|
WidgetSpan(
|
|
|
|
child: Icon(
|
|
|
|
Icons.location_on_outlined,
|
|
|
|
color: Colors.white,
|
|
|
|
size: 20,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
TextSpan(
|
|
|
|
text: "Town Hall, Coimbatore",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 14,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(left: 22),
|
|
|
|
child: InkWell(
|
|
|
|
onTap: () {},
|
|
|
|
child: Container(
|
|
|
|
width: 160,
|
|
|
|
height: 200,
|
|
|
|
margin: EdgeInsets.only(right: 10, top: 10),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
image: const DecorationImage(
|
|
|
|
alignment: Alignment.centerRight,
|
|
|
|
image: AssetImage('assets/images/status.png'),
|
|
|
|
),
|
|
|
|
color: Color(0xFF09CD99),
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(5),
|
|
|
|
),
|
|
|
|
),
|
2022-05-14 20:28:31 +00:00
|
|
|
child: Padding(
|
2022-05-15 19:40:15 +00:00
|
|
|
padding: const EdgeInsets.all(14),
|
2022-05-14 20:28:31 +00:00
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
Text(
|
|
|
|
"Today",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 14,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"42",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 26,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
"Visitors viewed Barbeque Nation",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
fontSize: 12,
|
|
|
|
color: Colors.white,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2022-05-15 19:40:15 +00:00
|
|
|
),
|
2022-05-14 20:28:31 +00:00
|
|
|
),
|
2022-05-15 19:40:15 +00:00
|
|
|
],
|
2022-05-14 20:28:31 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
BottomNavigationBar(
|
|
|
|
iconSize: 20,
|
|
|
|
unselectedFontSize: 12,
|
|
|
|
selectedFontSize: 12,
|
|
|
|
type: BottomNavigationBarType.fixed,
|
|
|
|
items: const <BottomNavigationBarItem>[
|
|
|
|
BottomNavigationBarItem(
|
|
|
|
icon: ImageIcon(
|
|
|
|
AssetImage('assets/images/store.png'),
|
|
|
|
),
|
|
|
|
label: 'Business',
|
|
|
|
),
|
|
|
|
BottomNavigationBarItem(
|
|
|
|
icon: ImageIcon(
|
|
|
|
AssetImage('assets/images/messages.png'),
|
|
|
|
),
|
|
|
|
label: 'Chat',
|
|
|
|
),
|
|
|
|
BottomNavigationBarItem(
|
|
|
|
icon: ImageIcon(
|
|
|
|
AssetImage('assets/images/discount.png'),
|
|
|
|
),
|
|
|
|
label: 'Offer',
|
|
|
|
),
|
|
|
|
BottomNavigationBarItem(
|
|
|
|
icon: ImageIcon(
|
|
|
|
AssetImage('assets/images/profile.png'),
|
|
|
|
),
|
|
|
|
label: 'Profile',
|
|
|
|
),
|
|
|
|
BottomNavigationBarItem(
|
|
|
|
icon: ImageIcon(
|
|
|
|
AssetImage('assets/images/setting.png'),
|
|
|
|
),
|
|
|
|
label: 'Settings',
|
|
|
|
),
|
|
|
|
],
|
|
|
|
currentIndex: _selectedIndex,
|
|
|
|
selectedItemColor: Color(0xff09CD99),
|
|
|
|
onTap: _onItemTapped,
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|