product listing design started
This commit is contained in:
parent
6b7634e47f
commit
3df0b35f47
@ -1,6 +1,6 @@
|
||||
import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:openclosenew/businessdetail.dart';
|
||||
import 'package:openclosenew/20-ProductListing.dart';
|
||||
import 'package:openclosenew/colors.dart';
|
||||
|
||||
import 'FontFamily.dart';
|
||||
@ -35,16 +35,19 @@ class _addproductfromState extends State<addproductfrom> {
|
||||
loadData();
|
||||
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: White,
|
||||
body: SafeArea(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 10, left: 20, right: 20),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.arrow_back, size: 24),
|
||||
onPressed: () {
|
||||
InkWell(
|
||||
child: Icon(Icons.arrow_back, size: 24),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
),
|
||||
@ -61,9 +64,8 @@ class _addproductfromState extends State<addproductfrom> {
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 20, left: 15, right: 15),
|
||||
child: Row(
|
||||
Spacer(),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: MaterialButton(
|
||||
@ -119,8 +121,255 @@ class _addproductfromState extends State<addproductfrom> {
|
||||
),
|
||||
],
|
||||
),
|
||||
Spacer(),
|
||||
Text(
|
||||
'Item Name',
|
||||
style: TextStyle(
|
||||
fontFamily: Font,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
fontSize: HeadText,
|
||||
color: DarkGray,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
TextField(
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.only(left: 10, right: 10),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
hintText: 'Type here...',
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Text(
|
||||
'Category',
|
||||
style: TextStyle(
|
||||
fontFamily: Font,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
fontSize: HeadText,
|
||||
color: DarkGray,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
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(() {});
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Text(
|
||||
'Price',
|
||||
style: TextStyle(
|
||||
fontFamily: Font,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
fontSize: HeadText,
|
||||
color: DarkGray,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
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',
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Text(
|
||||
'Description',
|
||||
style: TextStyle(
|
||||
fontFamily: Font,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
fontSize: HeadText,
|
||||
color: DarkGray,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
TextField(
|
||||
maxLines: 3,
|
||||
decoration: InputDecoration(
|
||||
contentPadding:
|
||||
EdgeInsets.only(top: 10, left: 10, right: 10, bottom: 10),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
hintText: 'Type here...',
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Text(
|
||||
'Upload photo',
|
||||
style: TextStyle(
|
||||
fontFamily: Font,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
fontSize: HeadText,
|
||||
color: DarkGray,
|
||||
),
|
||||
),
|
||||
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: Font,
|
||||
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: Font,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
color: DarkGray,
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 50,
|
||||
),
|
||||
IconButton(
|
||||
onPressed: () {},
|
||||
icon: Icon(Icons.image_rounded),
|
||||
iconSize: 30,
|
||||
),
|
||||
Text(
|
||||
'Gallery',
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontFamily: Font,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w300,
|
||||
color: DarkGray,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
child: DottedBorder(
|
||||
padding: EdgeInsets.all(45),
|
||||
dashPattern: [4, 4, 4, 4],
|
||||
radius: Radius.circular(10),
|
||||
color: primaryColor,
|
||||
child: Image.asset(
|
||||
'assets/images/insert_logo.png',
|
||||
width: 30,
|
||||
height: 30,
|
||||
color: primaryColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 24),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
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: MaterialButton(
|
||||
height: 50,
|
||||
minWidth: double.infinity,
|
||||
color: primaryColor,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(4)),
|
||||
onPressed: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (_) => ProductListing()));
|
||||
},
|
||||
child: Text(
|
||||
'Save',
|
||||
style: TextStyle(
|
||||
color: White,
|
||||
fontSize: HeadText,
|
||||
fontFamily: Font,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
65
openclosenew/lib/20-ProductListing.dart
Normal file
65
openclosenew/lib/20-ProductListing.dart
Normal file
@ -0,0 +1,65 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:openclosenew/FontFamily.dart';
|
||||
import 'package:openclosenew/colors.dart';
|
||||
|
||||
import 'fontsize.dart';
|
||||
|
||||
class ProductListing extends StatefulWidget {
|
||||
const ProductListing({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ProductListing> createState() => _ProductListingState();
|
||||
}
|
||||
|
||||
class _ProductListingState extends State<ProductListing> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: SafeArea(
|
||||
child: SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 20, right: 15, top: 10),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Icon(
|
||||
Icons.arrow_back,
|
||||
color: DarkGray,
|
||||
size: 24,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 20),
|
||||
Text(
|
||||
'Food Items',
|
||||
style: TextStyle(
|
||||
fontFamily: Font,
|
||||
fontStyle: FontStyle.normal,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: HeadText,
|
||||
color: DarkGray,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
InkWell(
|
||||
onTap: () {},
|
||||
child: Icon(
|
||||
Icons.add,
|
||||
color: DarkGray,
|
||||
size: 24,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user