import 'package:dotted_border/dotted_border.dart'; import 'package:flutter/material.dart'; import 'package:openclosenew/businessdetail.dart'; import 'package:openclosenew/colors.dart'; import 'FontFamily.dart'; import 'fontsize.dart'; class addproductfrom extends StatefulWidget { const addproductfrom({Key? key}) : super(key: key); @override State createState() => _addproductfromState(); } class _addproductfromState extends State { List> listDrop = []; String? selected = null; void loadData() { listDrop = []; listDrop.add(new DropdownMenuItem( child: new Text('Rice'), value: 'val-1', )); listDrop.add(new DropdownMenuItem( child: new Text('Others'), value: 'val-2', )); } bool status = false; @override Widget build(BuildContext context) { loadData(); return Scaffold( backgroundColor: White, body: SafeArea( child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( children: [ IconButton( icon: Icon(Icons.arrow_back, size: 24), onPressed: () { Navigator.pop(context); }, ), SizedBox( width: 20, ), Text( 'Add Food Item', style: TextStyle( fontSize: HeadText, color: DarkGray, fontFamily: Font, ), ), ], ), Padding( padding: const EdgeInsets.only(top: 20, left: 15, right: 15), child: Row( children: [ Expanded( child: MaterialButton( color: (status == true) ? White : primaryColor, height: 50, minWidth: double.infinity, shape: RoundedRectangleBorder( borderRadius: BorderRadius.only( topLeft: Radius.circular(4), bottomLeft: Radius.circular(4), ), ), onPressed: () { setState(() { status = !status; }); }, child: Text( "Veg", style: TextStyle( color: (status == true) ? Gray : White, fontSize: HeadText, fontFamily: Font, ), ), ), ), Expanded( child: MaterialButton( color: (status == true) ? primaryColor : White, height: 50, minWidth: double.infinity, shape: RoundedRectangleBorder( borderRadius: BorderRadius.only( topRight: Radius.circular(4), bottomRight: Radius.circular(4), ), ), onPressed: () { setState(() { status = !status; }); }, child: Text( "Non Veg", style: TextStyle( color: (status == true) ? White : Gray, fontSize: HeadText, fontFamily: Font, ), ), ), ), ], ), ), ], ), ), ); } }