BASE: Update Icons & Name Of The App.
This commit is contained in:
@@ -6,7 +6,7 @@ import 'package:customer/themes/responsive.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../../../widget/restaurant_image_view.dart';
|
||||
import '../restaurant_details_screen/restaurant_details_screen.dart';
|
||||
@@ -22,7 +22,12 @@ class CategoryRestaurantScreen extends StatelessWidget {
|
||||
init: CategoryRestaurantController(),
|
||||
builder: (controller) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface, centerTitle: false, titleSpacing: 0),
|
||||
appBar: AppBar(
|
||||
backgroundColor:
|
||||
isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
),
|
||||
body:
|
||||
controller.isLoading.value
|
||||
? Constant.loader()
|
||||
@@ -34,33 +39,62 @@ class CategoryRestaurantScreen extends StatelessWidget {
|
||||
shrinkWrap: true,
|
||||
itemCount: controller.allNearestRestaurant.length,
|
||||
itemBuilder: (context, index) {
|
||||
VendorModel vendorModel = controller.allNearestRestaurant[index];
|
||||
VendorModel vendorModel =
|
||||
controller.allNearestRestaurant[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Get.to(const RestaurantDetailsScreen(), arguments: {"vendorModel": vendorModel});
|
||||
Get.to(
|
||||
const RestaurantDetailsScreen(),
|
||||
arguments: {"vendorModel": vendorModel},
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Container(
|
||||
decoration: ShapeDecoration(color: isDark ? AppThemeData.grey900 : AppThemeData.grey50, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16))),
|
||||
decoration: ShapeDecoration(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey900
|
||||
: AppThemeData.grey50,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Stack(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: const BorderRadius.only(topLeft: Radius.circular(16), topRight: Radius.circular(16)),
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
RestaurantImageView(vendorModel: vendorModel),
|
||||
RestaurantImageView(
|
||||
vendorModel: vendorModel,
|
||||
),
|
||||
Container(
|
||||
height: Responsive.height(20, context),
|
||||
width: Responsive.width(100, context),
|
||||
height: Responsive.height(
|
||||
20,
|
||||
context,
|
||||
),
|
||||
width: Responsive.width(
|
||||
100,
|
||||
context,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(-0.00, -1.00),
|
||||
begin: const Alignment(
|
||||
-0.00,
|
||||
-1.00,
|
||||
),
|
||||
end: const Alignment(0, 1),
|
||||
colors: [Colors.black.withOpacity(0), const Color(0xFF111827)],
|
||||
colors: [
|
||||
Colors.black.withOpacity(0),
|
||||
const Color(0xFF111827),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -68,28 +102,60 @@ class CategoryRestaurantScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Transform.translate(
|
||||
offset: Offset(Responsive.width(-3, context), Responsive.height(17.5, context)),
|
||||
offset: Offset(
|
||||
Responsive.width(-3, context),
|
||||
Responsive.height(17.5, context),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.end,
|
||||
children: [
|
||||
Visibility(
|
||||
visible: (vendorModel.isSelfDelivery == true && Constant.isSelfDeliveryFeature == true),
|
||||
visible:
|
||||
(vendorModel.isSelfDelivery ==
|
||||
true &&
|
||||
Constant.isSelfDeliveryFeature ==
|
||||
true),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 7),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 7,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppThemeData.success300,
|
||||
borderRadius: BorderRadius.circular(120), // Optional
|
||||
color:
|
||||
AppThemeData
|
||||
.success300,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
120,
|
||||
), // Optional
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
|
||||
const SizedBox(width: 5),
|
||||
SvgPicture.asset(
|
||||
"assets/icons/ic_free_delivery.svg",
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
Text(
|
||||
"Free Delivery".tr(),
|
||||
style: TextStyle(fontSize: 14, color: AppThemeData.success600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
AppThemeData
|
||||
.success600,
|
||||
fontFamily:
|
||||
AppThemeData
|
||||
.semiBold,
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -100,22 +166,52 @@ class CategoryRestaurantScreen extends StatelessWidget {
|
||||
),
|
||||
Container(
|
||||
decoration: ShapeDecoration(
|
||||
color: isDark ? AppThemeData.primary600 : AppThemeData.primary50,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(120)),
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.primary600
|
||||
: AppThemeData
|
||||
.primary50,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
120,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 7),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 7,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset("assets/icons/ic_star.svg", colorFilter: ColorFilter.mode(AppThemeData.primary300, BlendMode.srcIn)),
|
||||
SvgPicture.asset(
|
||||
"assets/icons/ic_star.svg",
|
||||
colorFilter:
|
||||
ColorFilter.mode(
|
||||
AppThemeData
|
||||
.primary300,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"${Constant.calculateReview(reviewCount: vendorModel.reviewsCount!.toStringAsFixed(0), reviewSum: vendorModel.reviewsSum.toString())} (${vendorModel.reviewsCount!.toStringAsFixed(0)})",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? AppThemeData.primary300 : AppThemeData.primary300,
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
fontWeight: FontWeight.w600,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.primary300
|
||||
: AppThemeData
|
||||
.primary300,
|
||||
fontFamily:
|
||||
AppThemeData
|
||||
.semiBold,
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -125,22 +221,52 @@ class CategoryRestaurantScreen extends StatelessWidget {
|
||||
const SizedBox(width: 6),
|
||||
Container(
|
||||
decoration: ShapeDecoration(
|
||||
color: isDark ? AppThemeData.ecommerce600 : AppThemeData.ecommerce50,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(120)),
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.ecommerce600
|
||||
: AppThemeData
|
||||
.ecommerce50,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
120,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 7),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 7,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset("assets/icons/ic_map_distance.svg", colorFilter: ColorFilter.mode(AppThemeData.ecommerce300, BlendMode.srcIn)),
|
||||
SvgPicture.asset(
|
||||
"assets/icons/ic_map_distance.svg",
|
||||
colorFilter:
|
||||
ColorFilter.mode(
|
||||
AppThemeData
|
||||
.ecommerce300,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"${Constant.getDistance(lat1: vendorModel.latitude.toString(), lng1: vendorModel.longitude.toString(), lat2: Constant.selectedLocation.location!.latitude.toString(), lng2: Constant.selectedLocation.location!.longitude.toString())} ${Constant.distanceType}",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? AppThemeData.ecommerce300 : AppThemeData.ecommerce300,
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
fontWeight: FontWeight.w600,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.ecommerce300
|
||||
: AppThemeData
|
||||
.ecommerce300,
|
||||
fontFamily:
|
||||
AppThemeData
|
||||
.semiBold,
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -154,9 +280,12 @@ class CategoryRestaurantScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
vendorModel.title.toString(),
|
||||
@@ -166,7 +295,10 @@ class CategoryRestaurantScreen extends StatelessWidget {
|
||||
fontSize: 18,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey50
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
@@ -177,7 +309,10 @@ class CategoryRestaurantScreen extends StatelessWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontFamily: AppThemeData.medium,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: isDark ? AppThemeData.grey400 : AppThemeData.grey400,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey400
|
||||
: AppThemeData.grey400,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -9,7 +9,7 @@ import 'package:dotted_border/dotted_border.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import '../restaurant_details_screen/restaurant_details_screen.dart';
|
||||
|
||||
@@ -25,13 +25,18 @@ class DiscountRestaurantListScreen extends StatelessWidget {
|
||||
builder: (controller) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
backgroundColor:
|
||||
isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text(
|
||||
controller.title.value,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
),
|
||||
body:
|
||||
@@ -47,24 +52,60 @@ class DiscountRestaurantListScreen extends StatelessWidget {
|
||||
CouponModel offerModel = controller.couponList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Get.to(RestaurantDetailsScreen(), arguments: {"vendorModel": vendorModel});
|
||||
Get.to(
|
||||
RestaurantDetailsScreen(),
|
||||
arguments: {"vendorModel": vendorModel},
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Container(
|
||||
decoration: ShapeDecoration(color: isDark ? AppThemeData.grey900 : AppThemeData.grey50, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16))),
|
||||
decoration: ShapeDecoration(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey900
|
||||
: AppThemeData.grey50,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: const BorderRadius.only(topLeft: Radius.circular(16), bottomLeft: Radius.circular(16)),
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
bottomLeft: Radius.circular(16),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
NetworkImageWidget(imageUrl: vendorModel.photo.toString(), fit: BoxFit.cover, height: Responsive.height(16, context), width: Responsive.width(28, context)),
|
||||
NetworkImageWidget(
|
||||
imageUrl:
|
||||
vendorModel.photo.toString(),
|
||||
fit: BoxFit.cover,
|
||||
height: Responsive.height(
|
||||
16,
|
||||
context,
|
||||
),
|
||||
width: Responsive.width(28, context),
|
||||
),
|
||||
Container(
|
||||
height: Responsive.height(16, context),
|
||||
height: Responsive.height(
|
||||
16,
|
||||
context,
|
||||
),
|
||||
width: Responsive.width(28, context),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(begin: const Alignment(-0.00, -1.00), end: const Alignment(0, 1), colors: [Colors.black.withOpacity(0), const Color(0xFF111827)]),
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(
|
||||
-0.00,
|
||||
-1.00,
|
||||
),
|
||||
end: const Alignment(0, 1),
|
||||
colors: [
|
||||
Colors.black.withOpacity(0),
|
||||
const Color(0xFF111827),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
@@ -72,16 +113,37 @@ class DiscountRestaurantListScreen extends StatelessWidget {
|
||||
left: 10,
|
||||
child: Container(
|
||||
decoration: ShapeDecoration(
|
||||
color: isDark ? AppThemeData.ecommerce300 : AppThemeData.ecommerce300,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(120)),
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.ecommerce300
|
||||
: AppThemeData
|
||||
.ecommerce300,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(120),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 4,
|
||||
),
|
||||
child: Text(
|
||||
"${offerModel.discountType == "Fix Price" ? Constant.currencyModel!.symbol : ""}${offerModel.discount}${offerModel.discountType == "Percentage" ? "% off".toUpperCase().tr() : " off".toUpperCase().tr()}",
|
||||
textAlign: TextAlign.start,
|
||||
maxLines: 1,
|
||||
style: TextStyle(overflow: TextOverflow.ellipsis, fontFamily: AppThemeData.semiBold, color: isDark ? AppThemeData.grey50 : AppThemeData.grey50),
|
||||
style: TextStyle(
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
fontFamily:
|
||||
AppThemeData.semiBold,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey50
|
||||
: AppThemeData.grey50,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -91,9 +153,12 @@ class DiscountRestaurantListScreen extends StatelessWidget {
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
@@ -104,19 +169,45 @@ class DiscountRestaurantListScreen extends StatelessWidget {
|
||||
maxLines: 1,
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
overflow:
|
||||
TextOverflow.ellipsis,
|
||||
fontFamily:
|
||||
AppThemeData.semiBold,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.grey50
|
||||
: AppThemeData
|
||||
.grey900,
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
SvgPicture.asset("assets/icons/ic_star.svg", colorFilter: ColorFilter.mode(AppThemeData.primary300, BlendMode.srcIn)),
|
||||
SvgPicture.asset(
|
||||
"assets/icons/ic_star.svg",
|
||||
colorFilter:
|
||||
ColorFilter.mode(
|
||||
AppThemeData
|
||||
.primary300,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"${Constant.calculateReview(reviewCount: vendorModel.reviewsCount!.toStringAsFixed(0), reviewSum: vendorModel.reviewsSum.toString())} (${vendorModel.reviewsCount!.toStringAsFixed(0)})",
|
||||
style: TextStyle(color: isDark ? AppThemeData.primary300 : AppThemeData.primary300, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
|
||||
style: TextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.primary300
|
||||
: AppThemeData
|
||||
.primary300,
|
||||
fontFamily:
|
||||
AppThemeData.semiBold,
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -124,18 +215,33 @@ class DiscountRestaurantListScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Icon(Icons.location_on, size: 18, color: isDark ? AppThemeData.grey300 : AppThemeData.grey600),
|
||||
Icon(
|
||||
Icons.location_on,
|
||||
size: 18,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey300
|
||||
: AppThemeData.grey600,
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Expanded(
|
||||
child: Text(
|
||||
vendorModel.location.toString(),
|
||||
vendorModel.location
|
||||
.toString(),
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
fontFamily:
|
||||
AppThemeData.medium,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 12,
|
||||
color: isDark ? AppThemeData.grey400 : AppThemeData.grey400,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.grey400
|
||||
: AppThemeData
|
||||
.grey400,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -143,19 +249,45 @@ class DiscountRestaurantListScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
Container(
|
||||
color: isDark ? AppThemeData.primary600 : AppThemeData.primary50,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.primary600
|
||||
: AppThemeData.primary50,
|
||||
child: DottedBorder(
|
||||
options: RoundedRectDottedBorderOptions(
|
||||
radius: const Radius.circular(6),
|
||||
color: isDark ? AppThemeData.primary300 : AppThemeData.primary300,
|
||||
strokeWidth: 1,
|
||||
),
|
||||
options:
|
||||
RoundedRectDottedBorderOptions(
|
||||
radius:
|
||||
const Radius.circular(
|
||||
6,
|
||||
),
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.primary300
|
||||
: AppThemeData
|
||||
.primary300,
|
||||
strokeWidth: 1,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 2),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 2,
|
||||
),
|
||||
child: Text(
|
||||
"${offerModel.code}",
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.semiBold, fontSize: 16, color: isDark ? AppThemeData.primary300 : AppThemeData.primary300),
|
||||
style: TextStyle(
|
||||
fontFamily:
|
||||
AppThemeData.semiBold,
|
||||
fontSize: 16,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.primary300
|
||||
: AppThemeData
|
||||
.primary300,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -29,7 +29,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:geocoding/geocoding.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import 'package:google_maps_flutter/google_maps_flutter.dart';
|
||||
import 'package:latlong2/latlong.dart' as location;
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
@@ -705,7 +705,8 @@ class HomeScreen extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
"New Arrivals".tr(),
|
||||
"New Arrivals"
|
||||
.tr(),
|
||||
textAlign:
|
||||
TextAlign
|
||||
.start,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8,8 +8,7 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import '../../../service/fire_store_utils.dart';
|
||||
import '../../../widget/restaurant_image_view.dart';
|
||||
import '../restaurant_details_screen/restaurant_details_screen.dart';
|
||||
@@ -26,13 +25,18 @@ class RestaurantListScreen extends StatelessWidget {
|
||||
builder: (controller) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
backgroundColor:
|
||||
isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text(
|
||||
controller.title.value,
|
||||
textAlign: TextAlign.start,
|
||||
style: TextStyle(fontFamily: AppThemeData.medium, fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900),
|
||||
style: TextStyle(
|
||||
fontFamily: AppThemeData.medium,
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
),
|
||||
body:
|
||||
@@ -44,35 +48,64 @@ class RestaurantListScreen extends StatelessWidget {
|
||||
shrinkWrap: true,
|
||||
itemCount: controller.vendorSearchList.length,
|
||||
itemBuilder: (context, index) {
|
||||
VendorModel vendorModel = controller.vendorSearchList[index];
|
||||
VendorModel vendorModel =
|
||||
controller.vendorSearchList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Get.to(const RestaurantDetailsScreen(), arguments: {"vendorModel": vendorModel})?.then((v) {
|
||||
Get.to(
|
||||
const RestaurantDetailsScreen(),
|
||||
arguments: {"vendorModel": vendorModel},
|
||||
)?.then((v) {
|
||||
controller.getFavouriteRestaurant();
|
||||
});
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 20),
|
||||
child: Container(
|
||||
decoration: ShapeDecoration(color: isDark ? AppThemeData.grey900 : AppThemeData.grey50, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16))),
|
||||
decoration: ShapeDecoration(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey900
|
||||
: AppThemeData.grey50,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Stack(
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: const BorderRadius.only(topLeft: Radius.circular(16), topRight: Radius.circular(16)),
|
||||
borderRadius: const BorderRadius.only(
|
||||
topLeft: Radius.circular(16),
|
||||
topRight: Radius.circular(16),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
RestaurantImageView(vendorModel: vendorModel),
|
||||
RestaurantImageView(
|
||||
vendorModel: vendorModel,
|
||||
),
|
||||
Container(
|
||||
height: Responsive.height(20, context),
|
||||
width: Responsive.width(100, context),
|
||||
height: Responsive.height(
|
||||
20,
|
||||
context,
|
||||
),
|
||||
width: Responsive.width(
|
||||
100,
|
||||
context,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(-0.00, -1.00),
|
||||
begin: const Alignment(
|
||||
-0.00,
|
||||
-1.00,
|
||||
),
|
||||
end: const Alignment(0, 1),
|
||||
colors: [Colors.black.withOpacity(0), const Color(0xFF111827)],
|
||||
colors: [
|
||||
Colors.black.withOpacity(0),
|
||||
const Color(0xFF111827),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -81,21 +114,60 @@ class RestaurantListScreen extends StatelessWidget {
|
||||
top: 10,
|
||||
child: InkWell(
|
||||
onTap: () async {
|
||||
if (controller.favouriteList.where((p0) => p0.restaurantId == vendorModel.id).isNotEmpty) {
|
||||
FavouriteModel favouriteModel = FavouriteModel(restaurantId: vendorModel.id, userId: FireStoreUtils.getCurrentUid());
|
||||
controller.favouriteList.removeWhere((item) => item.restaurantId == vendorModel.id);
|
||||
await FireStoreUtils.removeFavouriteRestaurant(favouriteModel);
|
||||
if (controller.favouriteList
|
||||
.where(
|
||||
(p0) =>
|
||||
p0.restaurantId ==
|
||||
vendorModel.id,
|
||||
)
|
||||
.isNotEmpty) {
|
||||
FavouriteModel
|
||||
favouriteModel = FavouriteModel(
|
||||
restaurantId:
|
||||
vendorModel.id,
|
||||
userId:
|
||||
FireStoreUtils.getCurrentUid(),
|
||||
);
|
||||
controller.favouriteList
|
||||
.removeWhere(
|
||||
(item) =>
|
||||
item.restaurantId ==
|
||||
vendorModel.id,
|
||||
);
|
||||
await FireStoreUtils.removeFavouriteRestaurant(
|
||||
favouriteModel,
|
||||
);
|
||||
} else {
|
||||
FavouriteModel favouriteModel = FavouriteModel(restaurantId: vendorModel.id, userId: FireStoreUtils.getCurrentUid());
|
||||
controller.favouriteList.add(favouriteModel);
|
||||
await FireStoreUtils.setFavouriteRestaurant(favouriteModel);
|
||||
FavouriteModel
|
||||
favouriteModel = FavouriteModel(
|
||||
restaurantId:
|
||||
vendorModel.id,
|
||||
userId:
|
||||
FireStoreUtils.getCurrentUid(),
|
||||
);
|
||||
controller.favouriteList
|
||||
.add(favouriteModel);
|
||||
await FireStoreUtils.setFavouriteRestaurant(
|
||||
favouriteModel,
|
||||
);
|
||||
}
|
||||
},
|
||||
child: Obx(
|
||||
() =>
|
||||
controller.favouriteList.where((p0) => p0.restaurantId == vendorModel.id).isNotEmpty
|
||||
? SvgPicture.asset("assets/icons/ic_like_fill.svg")
|
||||
: SvgPicture.asset("assets/icons/ic_like.svg"),
|
||||
controller.favouriteList
|
||||
.where(
|
||||
(p0) =>
|
||||
p0.restaurantId ==
|
||||
vendorModel
|
||||
.id,
|
||||
)
|
||||
.isNotEmpty
|
||||
? SvgPicture.asset(
|
||||
"assets/icons/ic_like_fill.svg",
|
||||
)
|
||||
: SvgPicture.asset(
|
||||
"assets/icons/ic_like.svg",
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -103,28 +175,60 @@ class RestaurantListScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Transform.translate(
|
||||
offset: Offset(Responsive.width(-3, context), Responsive.height(17.5, context)),
|
||||
offset: Offset(
|
||||
Responsive.width(-3, context),
|
||||
Responsive.height(17.5, context),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.end,
|
||||
children: [
|
||||
Visibility(
|
||||
visible: (vendorModel.isSelfDelivery == true && Constant.isSelfDeliveryFeature == true),
|
||||
visible:
|
||||
(vendorModel.isSelfDelivery ==
|
||||
true &&
|
||||
Constant.isSelfDeliveryFeature ==
|
||||
true),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 7),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 7,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppThemeData.success300,
|
||||
borderRadius: BorderRadius.circular(120), // Optional
|
||||
color:
|
||||
AppThemeData
|
||||
.success300,
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
120,
|
||||
), // Optional
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset("assets/icons/ic_free_delivery.svg"),
|
||||
const SizedBox(width: 5),
|
||||
SvgPicture.asset(
|
||||
"assets/icons/ic_free_delivery.svg",
|
||||
),
|
||||
const SizedBox(
|
||||
width: 5,
|
||||
),
|
||||
Text(
|
||||
"Free Delivery".tr(),
|
||||
style: TextStyle(fontSize: 14, color: AppThemeData.carRent600, fontFamily: AppThemeData.semiBold, fontWeight: FontWeight.w600),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color:
|
||||
AppThemeData
|
||||
.carRent600,
|
||||
fontFamily:
|
||||
AppThemeData
|
||||
.semiBold,
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -134,22 +238,51 @@ class RestaurantListScreen extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 7),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 7,
|
||||
),
|
||||
decoration: ShapeDecoration(
|
||||
color: isDark ? AppThemeData.primary600 : AppThemeData.primary50,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(120)),
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.primary600
|
||||
: AppThemeData
|
||||
.primary50,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
120,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset("assets/icons/ic_star.svg", colorFilter: ColorFilter.mode(AppThemeData.primary300, BlendMode.srcIn)),
|
||||
SvgPicture.asset(
|
||||
"assets/icons/ic_star.svg",
|
||||
colorFilter:
|
||||
ColorFilter.mode(
|
||||
AppThemeData
|
||||
.primary300,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"${Constant.calculateReview(reviewCount: vendorModel.reviewsCount!.toStringAsFixed(0), reviewSum: vendorModel.reviewsSum.toString())} (${vendorModel.reviewsCount!.toStringAsFixed(0)})",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? AppThemeData.primary300 : AppThemeData.primary300,
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
fontWeight: FontWeight.w600,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.primary300
|
||||
: AppThemeData
|
||||
.primary300,
|
||||
fontFamily:
|
||||
AppThemeData.semiBold,
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -157,22 +290,51 @@ class RestaurantListScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 7),
|
||||
padding:
|
||||
const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 7,
|
||||
),
|
||||
decoration: ShapeDecoration(
|
||||
color: isDark ? AppThemeData.ecommerce600 : AppThemeData.ecommerce50,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(120)),
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.ecommerce600
|
||||
: AppThemeData
|
||||
.ecommerce50,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
120,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
SvgPicture.asset("assets/icons/ic_map_distance.svg", colorFilter: ColorFilter.mode(AppThemeData.ecommerce300, BlendMode.srcIn)),
|
||||
SvgPicture.asset(
|
||||
"assets/icons/ic_map_distance.svg",
|
||||
colorFilter:
|
||||
ColorFilter.mode(
|
||||
AppThemeData
|
||||
.ecommerce300,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"${Constant.getDistance(lat1: vendorModel.latitude.toString(), lng1: vendorModel.longitude.toString(), lat2: Constant.selectedLocation.location!.latitude.toString(), lng2: Constant.selectedLocation.location!.longitude.toString())} ${Constant.distanceType}",
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? AppThemeData.ecommerce300 : AppThemeData.ecommerce300,
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
fontWeight: FontWeight.w600,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData
|
||||
.ecommerce300
|
||||
: AppThemeData
|
||||
.ecommerce300,
|
||||
fontFamily:
|
||||
AppThemeData.semiBold,
|
||||
fontWeight:
|
||||
FontWeight.w600,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -185,9 +347,12 @@ class RestaurantListScreen extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(height: 15),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
vendorModel.title.toString(),
|
||||
@@ -197,7 +362,10 @@ class RestaurantListScreen extends StatelessWidget {
|
||||
fontSize: 18,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontFamily: AppThemeData.semiBold,
|
||||
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey50
|
||||
: AppThemeData.grey900,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
@@ -208,7 +376,10 @@ class RestaurantListScreen extends StatelessWidget {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontFamily: AppThemeData.medium,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: isDark ? AppThemeData.grey400 : AppThemeData.grey400,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey400
|
||||
: AppThemeData.grey400,
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -8,7 +8,7 @@ import 'package:customer/widget/story_view/utils.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import '../../../service/fire_store_utils.dart';
|
||||
import '../../../widget/story_view/widgets/story_view.dart';
|
||||
import '../restaurant_details_screen/restaurant_details_screen.dart';
|
||||
@@ -71,9 +71,15 @@ class MoreStoriesState extends State<MoreStories> {
|
||||
StoryView(
|
||||
key: ValueKey(widget.index),
|
||||
storyItems:
|
||||
List.generate(widget.storyList[widget.index].videoUrl.length, (i) {
|
||||
return StoryItem.pageVideo(widget.storyList[widget.index].videoUrl[i], controller: storyController);
|
||||
}).toList(),
|
||||
List.generate(
|
||||
widget.storyList[widget.index].videoUrl.length,
|
||||
(i) {
|
||||
return StoryItem.pageVideo(
|
||||
widget.storyList[widget.index].videoUrl[i],
|
||||
controller: storyController,
|
||||
);
|
||||
},
|
||||
).toList(),
|
||||
onComplete: () {
|
||||
debugPrint("--------->");
|
||||
debugPrint(widget.storyList.length.toString());
|
||||
@@ -96,15 +102,23 @@ class MoreStoriesState extends State<MoreStories> {
|
||||
},
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).viewPadding.top + 30, left: 16, right: 16),
|
||||
padding: EdgeInsets.only(
|
||||
top: MediaQuery.of(context).viewPadding.top + 30,
|
||||
left: 16,
|
||||
right: 16,
|
||||
),
|
||||
child: FutureBuilder(
|
||||
future: FireStoreUtils.getVendorById(widget.storyList[widget.index].vendorID.toString()),
|
||||
future: FireStoreUtils.getVendorById(
|
||||
widget.storyList[widget.index].vendorID.toString(),
|
||||
),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return SizedBox();
|
||||
} else {
|
||||
if (snapshot.hasError) {
|
||||
return Center(child: Text('${"Error".tr()}: ${snapshot.error}'));
|
||||
return Center(
|
||||
child: Text('${"Error".tr()}: ${snapshot.error}'),
|
||||
);
|
||||
return Center(child: Text('Error: ${snapshot.error}'));
|
||||
} else if (snapshot.data == null) {
|
||||
return const SizedBox();
|
||||
@@ -112,13 +126,23 @@ class MoreStoriesState extends State<MoreStories> {
|
||||
VendorModel vendorModel = snapshot.data!;
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Get.to(const RestaurantDetailsScreen(), arguments: {"vendorModel": vendorModel});
|
||||
Get.to(
|
||||
const RestaurantDetailsScreen(),
|
||||
arguments: {"vendorModel": vendorModel},
|
||||
);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
ClipOval(child: NetworkImageWidget(imageUrl: vendorModel.photo.toString(), width: 50, height: 50, fit: BoxFit.cover)),
|
||||
ClipOval(
|
||||
child: NetworkImageWidget(
|
||||
imageUrl: vendorModel.photo.toString(),
|
||||
width: 50,
|
||||
height: 50,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Expanded(
|
||||
child: Column(
|
||||
@@ -129,17 +153,29 @@ class MoreStoriesState extends State<MoreStories> {
|
||||
vendorModel.title.toString(),
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(color: Colors.white, fontSize: 16, overflow: TextOverflow.ellipsis, fontWeight: FontWeight.w700),
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
SvgPicture.asset("assets/icons/ic_star.svg"),
|
||||
SvgPicture.asset(
|
||||
"assets/icons/ic_star.svg",
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
Text(
|
||||
"${Constant.calculateReview(reviewCount: vendorModel.reviewsCount.toString(), reviewSum: vendorModel.reviewsSum.toString())} ${'reviews'.tr()}",
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 1,
|
||||
style: const TextStyle(color: AppThemeData.warning300, fontSize: 12, overflow: TextOverflow.ellipsis, fontWeight: FontWeight.w700),
|
||||
style: const TextStyle(
|
||||
color: AppThemeData.warning300,
|
||||
fontSize: 12,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -152,8 +188,17 @@ class MoreStoriesState extends State<MoreStories> {
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(30), color: Colors.grey),
|
||||
child: SvgPicture.asset("assets/icons/ic_close.svg", colorFilter: ColorFilter.mode(AppThemeData.grey800, BlendMode.srcIn)),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
color: Colors.grey,
|
||||
),
|
||||
child: SvgPicture.asset(
|
||||
"assets/icons/ic_close.svg",
|
||||
colorFilter: ColorFilter.mode(
|
||||
AppThemeData.grey800,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -5,8 +5,7 @@ import 'package:customer/themes/app_them_data.dart';
|
||||
import 'package:customer/utils/network_image_widget.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
import 'package:get/get.dart' hide Trans;
|
||||
import '../../../controllers/theme_controller.dart';
|
||||
import 'category_restaurant_screen.dart';
|
||||
|
||||
@@ -22,10 +21,19 @@ class ViewAllCategoryScreen extends StatelessWidget {
|
||||
builder: (controller) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
backgroundColor:
|
||||
isDark ? AppThemeData.surfaceDark : AppThemeData.surface,
|
||||
centerTitle: false,
|
||||
titleSpacing: 0,
|
||||
title: Text("Categories".tr(), style: TextStyle(fontSize: 16, color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontFamily: AppThemeData.medium, fontWeight: FontWeight.w500)),
|
||||
title: Text(
|
||||
"Categories".tr(),
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: isDark ? AppThemeData.grey50 : AppThemeData.grey900,
|
||||
fontFamily: AppThemeData.medium,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
),
|
||||
body:
|
||||
controller.isLoading.value
|
||||
@@ -34,38 +42,84 @@ class ViewAllCategoryScreen extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: GridView.builder(
|
||||
padding: EdgeInsets.zero,
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 4, childAspectRatio: 3.5 / 6, crossAxisSpacing: 6),
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 4,
|
||||
childAspectRatio: 3.5 / 6,
|
||||
crossAxisSpacing: 6,
|
||||
),
|
||||
itemCount: controller.vendorCategoryModel.length,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
VendorCategoryModel vendorCategoryModel = controller.vendorCategoryModel[index];
|
||||
VendorCategoryModel vendorCategoryModel =
|
||||
controller.vendorCategoryModel[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
Get.to(const CategoryRestaurantScreen(), arguments: {"vendorCategoryModel": vendorCategoryModel, "dineIn": false});
|
||||
Get.to(
|
||||
const CategoryRestaurantScreen(),
|
||||
arguments: {
|
||||
"vendorCategoryModel": vendorCategoryModel,
|
||||
"dineIn": false,
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4, vertical: 6),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 4,
|
||||
vertical: 6,
|
||||
),
|
||||
child: Container(
|
||||
decoration: ShapeDecoration(
|
||||
color: isDark ? AppThemeData.grey900 : AppThemeData.grey50,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey900
|
||||
: AppThemeData.grey50,
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(width: 1, strokeAlign: BorderSide.strokeAlignOutside, color: isDark ? AppThemeData.grey800 : AppThemeData.grey100),
|
||||
side: BorderSide(
|
||||
width: 1,
|
||||
strokeAlign: BorderSide.strokeAlignOutside,
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey800
|
||||
: AppThemeData.grey100,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(width: 60, height: 60, child: ClipOval(child: NetworkImageWidget(imageUrl: vendorCategoryModel.photo.toString(), fit: BoxFit.cover))),
|
||||
SizedBox(
|
||||
width: 60,
|
||||
height: 60,
|
||||
child: ClipOval(
|
||||
child: NetworkImageWidget(
|
||||
imageUrl:
|
||||
vendorCategoryModel.photo
|
||||
.toString(),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 10,
|
||||
vertical: 10,
|
||||
),
|
||||
child: Text(
|
||||
'${vendorCategoryModel.title}',
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 2,
|
||||
style: AppThemeData.mediumTextStyle(color: isDark ? AppThemeData.grey50 : AppThemeData.grey900, fontSize: 12),
|
||||
style: AppThemeData.mediumTextStyle(
|
||||
color:
|
||||
isDark
|
||||
? AppThemeData.grey50
|
||||
: AppThemeData.grey900,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user