product list design doing

This commit is contained in:
vignesh 2022-06-16 12:29:07 +05:30
parent 68cd428be9
commit eac4d21d96
3 changed files with 118 additions and 418 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 708 KiB

View File

@ -2,13 +2,11 @@ import 'package:dotted_border/dotted_border.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:openclosenew/20-ProductListing.dart'; import 'package:openclosenew/20-ProductListing.dart';
import 'package:openclosenew/colors.dart'; import 'package:openclosenew/colors.dart';
import 'FontFamily.dart'; import 'FontFamily.dart';
import 'fontsize.dart'; import 'fontsize.dart';
class addproductfrom extends StatefulWidget { class addproductfrom extends StatefulWidget {
const addproductfrom({Key? key}) : super(key: key); const addproductfrom({Key? key}) : super(key: key);
@override @override
State<addproductfrom> createState() => _addproductfromState(); State<addproductfrom> createState() => _addproductfromState();
} }
@ -29,26 +27,19 @@ class _addproductfromState extends State<addproductfrom> {
} }
bool status = false; bool status = false;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
loadData(); loadData();
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: false, resizeToAvoidBottomInset: false,
backgroundColor: White, backgroundColor: White,
body: SafeArea( body: SafeArea(
<<<<<<< HEAD
child: Padding( child: Padding(
padding: const EdgeInsets.only(top: 10, left: 20, right: 20), padding: const EdgeInsets.only(top: 10, left: 20, right: 20),
=======
child: SingleChildScrollView(
>>>>>>> 1bac9350fef3aa7e3830178bea6bf079700678b9
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Row(
<<<<<<< HEAD
children: [ children: [
InkWell( InkWell(
child: Icon(Icons.arrow_back, size: 24), child: Icon(Icons.arrow_back, size: 24),
@ -71,387 +62,61 @@ class _addproductfromState extends State<addproductfrom> {
), ),
Spacer(), Spacer(),
Row( Row(
=======
>>>>>>> 1bac9350fef3aa7e3830178bea6bf079700678b9
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: 40,
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: 40,
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,
),
),
),
),
],
),
),
Padding(
padding: const EdgeInsets.only(left: 25, top: 15, right: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Item Name',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w300,
fontSize: HeadText,
color: DarkGray,
),
),
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: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w300,
fontSize: HeadText,
color: DarkGray,
),
),
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: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w300,
fontSize: HeadText,
color: DarkGray,
),
),
),
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(
'Description',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w300,
fontSize: HeadText,
color: DarkGray,
),
),
),
SizedBox(
height: 20,
),
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,
),
Padding(
padding: const EdgeInsets.only(left: 25),
child: 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: 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: primaryColor,
child: Image.asset(
'assets/images/insert_logo.png',
width: 30,
height: 30,
color: primaryColor,
),
),
),
),
SizedBox(
height: 55,
),
Row(
children: [ children: [
Expanded( Expanded(
child: Padding( child: MaterialButton(
padding: const EdgeInsets.only(left: 24, bottom: 24), color: (status == true) ? White : primaryColor,
child: MaterialButton( height: 50,
height: 50, minWidth: double.infinity,
minWidth: double.infinity, shape: RoundedRectangleBorder(
shape: RoundedRectangleBorder( borderRadius: BorderRadius.only(
borderRadius: BorderRadius.circular(4)), topLeft: Radius.circular(4),
onPressed: () { bottomLeft: Radius.circular(4),
Navigator.pop(context); ),
}, ),
child: Text( onPressed: () {
"Cancel", setState(() {
style: TextStyle( status = !status;
color: Gray, });
fontFamily: Font, },
), child: Text(
"Veg",
style: TextStyle(
color: (status == true) ? Gray : White,
fontSize: HeadText,
fontFamily: Font,
), ),
), ),
), ),
), ),
Expanded( Expanded(
child: Padding( child: MaterialButton(
padding: const EdgeInsets.only(right: 24, bottom: 24), color: (status == true) ? primaryColor : White,
child: MaterialButton( height: 50,
height: 50, minWidth: double.infinity,
minWidth: double.infinity, shape: RoundedRectangleBorder(
color: primaryColor, borderRadius: BorderRadius.only(
shape: RoundedRectangleBorder( topRight: Radius.circular(4),
borderRadius: BorderRadius.circular(4)), bottomRight: Radius.circular(4),
onPressed: () { ),
Navigator.push( ),
context, onPressed: () {
MaterialPageRoute( setState(() {
builder: (_) => businessdetail())); status = !status;
}, });
child: Text( },
'Save', child: Text(
style: TextStyle( "Non Veg",
color: White, style: TextStyle(
fontSize: HeadText, color: (status == true) ? White : Gray,
fontFamily: Font, fontSize: HeadText,
), fontFamily: Font,
), ),
), ),
), ),
), ),
], ],
), ),
<<<<<<< HEAD
Spacer(), Spacer(),
Text( Text(
'Item Name', 'Item Name',
@ -699,8 +364,6 @@ class _addproductfromState extends State<addproductfrom> {
], ],
), ),
), ),
=======
>>>>>>> 1bac9350fef3aa7e3830178bea6bf079700678b9
], ],
), ),
), ),

View File

@ -11,52 +11,89 @@ class ProductListing extends StatefulWidget {
State<ProductListing> createState() => _ProductListingState(); State<ProductListing> createState() => _ProductListingState();
} }
class _ProductListingState extends State<ProductListing> { class _ProductListingState extends State<ProductListing>
with TickerProviderStateMixin {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
TabController _tabController = TabController(length: 5, vsync: this);
return Scaffold( return Scaffold(
body: SafeArea( body: SafeArea(
child: SingleChildScrollView( child: Padding(
child: Padding( padding: const EdgeInsets.only(left: 20, right: 15, top: 10),
padding: const EdgeInsets.only(left: 20, right: 15, top: 10), child: Column(
child: Column( children: [
children: [ Row(
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,
),
),
],
),
Spacer(),
TabBar(
indicator: BoxDecoration(
color: primaryColor,
borderRadius: BorderRadius.circular(4)),
isScrollable: true,
labelColor: White,
unselectedLabelColor: Gray,
controller: _tabController,
labelStyle: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: 15,
),
tabs: [
Tab(text: "All"),
Tab(text: "Rice"),
Tab(text: "Starters"),
Tab(text: "Breads"),
Tab(text: "North In"),
],
),
Container(
width: double.maxFinite,
height: 600,
child: TabBarView(
controller: _tabController,
children: [ children: [
InkWell( Text('data'),
onTap: () { Text('data'),
Navigator.pop(context); Text('data'),
}, Text('data'),
child: Icon( Text('data'),
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,
),
),
], ],
), ),
], ),
), ],
), ),
), ),
), ),