277 lines
10 KiB
Dart
277 lines
10 KiB
Dart
|
import 'package:dotted_border/dotted_border.dart';
|
||
|
import 'package:flutter/material.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('Non-Veg'),
|
||
|
value: 'val-1',
|
||
|
));
|
||
|
listDrop.add(new DropdownMenuItem(
|
||
|
child: new Text('Veg'),
|
||
|
value: 'val-2',
|
||
|
));
|
||
|
}
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
loadData();
|
||
|
return Scaffold(
|
||
|
body: SingleChildScrollView(
|
||
|
child: SafeArea(
|
||
|
child: Column(
|
||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||
|
children: [
|
||
|
Padding(
|
||
|
padding: const EdgeInsets.only(left: 10),
|
||
|
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: 15,
|
||
|
color: Color(0xff3D3D3D),
|
||
|
fontFamily: 'assets/fonts/Manrope-Medium.ttf',
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
Padding(
|
||
|
padding: const EdgeInsets.only(left: 25, top: 20, right: 20),
|
||
|
child: Column(
|
||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||
|
children: [
|
||
|
Text(
|
||
|
'Item Name',
|
||
|
style: TextStyle(
|
||
|
fontFamily: 'Manrope',
|
||
|
fontStyle: FontStyle.normal,
|
||
|
fontWeight: FontWeight.w300,
|
||
|
fontSize: 15,
|
||
|
color: Color(0xff333333),
|
||
|
),
|
||
|
),
|
||
|
SizedBox(
|
||
|
height: 20,
|
||
|
),
|
||
|
TextField(
|
||
|
decoration: InputDecoration(
|
||
|
contentPadding:
|
||
|
EdgeInsets.only(left: 10, top: 10, bottom: 10),
|
||
|
border: OutlineInputBorder(
|
||
|
borderRadius: BorderRadius.circular(5)),
|
||
|
hintText: 'Type here...',
|
||
|
),
|
||
|
),
|
||
|
SizedBox(
|
||
|
height: 20,
|
||
|
),
|
||
|
Text(
|
||
|
'Category',
|
||
|
style: TextStyle(
|
||
|
fontFamily: 'Manrope',
|
||
|
fontStyle: FontStyle.normal,
|
||
|
fontWeight: FontWeight.w300,
|
||
|
fontSize: 15,
|
||
|
color: Color(0xff333333),
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
SizedBox(
|
||
|
height: 20,
|
||
|
),
|
||
|
Padding(
|
||
|
padding: const EdgeInsets.only(left: 25, right: 20),
|
||
|
child: Expanded(
|
||
|
child: InputDecorator(
|
||
|
decoration: InputDecoration(
|
||
|
contentPadding: EdgeInsets.only(
|
||
|
left: 10, top: 1, bottom: 1, right: 5),
|
||
|
border: OutlineInputBorder(
|
||
|
borderRadius: BorderRadius.all(Radius.circular(5)),
|
||
|
),
|
||
|
),
|
||
|
child: DropdownButtonHideUnderline(
|
||
|
child: new DropdownButton(
|
||
|
borderRadius: BorderRadius.circular(5),
|
||
|
value: selected,
|
||
|
items: listDrop,
|
||
|
icon: Icon(Icons.keyboard_arrow_down, size: 24),
|
||
|
hint: new Text('Choose...'),
|
||
|
onChanged: (value) {
|
||
|
selected = value as String?;
|
||
|
setState(() {});
|
||
|
},
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
SizedBox(
|
||
|
height: 20,
|
||
|
),
|
||
|
Padding(
|
||
|
padding: const EdgeInsets.only(left: 25),
|
||
|
child: Text(
|
||
|
'Price',
|
||
|
style: TextStyle(
|
||
|
fontFamily: 'Manrope',
|
||
|
fontStyle: FontStyle.normal,
|
||
|
fontWeight: FontWeight.w300,
|
||
|
fontSize: 15,
|
||
|
color: Color(0xff333333),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
SizedBox(
|
||
|
height: 20,
|
||
|
),
|
||
|
Padding(
|
||
|
padding: const EdgeInsets.only(left: 25, right: 20),
|
||
|
child: TextField(
|
||
|
keyboardType: TextInputType.number,
|
||
|
decoration: InputDecoration(
|
||
|
prefixIcon: Image.asset(
|
||
|
'assets/images/dollor.png',
|
||
|
width: 10,
|
||
|
height: 10,
|
||
|
),
|
||
|
contentPadding:
|
||
|
EdgeInsets.only(left: 10, top: 10, bottom: 10),
|
||
|
border: OutlineInputBorder(
|
||
|
borderRadius: BorderRadius.circular(5),
|
||
|
),
|
||
|
hintText: '00.00',
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
SizedBox(
|
||
|
height: 20,
|
||
|
),
|
||
|
Padding(
|
||
|
padding: const EdgeInsets.only(left: 25),
|
||
|
child: Text(
|
||
|
'Upload photo',
|
||
|
style: TextStyle(
|
||
|
fontFamily: 'Manrope',
|
||
|
fontStyle: FontStyle.normal,
|
||
|
fontWeight: FontWeight.w300,
|
||
|
fontSize: 15,
|
||
|
color: Color(0xff333333),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
InkWell(
|
||
|
onTap: () {
|
||
|
showModalBottomSheet<void>(
|
||
|
context: context,
|
||
|
builder: (BuildContext context) {
|
||
|
return Container(
|
||
|
height: 200,
|
||
|
color: Colors.white,
|
||
|
child: Center(
|
||
|
child: Column(
|
||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||
|
children: <Widget>[
|
||
|
SizedBox(
|
||
|
height: 20,
|
||
|
),
|
||
|
Text(
|
||
|
"Choose You Image",
|
||
|
style: TextStyle(
|
||
|
fontSize: 20,
|
||
|
fontFamily: 'Manrope',
|
||
|
fontStyle: FontStyle.normal,
|
||
|
fontWeight: FontWeight.bold),
|
||
|
),
|
||
|
SizedBox(height: 30),
|
||
|
Row(
|
||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||
|
children: [
|
||
|
IconButton(
|
||
|
onPressed: () {},
|
||
|
icon: Icon(Icons.camera),
|
||
|
iconSize: 30,
|
||
|
),
|
||
|
Text(
|
||
|
'Camera',
|
||
|
style: TextStyle(
|
||
|
fontSize: 15,
|
||
|
fontFamily: 'Manrope',
|
||
|
fontStyle: FontStyle.normal,
|
||
|
fontWeight: FontWeight.w300,
|
||
|
color: Color(0xFF333333),
|
||
|
),
|
||
|
),
|
||
|
SizedBox(
|
||
|
width: 50,
|
||
|
),
|
||
|
IconButton(
|
||
|
onPressed: () {},
|
||
|
icon: Icon(Icons.image_rounded),
|
||
|
iconSize: 30,
|
||
|
),
|
||
|
Text(
|
||
|
'Gallery',
|
||
|
style: TextStyle(
|
||
|
fontSize: 15,
|
||
|
fontFamily: 'Manrope',
|
||
|
fontStyle: FontStyle.normal,
|
||
|
fontWeight: FontWeight.w300,
|
||
|
color: Color(0xFF333333),
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
)
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
},
|
||
|
);
|
||
|
},
|
||
|
child: Padding(
|
||
|
padding: const EdgeInsets.only(left: 25, top: 5),
|
||
|
child: DottedBorder(
|
||
|
padding: EdgeInsets.all(45),
|
||
|
dashPattern: [4, 4, 4, 4],
|
||
|
radius: Radius.circular(10),
|
||
|
color: Color(0xFF09CD99),
|
||
|
child: Image.asset(
|
||
|
'assets/images/insert_logo.png',
|
||
|
width: 30,
|
||
|
height: 30,
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|