From 55bb876545af9bf1de86625c7aba021687051212 Mon Sep 17 00:00:00 2001 From: vignesh Date: Sat, 4 Jun 2022 12:12:50 +0530 Subject: [PATCH] Specific days & timing page creation --- openclosenew/lib/11_busiesshome.dart | 1453 +++++++++---------- openclosenew/lib/15_addbusinessdetails.dart | 8 +- openclosenew/lib/pages/page_1.dart | 75 +- 3 files changed, 775 insertions(+), 761 deletions(-) diff --git a/openclosenew/lib/11_busiesshome.dart b/openclosenew/lib/11_busiesshome.dart index c48d3f7..6e1ed7b 100644 --- a/openclosenew/lib/11_busiesshome.dart +++ b/openclosenew/lib/11_busiesshome.dart @@ -30,763 +30,752 @@ class _businesshomeState extends State { Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, - body: SingleChildScrollView( - child: Column( - children: [ - SafeArea( - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - Container( - height: 50, - width: 50, - margin: EdgeInsets.all(20), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(50), - color: Colors.grey, - ), - ), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - 'Hi, Sudharsan', - style: TextStyle( - color: DarkGray, - fontSize: HeadText, - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w600, - ), - ), - Text( - 'Mon, 02 May 2022', - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w500, - fontSize: SubText, - color: Gray, - ), - ), - ], - ), - Spacer(), - IconButton( - padding: EdgeInsets.only(right: 15), - icon: Image.asset('assets/images/bell.png'), - onPressed: () { - Navigator.pop(context); - }, - ), - ], - ), - ), - SizedBox( - height: 20, - ), - Container( - height: 100, - child: ListView( - scrollDirection: Axis.horizontal, - children: [ - Padding( - padding: const EdgeInsets.only(left: 18), - child: InkWell( - onTap: () {}, - child: Container( - width: 360, - margin: EdgeInsets.only(right: 10), - decoration: BoxDecoration( - image: const DecorationImage( - alignment: Alignment.centerRight, - image: AssetImage('assets/images/status.png'), - ), - borderRadius: BorderRadius.all( - Radius.circular(10), - ), - gradient: LinearGradient( - colors: [ - Color(0xFF09CD99), - Color(0xFF09B5CD), - ], - ), - ), - child: Padding( - padding: const EdgeInsets.all(14), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "Today", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: HeadText, - color: Colors.white, - ), - ), - Text( - "42", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: TitleText, - color: Colors.white, - ), - ), - Text( - "Visitors viewed Barbeque Nation", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: SubText, - color: Colors.white, - ), - ), - ], - ), - ), - ), - ), - ), - Padding( - padding: const EdgeInsets.only(left: 18), - child: InkWell( - onTap: () {}, - child: Container( - width: 360, - margin: EdgeInsets.only(right: 10), - decoration: BoxDecoration( - image: const DecorationImage( - alignment: Alignment.centerRight, - image: AssetImage('assets/images/status.png'), - ), - borderRadius: BorderRadius.all( - Radius.circular(10), - ), - gradient: LinearGradient( - colors: [ - Color(0xFF09CD99), - Color(0xFF09B5CD), - ], - ), - ), - child: Padding( - padding: const EdgeInsets.all(14), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "Today", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: HeadText, - color: Colors.white, - ), - ), - Text( - "42", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: TitleText, - color: Colors.white, - ), - ), - Text( - "Visitors viewed Barbeque Nation", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: SubText, - color: Colors.white, - ), - ), - ], - ), - ), - ), - ), - ), - Padding( - padding: const EdgeInsets.only(left: 18), - child: InkWell( - onTap: () {}, - child: Container( - width: 360, - margin: EdgeInsets.only(right: 10), - decoration: BoxDecoration( - image: const DecorationImage( - alignment: Alignment.centerRight, - image: AssetImage('assets/images/status.png'), - ), - borderRadius: BorderRadius.all( - Radius.circular(10), - ), - gradient: LinearGradient( - colors: [ - Color(0xFF09CD99), - Color(0xFF09B5CD), - ], - ), - ), - child: Padding( - padding: const EdgeInsets.all(14), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - "Today", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: HeadText, - color: Colors.white, - ), - ), - Text( - "42", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: TitleText, - color: Colors.white, - ), - ), - Text( - "Visitors viewed Barbeque Nation", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: SubText, - color: Colors.white, - ), - ), - ], - ), - ), - ), - ), - ), - ], - ), - ), - Row( + body: Column( + children: [ + SafeArea( + child: Row( + mainAxisAlignment: MainAxisAlignment.start, children: [ - Padding( - padding: const EdgeInsets.only(left: 24), - child: Text( - 'My Businesses', - style: TextStyle( - fontSize: HeadText, - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w600, - color: DarkGray, - ), + Container( + height: 50, + width: 50, + margin: EdgeInsets.all(20), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(50), + color: Colors.grey, ), ), - Spacer(), - Padding( - padding: - const EdgeInsets.only(right: 15, top: 10, bottom: 15), - child: TextButton.icon( - icon: Icon( - Icons.add, - color: primaryColor, - ), - label: Text( - "Add Business", + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text( + 'Hi, Sudharsan', style: TextStyle( + color: DarkGray, + fontSize: HeadText, fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w600, - fontSize: HeadText, - color: primaryColor, ), ), - onPressed: () { - Navigator.push(context, - MaterialPageRoute(builder: (_) => addbusiness())); - }, + Text( + 'Mon, 02 May 2022', + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w500, + fontSize: SubText, + color: Gray, + ), + ), + ], + ), + Spacer(), + IconButton( + padding: EdgeInsets.only(right: 15), + icon: Image.asset('assets/images/bell.png'), + onPressed: () { + Navigator.pop(context); + }, + ), + ], + ), + ), + SizedBox( + height: 20, + ), + Container( + height: 100, + child: ListView( + scrollDirection: Axis.horizontal, + children: [ + Padding( + padding: const EdgeInsets.only(left: 18), + child: InkWell( + onTap: () {}, + child: Container( + width: 360, + margin: EdgeInsets.only(right: 10), + decoration: BoxDecoration( + image: const DecorationImage( + alignment: Alignment.centerRight, + image: AssetImage('assets/images/status.png'), + ), + borderRadius: BorderRadius.all( + Radius.circular(10), + ), + gradient: LinearGradient( + colors: [ + Color(0xFF09CD99), + Color(0xFF09B5CD), + ], + ), + ), + child: Padding( + padding: const EdgeInsets.all(14), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Today", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: HeadText, + color: Colors.white, + ), + ), + Text( + "42", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: TitleText, + color: Colors.white, + ), + ), + Text( + "Visitors viewed Barbeque Nation", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: SubText, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 18), + child: InkWell( + onTap: () {}, + child: Container( + width: 360, + margin: EdgeInsets.only(right: 10), + decoration: BoxDecoration( + image: const DecorationImage( + alignment: Alignment.centerRight, + image: AssetImage('assets/images/status.png'), + ), + borderRadius: BorderRadius.all( + Radius.circular(10), + ), + gradient: LinearGradient( + colors: [ + Color(0xFF09CD99), + Color(0xFF09B5CD), + ], + ), + ), + child: Padding( + padding: const EdgeInsets.all(14), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Today", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: HeadText, + color: Colors.white, + ), + ), + Text( + "42", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: TitleText, + color: Colors.white, + ), + ), + Text( + "Visitors viewed Barbeque Nation", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: SubText, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ), + ), + Padding( + padding: const EdgeInsets.only(left: 18), + child: InkWell( + onTap: () {}, + child: Container( + width: 360, + margin: EdgeInsets.only(right: 10), + decoration: BoxDecoration( + image: const DecorationImage( + alignment: Alignment.centerRight, + image: AssetImage('assets/images/status.png'), + ), + borderRadius: BorderRadius.all( + Radius.circular(10), + ), + gradient: LinearGradient( + colors: [ + Color(0xFF09CD99), + Color(0xFF09B5CD), + ], + ), + ), + child: Padding( + padding: const EdgeInsets.all(14), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Today", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: HeadText, + color: Colors.white, + ), + ), + Text( + "42", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: TitleText, + color: Colors.white, + ), + ), + Text( + "Visitors viewed Barbeque Nation", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: SubText, + color: Colors.white, + ), + ), + ], + ), + ), + ), ), ), ], ), - Container( - height: 400, - child: ListView( - scrollDirection: Axis.vertical, - children: [ - Padding( - padding: const EdgeInsets.only(left: 15), - child: InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => businessdetail())); - }, - child: Container( - height: 200, - width: double.infinity, - margin: EdgeInsets.only(right: 15), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(5)), - image: new DecorationImage( - image: ExactAssetImage( - 'assets/images/bg.png', - ), - fit: BoxFit.cover, - ), - ), - foregroundDecoration: BoxDecoration( - color: status ? null : Colors.white, - backgroundBlendMode: - status ? null : BlendMode.saturation, - ), - child: Stack( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.only( - left: 15, right: 10, top: 75), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(), - child: RichText( - text: TextSpan( - text: "Barbeque Nation ", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w600, - fontSize: 16, - color: Colors.white, - ), - children: [ - TextSpan( - text: "4.2 ", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: SubText, - color: Color(0xFFFFBE3F), - ), - ), - WidgetSpan( - child: Icon( - Icons.star, - color: Color(0xFFFFBE3F), - size: 18, - ), - ), - ], - ), - ), - ), - Spacer(), - FlutterSwitch( - width: 95, - height: 40, - valueFontSize: HeadText, - toggleSize: 20, - value: status, - borderRadius: 20.0, - padding: 5.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), - ), - ], - ), - ), - 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: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: HeadText, - color: Colors.white, - ), - ), - ], - ), - ), - ), - ], - ), - ], - ), - ), - ), + ), + Row( + children: [ + Padding( + padding: const EdgeInsets.only(left: 24), + child: Text( + 'My Businesses', + style: TextStyle( + fontSize: HeadText, + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w600, + color: DarkGray, ), - Padding( - padding: const EdgeInsets.only(left: 15), - child: InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => businessdetail())); - }, - child: Container( - height: 200, - width: double.infinity, - margin: EdgeInsets.only(right: 15, top: 10), - decoration: BoxDecoration( - image: new DecorationImage( - image: ExactAssetImage( - 'assets/images/bg.png', - ), - fit: BoxFit.cover, - ), - borderRadius: BorderRadius.all(Radius.circular(5)), - ), - foregroundDecoration: BoxDecoration( - color: status1 ? null : Colors.grey, - backgroundBlendMode: - status1 ? null : BlendMode.saturation, - ), - child: Stack( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.only( - left: 15, right: 10, top: 75), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(), - child: RichText( - text: TextSpan( - text: "Barbeque Nation ", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w600, - fontSize: 15, - color: Colors.white, - ), - children: [ - TextSpan( - text: "4.2 ", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: 12, - color: Color(0xFFFFBE3F), - ), - ), - WidgetSpan( - child: Icon( - Icons.star, - color: Color(0xFFFFBE3F), - size: 18, - ), - ), - ], - ), - ), - ), - Spacer(), - FlutterSwitch( - width: 105, - height: 40, - valueFontSize: HeadText, - toggleSize: 25, - value: status1, - borderRadius: 30.0, - padding: 8.0, - showOnOff: true, - onToggle: (val) { - setState(() { - status1 = val; - }); - }, - activeText: "OPEN", - activeTextColor: Colors.white, - activeTextFontWeight: FontWeight.w600, - activeColor: Color(0xFF09CD99), - inactiveText: "CLOSED", - inactiveTextColor: Colors.white, - inactiveTextFontWeight: FontWeight.w600, - inactiveColor: Color(0xFFFF4B4C), - ), - ], - ), - ), - 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: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: HeadText, - color: Colors.white, - ), - ), - ], - ), - ), - ), - ], - ), - ], - ), - ), - ), - ), - Padding( - padding: const EdgeInsets.only(left: 15), - child: InkWell( - onTap: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => businessdetail())); - }, - child: Container( - height: 200, - width: double.infinity, - margin: EdgeInsets.only(right: 15, top: 10), - decoration: BoxDecoration( - image: new DecorationImage( - image: ExactAssetImage( - 'assets/images/bg.png', - ), - fit: BoxFit.cover, - ), - borderRadius: BorderRadius.all(Radius.circular(5)), - ), - foregroundDecoration: BoxDecoration( - color: status2 ? null : Colors.grey, - backgroundBlendMode: - status2 ? null : BlendMode.saturation, - ), - child: Stack( - children: [ - Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Padding( - padding: const EdgeInsets.only( - left: 15, right: 10, top: 75), - child: Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - Padding( - padding: const EdgeInsets.only(), - child: RichText( - text: TextSpan( - text: "Barbeque Nation ", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w600, - fontSize: 15, - color: Colors.white, - ), - children: [ - TextSpan( - text: "4.2 ", - style: TextStyle( - fontFamily: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: 12, - color: Color(0xFFFFBE3F), - ), - ), - WidgetSpan( - child: Icon( - Icons.star, - color: Color(0xFFFFBE3F), - size: 18, - ), - ), - ], - ), - ), - ), - Spacer(), - FlutterSwitch( - width: 105, - height: 40, - valueFontSize: HeadText, - toggleSize: 25, - value: status2, - borderRadius: 30.0, - padding: 8.0, - showOnOff: true, - onToggle: (val) { - setState(() { - status2 = val; - }); - }, - activeText: "OPEN", - activeTextColor: Colors.white, - activeTextFontWeight: FontWeight.w600, - activeColor: Color(0xFF09CD99), - inactiveText: "CLOSED", - inactiveTextColor: Colors.white, - inactiveTextFontWeight: FontWeight.w600, - inactiveColor: Color(0xFFFF4B4C), - ), - ], - ), - ), - 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: Font, - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: HeadText, - color: Colors.white, - ), - ), - ], - ), - ), - ), - ], - ), - ], - ), - ), - ), - ), - ], + ), ), - ), - BottomNavigationBar( - iconSize: 20, - unselectedFontSize: SubText, - selectedFontSize: SubText, - type: BottomNavigationBarType.fixed, - items: const [ - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/store.png'), + Spacer(), + Padding( + padding: const EdgeInsets.only(right: 15, top: 10, bottom: 15), + child: TextButton.icon( + icon: Icon( + Icons.add, + color: primaryColor, ), - label: 'Business', + label: Text( + "Add Business", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w600, + fontSize: HeadText, + color: primaryColor, + ), + ), + onPressed: () { + Navigator.push(context, + MaterialPageRoute(builder: (_) => addbusiness())); + }, ), - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/messages.png'), + ), + ], + ), + Container( + height: 390, + child: ListView( + scrollDirection: Axis.vertical, + children: [ + Padding( + padding: const EdgeInsets.only(left: 15), + child: InkWell( + onTap: () { + Navigator.push(context, + MaterialPageRoute(builder: (_) => businessdetail())); + }, + child: Container( + height: 150, + width: double.infinity, + margin: EdgeInsets.only(right: 15), + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(5)), + image: new DecorationImage( + image: ExactAssetImage( + 'assets/images/bg.png', + ), + fit: BoxFit.cover, + ), + ), + foregroundDecoration: BoxDecoration( + color: status ? null : Colors.white, + backgroundBlendMode: + status ? null : BlendMode.saturation, + ), + child: Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 15, right: 10, top: 75), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(), + child: RichText( + text: TextSpan( + text: "Barbeque Nation ", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w600, + fontSize: 16, + color: Colors.white, + ), + children: [ + TextSpan( + text: "4.2 ", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: SubText, + color: Color(0xFFFFBE3F), + ), + ), + WidgetSpan( + child: Icon( + Icons.star, + color: Color(0xFFFFBE3F), + size: 18, + ), + ), + ], + ), + ), + ), + Spacer(), + FlutterSwitch( + width: 105, + height: 40, + valueFontSize: HeadText, + 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), + ), + ], + ), + ), + 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: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: HeadText, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ], + ), + ], + ), + ), ), - label: 'Chat', ), - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/discount.png'), + Padding( + padding: const EdgeInsets.only(left: 15), + child: InkWell( + onTap: () { + Navigator.push(context, + MaterialPageRoute(builder: (_) => businessdetail())); + }, + child: Container( + height: 150, + width: double.infinity, + margin: EdgeInsets.only(right: 15, top: 10), + decoration: BoxDecoration( + image: new DecorationImage( + image: ExactAssetImage( + 'assets/images/bg.png', + ), + fit: BoxFit.cover, + ), + borderRadius: BorderRadius.all(Radius.circular(5)), + ), + foregroundDecoration: BoxDecoration( + color: status1 ? null : Colors.grey, + backgroundBlendMode: + status1 ? null : BlendMode.saturation, + ), + child: Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 15, right: 10, top: 75), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(), + child: RichText( + text: TextSpan( + text: "Barbeque Nation ", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w600, + fontSize: 15, + color: Colors.white, + ), + children: [ + TextSpan( + text: "4.2 ", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: 12, + color: Color(0xFFFFBE3F), + ), + ), + WidgetSpan( + child: Icon( + Icons.star, + color: Color(0xFFFFBE3F), + size: 18, + ), + ), + ], + ), + ), + ), + Spacer(), + FlutterSwitch( + width: 105, + height: 40, + valueFontSize: HeadText, + toggleSize: 25, + value: status1, + borderRadius: 30.0, + padding: 8.0, + showOnOff: true, + onToggle: (val) { + setState(() { + status1 = val; + }); + }, + activeText: "OPEN", + activeTextColor: Colors.white, + activeTextFontWeight: FontWeight.w600, + activeColor: Color(0xFF09CD99), + inactiveText: "CLOSED", + inactiveTextColor: Colors.white, + inactiveTextFontWeight: FontWeight.w600, + inactiveColor: Color(0xFFFF4B4C), + ), + ], + ), + ), + 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: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: HeadText, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ], + ), + ], + ), + ), ), - label: 'Offer', ), - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/profile.png'), + Padding( + padding: const EdgeInsets.only(left: 15), + child: InkWell( + onTap: () { + Navigator.push(context, + MaterialPageRoute(builder: (_) => businessdetail())); + }, + child: Container( + height: 150, + width: double.infinity, + margin: EdgeInsets.only(right: 15, top: 10), + decoration: BoxDecoration( + image: new DecorationImage( + image: ExactAssetImage( + 'assets/images/bg.png', + ), + fit: BoxFit.cover, + ), + borderRadius: BorderRadius.all(Radius.circular(5)), + ), + foregroundDecoration: BoxDecoration( + color: status2 ? null : Colors.grey, + backgroundBlendMode: + status2 ? null : BlendMode.saturation, + ), + child: Stack( + children: [ + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Padding( + padding: const EdgeInsets.only( + left: 15, right: 10, top: 75), + child: Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(), + child: RichText( + text: TextSpan( + text: "Barbeque Nation ", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w600, + fontSize: 15, + color: Colors.white, + ), + children: [ + TextSpan( + text: "4.2 ", + style: TextStyle( + fontFamily: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: 12, + color: Color(0xFFFFBE3F), + ), + ), + WidgetSpan( + child: Icon( + Icons.star, + color: Color(0xFFFFBE3F), + size: 18, + ), + ), + ], + ), + ), + ), + Spacer(), + FlutterSwitch( + width: 105, + height: 40, + valueFontSize: HeadText, + toggleSize: 25, + value: status2, + borderRadius: 30.0, + padding: 8.0, + showOnOff: true, + onToggle: (val) { + setState(() { + status2 = val; + }); + }, + activeText: "OPEN", + activeTextColor: Colors.white, + activeTextFontWeight: FontWeight.w600, + activeColor: Color(0xFF09CD99), + inactiveText: "CLOSED", + inactiveTextColor: Colors.white, + inactiveTextFontWeight: FontWeight.w600, + inactiveColor: Color(0xFFFF4B4C), + ), + ], + ), + ), + 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: Font, + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w400, + fontSize: HeadText, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ], + ), + ], + ), + ), ), - label: 'Profile', - ), - BottomNavigationBarItem( - icon: ImageIcon( - AssetImage('assets/images/setting.png'), - ), - label: 'Settings', ), ], - currentIndex: _selectedIndex, - selectedItemColor: primaryColor, - onTap: _onItemTapped, ), - ], - ), + ), + Spacer(), + BottomNavigationBar( + iconSize: 20, + unselectedFontSize: SubText, + selectedFontSize: SubText, + type: BottomNavigationBarType.fixed, + items: const [ + 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: primaryColor, + onTap: _onItemTapped, + ), + ], ), ); } diff --git a/openclosenew/lib/15_addbusinessdetails.dart b/openclosenew/lib/15_addbusinessdetails.dart index 724c9f5..72d5ecd 100644 --- a/openclosenew/lib/15_addbusinessdetails.dart +++ b/openclosenew/lib/15_addbusinessdetails.dart @@ -1,6 +1,6 @@ import 'package:flutter/material.dart'; -import 'package:openclosenew/businessdetail.dart'; import 'package:openclosenew/colors.dart'; +import 'package:openclosenew/pages/page_1.dart'; import '17-BusinessProfileFormSuccess.dart'; import 'FontFamily.dart'; @@ -277,10 +277,8 @@ class _addbusinessdetailsState extends State { shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(4)), onPressed: () { - Navigator.push( - context, - MaterialPageRoute( - builder: (_) => profileformsuccess())); + Navigator.push(context, + MaterialPageRoute(builder: (_) => page1())); }, child: Text( 'Save', diff --git a/openclosenew/lib/pages/page_1.dart b/openclosenew/lib/pages/page_1.dart index 34a97f3..c55d005 100644 --- a/openclosenew/lib/pages/page_1.dart +++ b/openclosenew/lib/pages/page_1.dart @@ -1,34 +1,61 @@ import 'package:flutter/material.dart'; +import 'package:flutter_switch/flutter_switch.dart'; +import 'package:openclosenew/14_businessdetailsempty.dart'; -class page1 extends StatelessWidget { +import '../FontFamily.dart'; +import '../colors.dart'; +import '../fontsize.dart'; + +class page1 extends StatefulWidget { const page1({Key? key}) : super(key: key); + @override + State createState() => _page1State(); +} + +class _page1State extends State { @override Widget build(BuildContext context) { - return Row( - children: [ - Text( - "From", - style: TextStyle( - fontFamily: "Manrope", - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w300, - fontSize: 15, - ), + return Container( + height: 500, + decoration: BoxDecoration(color: Colors.white), + child: SafeArea( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Padding( + padding: const EdgeInsets.only(left: 15, right: 24), + child: Row( + children: [ + Text( + "From", + style: TextStyle( + fontFamily: "Manrope", + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w300, + fontSize: 15, + color: DarkGray, + ), + ), + SizedBox( + width: 120, + ), + Text( + "To", + style: TextStyle( + fontFamily: "Manrope", + fontStyle: FontStyle.normal, + fontWeight: FontWeight.w300, + fontSize: 15, + color: DarkGray, + ), + ), + ], + ), + ), + ], ), - SizedBox( - width: 120, - ), - Text( - "To", - style: TextStyle( - fontFamily: "Manrope", - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w300, - fontSize: 15, - ), - ), - ], + ), ); } }