BusinessAppFlutter/openclosenew/lib/20-ProductListing.dart

617 lines
27 KiB
Dart
Raw Permalink Normal View History

2022-06-16 04:20:58 +00:00
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();
}
2022-06-16 06:59:07 +00:00
class _ProductListingState extends State<ProductListing>
with TickerProviderStateMixin {
2022-06-16 04:20:58 +00:00
@override
Widget build(BuildContext context) {
2022-06-16 06:59:07 +00:00
TabController _tabController = TabController(length: 5, vsync: this);
2022-06-16 04:20:58 +00:00
return Scaffold(
body: SafeArea(
2022-06-16 06:59:07 +00:00
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,
2022-06-16 04:20:58 +00:00
),
2022-06-16 06:59:07 +00:00
),
SizedBox(width: 20),
Text(
'Food Items',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w500,
fontSize: HeadText,
color: DarkGray,
2022-06-16 04:20:58 +00:00
),
2022-06-16 06:59:07 +00:00
),
Spacer(),
InkWell(
onTap: () {},
child: Icon(
Icons.add,
color: DarkGray,
size: 24,
2022-06-16 04:20:58 +00:00
),
2022-06-16 06:59:07 +00:00
),
],
),
2022-06-17 06:53:49 +00:00
SizedBox(
height: 30,
),
2022-06-16 06:59:07 +00:00
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"),
],
),
2022-06-23 06:38:27 +00:00
SizedBox(height: 30),
2022-06-17 06:53:49 +00:00
Expanded(
child: ListView(
scrollDirection: Axis.vertical,
2022-06-16 06:59:07 +00:00
children: [
2022-06-17 06:53:49 +00:00
InkWell(
onTap: () {
BottomSheets(context);
},
child: Container(
2022-06-23 06:38:27 +00:00
height: 250,
2022-06-17 06:53:49 +00:00
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10)),
boxShadow: [
BoxShadow(
color: White,
offset: Offset(4.0, 4.0),
blurRadius: 10.0,
spreadRadius: 1.0,
),
],
),
child: Stack(
children: [
Column(
children: [
Image(
image: AssetImage(
'assets/images/Chicken_Briyani.png'),
),
Padding(
padding: const EdgeInsets.only(
top: 10, left: 15, right: 15),
child: Row(
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Chicken Briyani',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w500,
fontSize: HeadText,
color: DarkGray,
),
),
SizedBox(
height: 5,
),
Text(
'₹ 180.00',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600,
fontSize: HeadText,
color: DarkGray,
),
),
],
),
Spacer(),
Column(
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Container(
padding: EdgeInsets.only(
left: 5,
right: 5,
),
height: 25,
width: 50,
decoration: BoxDecoration(
color: Color(0xFFF0A30C),
borderRadius:
BorderRadius.circular(5),
),
child: Row(
children: [
Text(
'4.2',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: SubText,
color: White,
),
),
Spacer(),
Icon(
Icons.star_rate_rounded,
size: 20,
color: White,
)
],
),
),
SizedBox(
height: 5,
),
Text(
'56 ratings',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: SubText,
color: Gray,
),
),
],
),
],
),
),
],
),
],
),
),
),
2022-06-19 18:58:09 +00:00
SizedBox(height: 15),
InkWell(
onTap: () {},
child: Container(
2022-06-23 06:38:27 +00:00
height: 250,
2022-06-19 18:58:09 +00:00
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
boxShadow: [
BoxShadow(
color: White,
offset: Offset(4.0, 4.0),
blurRadius: 10.0,
spreadRadius: 1.0,
),
],
),
child: Stack(
children: [
Column(
children: [
Image(
image: AssetImage(
'assets/images/MuttonBriyani.png'),
),
Padding(
padding: const EdgeInsets.only(
top: 10, left: 15, right: 15),
child: Row(
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Mutton Briyani',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w500,
fontSize: HeadText,
color: DarkGray,
),
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
SizedBox(
height: 5,
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
Text(
'₹ 270.00',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600,
fontSize: HeadText,
color: DarkGray,
),
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
],
),
Spacer(),
Column(
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Container(
padding: EdgeInsets.only(
left: 5,
right: 5,
),
height: 25,
width: 50,
decoration: BoxDecoration(
color: Color(0xFFF0A30C),
borderRadius:
BorderRadius.circular(5),
),
child: Row(
children: [
Text(
'3.8',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: SubText,
color: White,
),
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
Spacer(),
Icon(
Icons.star_rate_rounded,
size: 20,
color: White,
)
],
),
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
SizedBox(
height: 5,
),
Text(
'56 ratings',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: SubText,
color: Gray,
),
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
],
),
],
),
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
],
),
],
),
2022-06-17 06:53:49 +00:00
),
),
2022-06-19 18:58:09 +00:00
SizedBox(height: 15),
InkWell(
onTap: () {},
child: Container(
2022-06-23 06:38:27 +00:00
height: 250,
2022-06-19 18:58:09 +00:00
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5),
boxShadow: [
BoxShadow(
color: White,
offset: Offset(4.0, 4.0),
blurRadius: 10.0,
spreadRadius: 1.0,
),
],
),
child: Stack(
children: [
Column(
children: [
Image(
image: AssetImage(
'assets/images/GrilledChicken.png'),
),
Padding(
padding: const EdgeInsets.only(
top: 10, left: 15, right: 15),
child: Row(
children: [
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text(
'Chicken Briyani',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w500,
fontSize: HeadText,
color: DarkGray,
),
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
SizedBox(
height: 5,
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
Text(
'₹ 180.00',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600,
fontSize: HeadText,
color: DarkGray,
),
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
],
),
Spacer(),
Column(
crossAxisAlignment:
CrossAxisAlignment.end,
children: [
Container(
padding: EdgeInsets.only(
left: 5,
right: 5,
),
height: 25,
width: 50,
decoration: BoxDecoration(
color: Color(0xFFF0A30C),
borderRadius:
BorderRadius.circular(5),
),
child: Row(
children: [
Text(
'4.2',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: SubText,
color: White,
),
),
Spacer(),
Icon(
Icons.star_rate_rounded,
size: 20,
2022-06-17 06:53:49 +00:00
color: White,
),
2022-06-19 18:58:09 +00:00
],
),
),
SizedBox(
height: 5,
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
Text(
'56 ratings',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: SubText,
color: Gray,
),
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
],
),
],
),
2022-06-17 06:53:49 +00:00
),
2022-06-19 18:58:09 +00:00
],
),
],
),
2022-06-17 06:53:49 +00:00
),
),
2022-06-16 04:20:58 +00:00
],
),
2022-06-19 18:58:09 +00:00
),
2022-06-16 06:59:07 +00:00
],
2022-06-16 04:20:58 +00:00
),
),
),
);
}
}
2022-06-17 06:53:49 +00:00
void BottomSheets(BuildContext context) {
showModalBottomSheet(
context: context,
builder: (context) => Container(
decoration: BoxDecoration(
2022-06-19 18:58:09 +00:00
borderRadius: BorderRadius.circular(50),
2022-06-17 06:53:49 +00:00
),
child: Column(
2022-06-19 18:58:09 +00:00
crossAxisAlignment: CrossAxisAlignment.start,
2022-06-17 06:53:49 +00:00
children: [
Image(
image: AssetImage('assets/images/Chicken_Briyani.png'),
),
2022-06-19 18:58:09 +00:00
Padding(
padding: const EdgeInsets.only(top: 20, left: 20, right: 20),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Image(
image: AssetImage('assets/images/nonveg_icon.png'),
height: 20,
width: 20,
),
2022-06-22 06:47:52 +00:00
SizedBox(width: 15),
2022-06-19 18:58:09 +00:00
Text('Non-Veg'),
Spacer(),
Column(
children: [
Container(
padding: EdgeInsets.only(
left: 5,
right: 5,
),
height: 25,
width: 50,
decoration: BoxDecoration(
color: Color(0xFFF0A30C),
borderRadius: BorderRadius.circular(5),
),
child: Row(
children: [
Text(
'4.2',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: SubText,
color: White,
),
),
Spacer(),
Icon(
Icons.star_rate_rounded,
size: 20,
color: White,
),
],
),
),
SizedBox(
height: 5,
),
Text(
'56 ratings',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: SubText,
color: Gray,
),
),
],
),
],
),
),
Padding(
padding: const EdgeInsets.only(left: 20, right: 20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'Chicken Briyani',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w500,
fontSize: TitleText,
color: DarkGray,
),
),
SizedBox(
height: 5,
),
Text(
'₹ 180.00',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w600,
fontSize: 20,
color: DarkGray,
),
),
SizedBox(
height: 15,
),
Text(
'Biryani is a mixed rice dish originating among the Muslims of the Indian subcontinent. It is made with Indian spices, rice, and usually some type of meat, and sometimes, in addition, eggs and potatoes. Biryani is one of the most popular dishes in South Asia',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: SubText,
color: DarkGray,
),
),
],
),
),
Spacer(),
Padding(
padding: const EdgeInsets.only(bottom: 25),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Image.asset(
'assets/images/edit_pen.png',
color: primaryColor,
width: 25,
height: 25,
),
SizedBox(width: 5),
Text(
'Edit',
style: TextStyle(
fontFamily: Font,
fontStyle: FontStyle.normal,
fontWeight: FontWeight.w400,
fontSize: SubText,
color: primaryColor,
),
),
],
),
2022-06-17 06:53:49 +00:00
),
],
),
),
);
}