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 createState() => _businessdetailState(); } class _businessdetailState extends State { bool status = true; @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, body: Column( children: [ SafeArea( 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), ), mini: true, backgroundColor: Colors.white, onPressed: () { Navigator.pop(context); }, ), Spacer(), FlutterSwitch( width: 107, height: 50, valueFontSize: 12, toggleSize: 20, value: status, borderRadius: 30.0, padding: 5, showOnOff: true, onToggle: (val) { setState(() { status = val; }); }, activeText: "OPEN", activeSwitchBorder: Border.all(color: Colors.white, width: 10), inactiveSwitchBorder: Border.all(color: Colors.white, width: 10), activeTextColor: Colors.white, activeTextFontWeight: FontWeight.w600, activeColor: Color(0xFF09CD99), inactiveText: "CLOSED", inactiveTextColor: Colors.white, inactiveTextFontWeight: FontWeight.w600, inactiveColor: Color(0xFFFF4B4C), ), ], ), ), ), Spacer(), Align( alignment: Alignment.center, child: Container( margin: EdgeInsets.only(right: 20, left: 20, top: 60), padding: EdgeInsets.all(15), height: 300, decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.all( Radius.circular(10), ), boxShadow: [ BoxShadow( color: Colors.grey.shade500, offset: Offset(4.0, 4.0), blurRadius: 10.0, spreadRadius: 1.0, ), ], ), child: Column( children: [ Row( crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: [ 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: 16, color: Colors.black, ), ), ), RichText( text: TextSpan( children: [ TextSpan( text: "4.2 ", style: TextStyle( fontFamily: 'Manrope', fontStyle: FontStyle.normal, fontWeight: FontWeight.w400, fontSize: 15, color: Color(0xFFFFBE3F), ), ), WidgetSpan( child: Icon( Icons.star, color: Color(0xFFFFBE3F), size: 15, ), ), ], ), ), ], ), ), Spacer(), IconButton( icon: Image.asset( 'assets/images/edit_pen.png', color: Colors.black, ), onPressed: () { Navigator.pop(context); }, ), ], ), Spacer(), Align( alignment: Alignment.topLeft, child: Padding( padding: const EdgeInsets.only(left: 10), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ Image.asset( 'assets/images/veg_logo.png', width: 20, height: 20, ), SizedBox( width: 10, ), Text( 'Veg', style: TextStyle( fontFamily: 'Manrope', fontStyle: FontStyle.normal, fontWeight: FontWeight.w400, fontSize: 15, ), ), SizedBox( width: 10, ), Image.asset( 'assets/images/nonveg_icon.png', width: 20, height: 20, ), SizedBox( width: 10, ), Text( 'Non-Veg', style: TextStyle( fontFamily: 'Manrope', fontStyle: FontStyle.normal, fontWeight: FontWeight.w400, fontSize: 15, ), ), ], ), Row( children: [ Padding( padding: const EdgeInsets.only(top: 10), child: RichText( text: TextSpan( children: [ WidgetSpan( child: Image.asset( 'assets/images/call_icon.png', width: 25, height: 25, ), ), TextSpan( text: "+91 98651 76796, +91 76786 85869", style: TextStyle( fontFamily: 'Manrope', fontStyle: FontStyle.normal, fontWeight: FontWeight.w500, fontSize: 15, color: Color(0xFF5C5C5C), ), ), ], ), ), ), ], ), RichText( text: TextSpan( children: [ WidgetSpan( child: Image.asset( 'assets/images/loc_logo.png', width: 25, height: 25, ), ), TextSpan( text: "112, Avinashi Road, Peelamedu, Coimbatore...", style: TextStyle( fontFamily: 'Manrope', fontStyle: FontStyle.normal, fontWeight: FontWeight.w500, fontSize: 15, color: Color(0xFF5C5C5C), ), ), ], ), ), RichText( text: TextSpan( children: [ WidgetSpan( child: Image.asset( 'assets/images/glob_icon.png', width: 25, height: 25, ), ), TextSpan( text: "www.bbqnation.com", style: TextStyle( fontFamily: 'Manrope', fontStyle: FontStyle.normal, fontWeight: FontWeight.w500, fontSize: 15, color: Color(0xFF5C5C5C), ), ), ], ), ), RichText( text: TextSpan( children: [ WidgetSpan( child: Image.asset( 'assets/images/clock_icon.png', width: 25, height: 25, ), ), TextSpan( text: "Working Hours: Mon - Fri 9:00am to 9:00pm", style: TextStyle( fontFamily: 'Manrope', fontStyle: FontStyle.normal, fontWeight: FontWeight.w500, fontSize: 15, color: Color(0xFF5C5C5C), ), ), ], ), ), ], ), ), ), ], ), ), ), ], ), ), ), ], ), ); } }