import 'package:flutter/material.dart'; import 'package:openclosenew/colors.dart'; import '17-BusinessProfileFormSuccess.dart'; import 'FontFamily.dart'; import 'fontsize.dart'; class addbusinessdetails extends StatefulWidget { const addbusinessdetails({Key? key}) : super(key: key); @override State createState() => _addbusinessdetailsState(); } class _addbusinessdetailsState extends State { var _fields = ['All Days', 'Specific days & timing']; var _currentItemSelected = 'All Days'; TimeOfDay _TimeofDay = TimeOfDay(hour: 8, minute: 30); void _showTimePicker() { showTimePicker( context: context, initialTime: TimeOfDay.now(), ).then((value) { setState(() { _TimeofDay = value!; }); }); } TimeOfDay _TimeofDay1 = TimeOfDay(hour: 8, minute: 30); void _showTimePicker1() { showTimePicker( context: context, initialTime: TimeOfDay.now(), ).then((value) { setState(() { _TimeofDay1 = value!; }); }); } @override Widget build(BuildContext context) { return Scaffold( body: SafeArea( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: const EdgeInsets.only(left: 15, right: 24), child: Row( children: [ IconButton( icon: Icon(Icons.arrow_back, size: 24), onPressed: () { Navigator.pop(context); }, ), SizedBox( width: 20, ), Text( 'Add Business Detail', style: TextStyle( fontSize: HeadText, color: DarkGray, fontFamily: Font, ), ), ], ), ), Padding( padding: const EdgeInsets.only(top: 30, left: 30, right: 20), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( "Website", style: TextStyle( fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w300, fontSize: HeadText, color: DarkGray, ), ), SizedBox( height: 10, ), TextField( decoration: InputDecoration( border: InputBorder.none, hintText: "Add if you have...", ), ), SizedBox( height: 15, ), Text( "Your working days & hours", style: TextStyle( fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w300, fontSize: HeadText, color: DarkGray, ), ), SizedBox( height: 15, ), Row( children: [ Expanded( child: DropdownButtonHideUnderline( child: DropdownButton( icon: Icon(Icons.keyboard_arrow_down_rounded), items: _fields.map((String dropdownStringItem) { return DropdownMenuItem( value: dropdownStringItem, child: Text(dropdownStringItem), ); }).toList(), onChanged: (value) {}, value: _currentItemSelected, ), ), ), ], ), SizedBox( height: 10, ), Row( children: [ Text( "From", style: TextStyle( fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w300, fontSize: HeadText, color: DarkGray, ), ), SizedBox( width: 120, ), Text( "To", style: TextStyle( fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w300, fontSize: HeadText, color: DarkGray, ), ), ], ), SizedBox( height: 10, ), Row( mainAxisAlignment: MainAxisAlignment.start, children: [ InkWell( onTap: () { _showTimePicker(); }, child: Container( padding: EdgeInsets.all(10), alignment: Alignment.centerLeft, height: 40, width: 150, decoration: BoxDecoration( border: Border.all( color: Color(0xFFE6E6E6), ), borderRadius: BorderRadius.only( topLeft: Radius.circular(5), bottomLeft: Radius.circular(5), ), ), child: Row( children: [ Text( _TimeofDay.format(context).toString(), style: TextStyle( fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w400, fontSize: HeadText, color: DarkGray, ), ), Spacer(), Icon(Icons.access_time) ], ), ), ), InkWell( onTap: () { _showTimePicker1(); }, child: Container( padding: EdgeInsets.all(10), alignment: Alignment.centerLeft, height: 40, width: 150, decoration: BoxDecoration( border: Border.all( color: Color(0xFFE6E6E6), ), borderRadius: BorderRadius.only( topRight: Radius.circular(5), bottomRight: Radius.circular(5), ), ), child: Row( children: [ Text( _TimeofDay1.format(context).toString(), style: TextStyle( fontFamily: Font, fontStyle: FontStyle.normal, fontWeight: FontWeight.w400, fontSize: HeadText, color: DarkGray, ), ), Spacer(), Icon(Icons.access_time) ], ), ), ), ], ), ], ), ), Spacer(), Row( children: [ Expanded( child: Padding( padding: const EdgeInsets.only(left: 24, bottom: 24), child: MaterialButton( height: 50, minWidth: double.infinity, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(4)), onPressed: () { Navigator.pop(context); }, child: Text( "Cancel", style: TextStyle( color: Gray, fontFamily: Font, ), ), ), ), ), Expanded( child: Padding( padding: const EdgeInsets.only(right: 24, bottom: 24), child: MaterialButton( height: 50, minWidth: double.infinity, color: primaryColor, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(4)), onPressed: () { Navigator.push( context, MaterialPageRoute( builder: (_) => profileformsuccess())); }, child: Text( 'Save', style: TextStyle( color: White, fontSize: HeadText, fontFamily: Font, ), ), ), ), ), ], ), ], ), ), ); } }