2022-05-18 07:02:58 +00:00
|
|
|
import 'package:flutter/cupertino.dart';
|
2022-05-17 07:00:55 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_switch/flutter_switch.dart';
|
|
|
|
|
|
|
|
class businessdetail extends StatefulWidget {
|
|
|
|
const businessdetail({Key? key}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
State<businessdetail> createState() => _businessdetailState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _businessdetailState extends State<businessdetail> {
|
2022-05-18 07:02:58 +00:00
|
|
|
bool status = true;
|
2022-05-17 07:00:55 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
body: Column(
|
|
|
|
children: [
|
|
|
|
SafeArea(
|
2022-05-18 07:02:58 +00:00
|
|
|
child: Container(
|
|
|
|
height: 500,
|
|
|
|
child: Stack(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
height: 250,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
image: const DecorationImage(
|
|
|
|
image: AssetImage('assets/images/bg.png'),
|
|
|
|
fit: BoxFit.cover,
|
|
|
|
),
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
bottomLeft: Radius.circular(20),
|
|
|
|
bottomRight: Radius.circular(20),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Padding(
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
left: 10, right: 10, bottom: 120),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
FloatingActionButton(
|
|
|
|
child: Icon(
|
|
|
|
Icons.arrow_back,
|
|
|
|
size: 24,
|
|
|
|
color: Color(0xFF3D3D3D),
|
|
|
|
),
|
2022-05-18 18:27:10 +00:00
|
|
|
mini: true,
|
2022-05-18 07:02:58 +00:00
|
|
|
backgroundColor: Colors.white,
|
|
|
|
onPressed: () {},
|
|
|
|
),
|
|
|
|
Spacer(),
|
|
|
|
FlutterSwitch(
|
2022-05-18 18:27:10 +00:00
|
|
|
width: 107,
|
|
|
|
height: 50,
|
|
|
|
valueFontSize: 12,
|
|
|
|
toggleSize: 20,
|
2022-05-18 07:02:58 +00:00
|
|
|
value: status,
|
|
|
|
borderRadius: 30.0,
|
2022-05-18 18:27:10 +00:00
|
|
|
padding: 5,
|
2022-05-18 07:02:58 +00:00
|
|
|
showOnOff: true,
|
|
|
|
onToggle: (val) {
|
|
|
|
setState(() {
|
|
|
|
status = val;
|
|
|
|
});
|
|
|
|
},
|
|
|
|
activeText: "OPEN",
|
|
|
|
activeSwitchBorder:
|
2022-05-18 18:27:10 +00:00
|
|
|
Border.all(color: Colors.white, width: 10),
|
2022-05-18 07:02:58 +00:00
|
|
|
inactiveSwitchBorder:
|
2022-05-18 18:27:10 +00:00
|
|
|
Border.all(color: Colors.white, width: 10),
|
2022-05-18 07:02:58 +00:00
|
|
|
activeTextColor: Colors.white,
|
|
|
|
activeTextFontWeight: FontWeight.w600,
|
|
|
|
activeColor: Color(0xFF09CD99),
|
|
|
|
inactiveText: "CLOSED",
|
|
|
|
inactiveTextColor: Colors.white,
|
|
|
|
inactiveTextFontWeight: FontWeight.w600,
|
|
|
|
inactiveColor: Color(0xFFFF4B4C),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
2022-05-17 07:00:55 +00:00
|
|
|
),
|
2022-05-18 07:02:58 +00:00
|
|
|
Spacer(),
|
|
|
|
Align(
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Container(
|
|
|
|
margin: EdgeInsets.only(right: 20, left: 20, top: 60),
|
|
|
|
padding: EdgeInsets.all(15),
|
|
|
|
height: 250,
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Colors.white,
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(10)),
|
2022-05-17 07:00:55 +00:00
|
|
|
),
|
2022-05-18 07:02:58 +00:00
|
|
|
child: Row(
|
2022-05-18 18:27:10 +00:00
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
2022-05-18 07:02:58 +00:00
|
|
|
children: [
|
2022-05-18 18:27:10 +00:00
|
|
|
Image.asset(
|
|
|
|
'assets/images/store_logo.png',
|
|
|
|
width: 60,
|
|
|
|
height: 60,
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: const EdgeInsets.only(top: 10, left: 5),
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
RichText(
|
|
|
|
text: TextSpan(
|
|
|
|
text: "Barbeque Nation ",
|
|
|
|
style: TextStyle(
|
|
|
|
fontFamily: 'Manrope',
|
|
|
|
fontStyle: FontStyle.normal,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontSize: 18,
|
|
|
|
color: Colors.black,
|
|
|
|
),
|
|
|
|
children: [],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
RichText(
|
|
|
|
text: TextSpan(
|
|
|
|
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,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
2022-05-18 07:02:58 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
Spacer(),
|
2022-05-18 18:27:10 +00:00
|
|
|
IconButton(
|
|
|
|
icon: Image.asset('assets/images/bell.png'),
|
|
|
|
onPressed: () {
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
2022-05-18 07:02:58 +00:00
|
|
|
),
|
|
|
|
],
|
2022-05-17 07:00:55 +00:00
|
|
|
),
|
2022-05-18 07:02:58 +00:00
|
|
|
),
|
2022-05-17 07:00:55 +00:00
|
|
|
),
|
2022-05-18 07:02:58 +00:00
|
|
|
],
|
2022-05-17 07:00:55 +00:00
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|