2022-06-10 06:39:59 +00:00
|
|
|
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<addproductfrom> createState() => _addproductfromState();
|
|
|
|
}
|
|
|
|
|
|
|
|
class _addproductfromState extends State<addproductfrom> {
|
|
|
|
List<DropdownMenuItem<String>> 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;
|
2022-06-13 13:53:56 +00:00
|
|
|
|
2022-06-10 06:39:59 +00:00
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
loadData();
|
2022-06-13 13:53:56 +00:00
|
|
|
|
2022-06-10 06:39:59 +00:00
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: White,
|
|
|
|
body: SafeArea(
|
|
|
|
child: Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
2022-06-13 13:53:56 +00:00
|
|
|
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,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
2022-06-10 06:39:59 +00:00
|
|
|
Padding(
|
2022-06-13 13:53:56 +00:00
|
|
|
padding: const EdgeInsets.only(top: 20, left: 15, right: 15),
|
2022-06-10 06:39:59 +00:00
|
|
|
child: Row(
|
|
|
|
children: [
|
2022-06-13 13:53:56 +00:00
|
|
|
Expanded(
|
2022-06-10 06:39:59 +00:00
|
|
|
child: MaterialButton(
|
2022-06-13 13:53:56 +00:00
|
|
|
color: (status == true) ? White : primaryColor,
|
2022-06-10 06:39:59 +00:00
|
|
|
height: 50,
|
|
|
|
minWidth: double.infinity,
|
|
|
|
shape: RoundedRectangleBorder(
|
2022-06-13 13:53:56 +00:00
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(4),
|
|
|
|
bottomLeft: Radius.circular(4),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onPressed: () {
|
|
|
|
setState(() {
|
|
|
|
status = !status;
|
|
|
|
});
|
|
|
|
},
|
2022-06-10 06:39:59 +00:00
|
|
|
child: Text(
|
|
|
|
"Veg",
|
|
|
|
style: TextStyle(
|
2022-06-13 13:53:56 +00:00
|
|
|
color: (status == true) ? Gray : White,
|
|
|
|
fontSize: HeadText,
|
2022-06-10 06:39:59 +00:00
|
|
|
fontFamily: Font,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2022-06-13 13:53:56 +00:00
|
|
|
Expanded(
|
2022-06-10 06:39:59 +00:00
|
|
|
child: MaterialButton(
|
2022-06-13 13:53:56 +00:00
|
|
|
color: (status == true) ? primaryColor : White,
|
2022-06-10 06:39:59 +00:00
|
|
|
height: 50,
|
|
|
|
minWidth: double.infinity,
|
|
|
|
shape: RoundedRectangleBorder(
|
2022-06-13 13:53:56 +00:00
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topRight: Radius.circular(4),
|
|
|
|
bottomRight: Radius.circular(4),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onPressed: () {
|
|
|
|
setState(() {
|
|
|
|
status = !status;
|
|
|
|
});
|
|
|
|
},
|
2022-06-10 06:39:59 +00:00
|
|
|
child: Text(
|
2022-06-13 13:53:56 +00:00
|
|
|
"Non Veg",
|
2022-06-10 06:39:59 +00:00
|
|
|
style: TextStyle(
|
2022-06-13 13:53:56 +00:00
|
|
|
color: (status == true) ? White : Gray,
|
2022-06-10 06:39:59 +00:00
|
|
|
fontSize: HeadText,
|
|
|
|
fontFamily: Font,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
2022-06-13 13:53:56 +00:00
|
|
|
],
|
|
|
|
),
|
2022-06-10 06:39:59 +00:00
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|