diff --git a/openclosenew/lib/07_addbusiness.dart b/openclosenew/lib/07_addbusiness.dart index 0431ed9..da4ab97 100644 --- a/openclosenew/lib/07_addbusiness.dart +++ b/openclosenew/lib/07_addbusiness.dart @@ -323,7 +323,7 @@ class _addbusinessState extends State { ), ), SizedBox( - height: 50, + height: 33, ), MaterialButton( height: 50, diff --git a/openclosenew/lib/11_busiesshome.dart b/openclosenew/lib/11_busiesshome.dart index 7523dbc..5de3b46 100644 --- a/openclosenew/lib/11_busiesshome.dart +++ b/openclosenew/lib/11_busiesshome.dart @@ -12,10 +12,9 @@ class businesshome extends StatefulWidget { } class _businesshomeState extends State { - bool status = false; - bool status1 = false; - bool status2 = false; - Color _imageColor = Color.fromRGBO(2989, 5870, 1140, 1); + bool status = true; + bool status1 = true; + bool status2 = true; int _selectedIndex = 0; static const TextStyle optionStyle = TextStyle( @@ -244,7 +243,7 @@ class _businesshomeState extends State { child: InkWell( onTap: () {}, child: Container( - width: 330, + width: 350, margin: EdgeInsets.only(right: 10), decoration: BoxDecoration( image: const DecorationImage( @@ -348,7 +347,7 @@ class _businesshomeState extends State { ], ), Container( - height: 420, + height: 400, child: ListView( scrollDirection: Axis.vertical, children: [ @@ -360,373 +359,388 @@ class _businesshomeState extends State { MaterialPageRoute(builder: (_) => businessdetail())); }, child: Container( - width: 170, - height: 200, + height: 180, margin: EdgeInsets.only(right: 15), decoration: BoxDecoration( - image: const DecorationImage( - image: AssetImage('assets/images/bg.png'), - fit: BoxFit.fitHeight, - ), - color: _imageColor, - borderRadius: BorderRadius.all( - Radius.circular(5), - ), + borderRadius: BorderRadius.all(Radius.circular(5)), ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, + foregroundDecoration: BoxDecoration( + color: status ? null : Colors.grey, + backgroundBlendMode: + status ? null : BlendMode.saturation, + ), + child: Stack( children: [ - Row( + Image.asset( + 'assets/images/bg.png', + height: 250, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( padding: const EdgeInsets.only( - left: 15, - top: 100, + 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: '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, + ), + ), + ], + ), + ), + ), + Spacer(), + 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), + ), + ], + ), + ), + Padding( + padding: const EdgeInsets.only( + left: 10, ), child: RichText( text: TextSpan( - text: "Barbeque Nation ", - style: TextStyle( - fontFamily: 'Manrope', - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w600, - fontSize: 18, - color: Colors.white, - ), children: [ + WidgetSpan( + child: Icon( + Icons.location_on_outlined, + color: Colors.white, + size: 20, + ), + ), TextSpan( - text: "42 ", + text: "Town Hall, Coimbatore", 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, + fontSize: 14, + color: Colors.white, ), ), ], ), ), ), - Spacer(), - Padding( - padding: const EdgeInsets.only( - top: 100, left: 3, right: 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; - if (val) { - _imageColor = - Color.fromRGBO(22, 27, 34, 1); - } else { - _imageColor = - Color.fromRGBO(36, 41, 46, 1); - } - }); - }, - 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: 'Manrope', - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: 14, - color: Colors.white, - ), - ), - ], - ), - ), - ), ], ), ), ), ), + Spacer(), Padding( - padding: const EdgeInsets.only(left: 15, top: 10), + padding: const EdgeInsets.only(left: 15), child: InkWell( - onTap: () {}, + onTap: () { + Navigator.push(context, + MaterialPageRoute(builder: (_) => businessdetail())); + }, child: Container( - width: 170, - height: 200, - margin: EdgeInsets.only(right: 15), + height: 185, + margin: EdgeInsets.only(right: 15, top: 10), decoration: BoxDecoration( - image: const DecorationImage( - image: AssetImage('assets/images/bg.png'), - fit: BoxFit.fitHeight, - ), - borderRadius: BorderRadius.all( - Radius.circular(5), - ), + borderRadius: BorderRadius.all(Radius.circular(5)), ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, + foregroundDecoration: BoxDecoration( + color: status1 ? null : Colors.grey, + backgroundBlendMode: + status1 ? null : BlendMode.saturation, + ), + child: Stack( children: [ - Row( + Image.asset( + 'assets/images/bg.png', + height: 250, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( padding: const EdgeInsets.only( - left: 15, - top: 100, + 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: '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, + ), + ), + ], + ), + ), + ), + Spacer(), + FlutterSwitch( + width: 105, + height: 40, + valueFontSize: 15, + 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( - text: "Barbeque Nation ", - style: TextStyle( - fontFamily: 'Manrope', - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w600, - fontSize: 18, - color: Colors.white, - ), children: [ + WidgetSpan( + child: Icon( + Icons.location_on_outlined, + color: Colors.white, + size: 20, + ), + ), TextSpan( - text: "42 ", + text: "Town Hall, Coimbatore", 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, + fontSize: 14, + color: Colors.white, ), ), ], ), ), ), - Spacer(), - Padding( - padding: const EdgeInsets.only( - top: 100, left: 3, right: 3), - child: FlutterSwitch( - width: 105, - height: 40, - valueFontSize: 15, - 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: 'Manrope', - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: 14, - color: Colors.white, - ), - ), - ], - ), - ), - ), ], ), ), ), ), + Spacer(), Padding( - padding: const EdgeInsets.only(left: 15, top: 10), + padding: const EdgeInsets.only(left: 15), child: InkWell( - onTap: () {}, + onTap: () { + Navigator.push(context, + MaterialPageRoute(builder: (_) => businessdetail())); + }, child: Container( - width: 170, - height: 200, - margin: EdgeInsets.only(right: 15), + height: 180, + margin: EdgeInsets.only(right: 15, top: 10), decoration: BoxDecoration( - image: const DecorationImage( - image: AssetImage('assets/images/bg.png'), - fit: BoxFit.fitHeight, - ), - borderRadius: BorderRadius.all( - Radius.circular(5), - ), + borderRadius: BorderRadius.all(Radius.circular(5)), ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisAlignment: MainAxisAlignment.center, + foregroundDecoration: BoxDecoration( + color: status2 ? null : Colors.grey, + backgroundBlendMode: + status2 ? null : BlendMode.saturation, + ), + child: Stack( children: [ - Row( + Image.asset( + 'assets/images/bg.png', + height: 250, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( padding: const EdgeInsets.only( - left: 15, - top: 100, + 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: '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, + ), + ), + ], + ), + ), + ), + Spacer(), + FlutterSwitch( + width: 105, + height: 40, + valueFontSize: 15, + 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( - text: "Barbeque Nation ", - style: TextStyle( - fontFamily: 'Manrope', - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w600, - fontSize: 18, - color: Colors.white, - ), children: [ + WidgetSpan( + child: Icon( + Icons.location_on_outlined, + color: Colors.white, + size: 20, + ), + ), TextSpan( - text: "42 ", + text: "Town Hall, Coimbatore", 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, + fontSize: 14, + color: Colors.white, ), ), ], ), ), ), - Spacer(), - Padding( - padding: const EdgeInsets.only( - top: 100, left: 3, right: 3), - child: FlutterSwitch( - width: 105, - height: 40, - valueFontSize: 15, - 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: 'Manrope', - fontStyle: FontStyle.normal, - fontWeight: FontWeight.w400, - fontSize: 14, - color: Colors.white, - ), - ), - ], - ), - ), - ), ], ), ),