fixed ui issue
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
Extension Discovery Cache
|
||||
=========================
|
||||
|
||||
This folder is used by `package:extension_discovery` to cache lists of
|
||||
packages that contains extensions for other packages.
|
||||
|
||||
DO NOT USE THIS FOLDER
|
||||
----------------------
|
||||
|
||||
* Do not read (or rely) the contents of this folder.
|
||||
* Do write to this folder.
|
||||
|
||||
If you're interested in the lists of extensions stored in this folder use the
|
||||
API offered by package `extension_discovery` to get this information.
|
||||
|
||||
If this package doesn't work for your use-case, then don't try to read the
|
||||
contents of this folder. It may change, and will not remain stable.
|
||||
|
||||
Use package `extension_discovery`
|
||||
---------------------------------
|
||||
|
||||
If you want to access information from this folder.
|
||||
|
||||
Feel free to delete this folder
|
||||
-------------------------------
|
||||
|
||||
Files in this folder act as a cache, and the cache is discarded if the files
|
||||
are older than the modification time of `.dart_tool/package_config.json`.
|
||||
|
||||
Hence, it should never be necessary to clear this cache manually, if you find a
|
||||
need to do please file a bug.
|
||||
@@ -1 +0,0 @@
|
||||
{"version":2,"entries":[{"package":"grocery_app","rootUri":"../","packageUri":"lib/"}]}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1 +1 @@
|
||||
3.24.3
|
||||
3.22.3
|
||||
102
.flutter-plugins
102
.flutter-plugins
@@ -1,52 +1,52 @@
|
||||
# This is a generated file; do not edit or check into version control.
|
||||
connectivity_plus=/Users/apple/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.3/
|
||||
file_selector_linux=/Users/apple/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3+2/
|
||||
file_selector_macos=/Users/apple/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/
|
||||
file_selector_windows=/Users/apple/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/
|
||||
flutter_inappwebview=/Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0/
|
||||
flutter_inappwebview_android=/Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_android-1.0.13/
|
||||
flutter_inappwebview_ios=/Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.0.13/
|
||||
flutter_inappwebview_macos=/Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_macos-1.0.11/
|
||||
flutter_inappwebview_web=/Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_web-1.0.8/
|
||||
flutter_plugin_android_lifecycle=/Users/apple/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.22/
|
||||
fluttertoast=/Users/apple/.pub-cache/hosted/pub.dev/fluttertoast-8.2.11/
|
||||
geocoding=/Users/apple/.pub-cache/hosted/pub.dev/geocoding-3.0.0/
|
||||
geocoding_android=/Users/apple/.pub-cache/hosted/pub.dev/geocoding_android-3.3.1/
|
||||
geocoding_ios=/Users/apple/.pub-cache/hosted/pub.dev/geocoding_ios-3.0.1/
|
||||
geolocator=/Users/apple/.pub-cache/hosted/pub.dev/geolocator-13.0.2/
|
||||
geolocator_android=/Users/apple/.pub-cache/hosted/pub.dev/geolocator_android-4.6.1/
|
||||
geolocator_apple=/Users/apple/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.8+1/
|
||||
geolocator_web=/Users/apple/.pub-cache/hosted/pub.dev/geolocator_web-4.1.1/
|
||||
geolocator_windows=/Users/apple/.pub-cache/hosted/pub.dev/geolocator_windows-0.2.3/
|
||||
google_api_headers=/Users/apple/.pub-cache/hosted/pub.dev/google_api_headers-1.6.0/
|
||||
google_maps_flutter=/Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter-2.10.0/
|
||||
google_maps_flutter_android=/Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter_android-2.14.7/
|
||||
google_maps_flutter_ios=/Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter_ios-2.13.2/
|
||||
google_maps_flutter_web=/Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter_web-0.5.10/
|
||||
image_picker=/Users/apple/.pub-cache/hosted/pub.dev/image_picker-1.1.2/
|
||||
image_picker_android=/Users/apple/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+12/
|
||||
image_picker_for_web=/Users/apple/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.6/
|
||||
image_picker_ios=/Users/apple/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+2/
|
||||
image_picker_linux=/Users/apple/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/
|
||||
image_picker_macos=/Users/apple/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+2/
|
||||
image_picker_windows=/Users/apple/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/
|
||||
package_info_plus=/Users/apple/.pub-cache/hosted/pub.dev/package_info_plus-4.2.0/
|
||||
path_provider=/Users/apple/.pub-cache/hosted/pub.dev/path_provider-2.1.5/
|
||||
path_provider_android=/Users/apple/.pub-cache/hosted/pub.dev/path_provider_android-2.2.10/
|
||||
path_provider_foundation=/Users/apple/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.1/
|
||||
path_provider_linux=/Users/apple/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/
|
||||
path_provider_windows=/Users/apple/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/
|
||||
shared_preferences=/Users/apple/.pub-cache/hosted/pub.dev/shared_preferences-2.3.3/
|
||||
shared_preferences_android=/Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.2/
|
||||
shared_preferences_foundation=/Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/
|
||||
shared_preferences_linux=/Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/
|
||||
shared_preferences_web=/Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/
|
||||
shared_preferences_windows=/Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/
|
||||
sqflite=/Users/apple/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/
|
||||
url_launcher=/Users/apple/.pub-cache/hosted/pub.dev/url_launcher-6.3.1/
|
||||
url_launcher_android=/Users/apple/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.9/
|
||||
url_launcher_ios=/Users/apple/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.2/
|
||||
url_launcher_linux=/Users/apple/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/
|
||||
url_launcher_macos=/Users/apple/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.2/
|
||||
url_launcher_web=/Users/apple/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.3/
|
||||
url_launcher_windows=/Users/apple/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/
|
||||
connectivity_plus=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.3/
|
||||
file_selector_linux=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3+2/
|
||||
file_selector_macos=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/
|
||||
file_selector_windows=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/
|
||||
flutter_inappwebview=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0/
|
||||
flutter_inappwebview_android=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/flutter_inappwebview_android-1.0.13/
|
||||
flutter_inappwebview_ios=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.0.13/
|
||||
flutter_inappwebview_macos=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/flutter_inappwebview_macos-1.0.11/
|
||||
flutter_inappwebview_web=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/flutter_inappwebview_web-1.0.8/
|
||||
flutter_plugin_android_lifecycle=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.22/
|
||||
fluttertoast=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/fluttertoast-8.2.11/
|
||||
geocoding=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geocoding-3.0.0/
|
||||
geocoding_android=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geocoding_android-3.3.1/
|
||||
geocoding_ios=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geocoding_ios-3.0.1/
|
||||
geolocator=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geolocator-13.0.2/
|
||||
geolocator_android=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geolocator_android-4.6.1/
|
||||
geolocator_apple=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.8+1/
|
||||
geolocator_web=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geolocator_web-4.1.1/
|
||||
geolocator_windows=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geolocator_windows-0.2.3/
|
||||
google_api_headers=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/google_api_headers-1.6.0/
|
||||
google_maps_flutter=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/google_maps_flutter-2.10.0/
|
||||
google_maps_flutter_android=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/google_maps_flutter_android-2.14.7/
|
||||
google_maps_flutter_ios=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/google_maps_flutter_ios-2.13.2/
|
||||
google_maps_flutter_web=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/google_maps_flutter_web-0.5.10/
|
||||
image_picker=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/image_picker-1.1.2/
|
||||
image_picker_android=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+12/
|
||||
image_picker_for_web=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.6/
|
||||
image_picker_ios=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+2/
|
||||
image_picker_linux=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/
|
||||
image_picker_macos=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+2/
|
||||
image_picker_windows=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/
|
||||
package_info_plus=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/package_info_plus-4.2.0/
|
||||
path_provider=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider-2.1.5/
|
||||
path_provider_android=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_android-2.2.10/
|
||||
path_provider_foundation=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.1/
|
||||
path_provider_linux=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/
|
||||
path_provider_windows=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/
|
||||
shared_preferences=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences-2.3.3/
|
||||
shared_preferences_android=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.2/
|
||||
shared_preferences_foundation=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/
|
||||
shared_preferences_linux=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/
|
||||
shared_preferences_web=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/
|
||||
shared_preferences_windows=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/
|
||||
sqflite=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/
|
||||
url_launcher=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/url_launcher-6.3.1/
|
||||
url_launcher_android=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.9/
|
||||
url_launcher_ios=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.2/
|
||||
url_launcher_linux=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/
|
||||
url_launcher_macos=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.2/
|
||||
url_launcher_web=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.3/
|
||||
url_launcher_windows=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,8 +6,8 @@ import 'package:grocery_app/utils/constants/color_constant.dart';
|
||||
|
||||
//Custom AppBar widget
|
||||
class AppNetworkImage extends StatelessWidget {
|
||||
final double height;
|
||||
final double width;
|
||||
// final double height;
|
||||
// final double width;
|
||||
final String imageUrl;
|
||||
final double? noImageTextSize;
|
||||
final bool isBorderShow;
|
||||
@@ -22,8 +22,6 @@ class AppNetworkImage extends StatelessWidget {
|
||||
|
||||
const AppNetworkImage(
|
||||
{super.key,
|
||||
required this.height,
|
||||
required this.width,
|
||||
required this.imageUrl,
|
||||
this.noImageTextSize,
|
||||
this.isBorderShow = false,
|
||||
@@ -38,15 +36,12 @@ class AppNetworkImage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return
|
||||
CachedNetworkImage(
|
||||
return CachedNetworkImage(
|
||||
|
||||
/// height: height,
|
||||
///width: width,
|
||||
errorWidget: (context, url, error) {
|
||||
return Container(
|
||||
height: height,
|
||||
width: width,
|
||||
decoration: BoxDecoration(
|
||||
color: backGroundColor,
|
||||
borderRadius: BorderRadius.circular(radius ?? 0),
|
||||
@@ -57,15 +52,12 @@ class AppNetworkImage extends StatelessWidget {
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
APPASSETS.placeHolder,
|
||||
height: height * 0.4,
|
||||
color: imageColor,
|
||||
)),
|
||||
);
|
||||
},
|
||||
placeholder: (context, url) {
|
||||
return Container(
|
||||
width: width,
|
||||
height: height,
|
||||
decoration: BoxDecoration(
|
||||
color: backGroundColor,
|
||||
borderRadius: BorderRadius.circular(radius ?? 0),
|
||||
@@ -81,7 +73,7 @@ class AppNetworkImage extends StatelessWidget {
|
||||
imageBuilder: (context, cIMage) {
|
||||
return Container(
|
||||
// width: width,
|
||||
height: 100,
|
||||
// height: 100,
|
||||
decoration: BoxDecoration(
|
||||
color: backGroundColor,
|
||||
borderRadius: isFromSlider
|
||||
@@ -109,7 +101,5 @@ class AppNetworkImage extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
imageUrl: imageUrl);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,10 +39,15 @@ class ProductProvider extends ChangeNotifier {
|
||||
|
||||
bool iscroll = true;
|
||||
|
||||
Future<void> gettAllProduct(
|
||||
BuildContext context, String id, bool status, String search) async {
|
||||
Future<void> gettAllProduct(BuildContext context, String id, bool status,
|
||||
String search, bool first) async {
|
||||
if (isLoadingg || !hasMore) return;
|
||||
print("kjldfgjklfjkdgjkhlfg");
|
||||
|
||||
if (first) {
|
||||
print("kdjfhgkfkjdghkjkdfg");
|
||||
products.clear();
|
||||
notifyListeners();
|
||||
}
|
||||
if (id.isNotEmpty) {
|
||||
products.clear();
|
||||
|
||||
@@ -81,6 +86,8 @@ class ProductProvider extends ChangeNotifier {
|
||||
// hasMore = false;
|
||||
// }
|
||||
|
||||
print("jdksgfkgkbfgh ${response}");
|
||||
|
||||
if (response.data != null && response.data!.isNotEmpty) {
|
||||
if (id.isNotEmpty) {
|
||||
products = response.data!;
|
||||
|
||||
@@ -166,8 +166,6 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
||||
top: 0,
|
||||
right: 0,
|
||||
child: AppNetworkImage(
|
||||
height: 70,
|
||||
width: 70,
|
||||
radius: 10,
|
||||
imageUrl: provider.lastImageurl ??
|
||||
"https://5.imimg.com/data5/SELLER/Default/2024/2/385126988/OL/DA/VW/8627346/1l-fortune-sunflower-oil.jpg",
|
||||
@@ -326,31 +324,24 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(5),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
height: MediaQuery.of(context).size.height *
|
||||
0.15, // Dynamic height
|
||||
width: MediaQuery.of(context).size.width *
|
||||
0.4, // Dynamic width
|
||||
height: MediaQuery.of(context).size.height * 0.15,
|
||||
// width: MediaQuery.of(context).size.width *
|
||||
// 0.4, // Dynamic width
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.bgGrey,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
//alignment: Alignment.center,
|
||||
children: [
|
||||
Center(
|
||||
child: AppNetworkImage(
|
||||
height:
|
||||
MediaQuery.of(context).size.height * 0.13,
|
||||
width:
|
||||
MediaQuery.of(context).size.width * 0.35,
|
||||
imageUrl: bestdealproduct
|
||||
.productImages?.first.url ??
|
||||
imageUrl:
|
||||
bestdealproduct.productImages?.first.url ??
|
||||
"",
|
||||
backGroundColor: Colors.transparent,
|
||||
radius: 10,
|
||||
@@ -360,17 +351,18 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
||||
right: 1,
|
||||
bottom: 0,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 10, vertical: 10),
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.red,
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% OFF",
|
||||
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% \nOFF",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white, fontSize: 15)),
|
||||
color: Colors.white, fontSize: 12)),
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -410,8 +402,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
||||
textAlign: TextAlign.left,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style:
|
||||
context.customSemiBold(Colors.black, 15),
|
||||
style: context.customSemiBold(Colors.black, 15),
|
||||
),
|
||||
Text(
|
||||
"₹${bestdealproduct.basePrice ?? ""}",
|
||||
@@ -434,30 +425,27 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
||||
alignment: Alignment.centerRight,
|
||||
child: GestureDetector(
|
||||
onTap: () async {
|
||||
if (await SharedPrefUtils.getToken() !=
|
||||
null) {
|
||||
if (await SharedPrefUtils.getToken() != null) {
|
||||
await provider.addToWithCart(
|
||||
context,
|
||||
bestdealproduct.id!,
|
||||
bestdealproduct,
|
||||
bestdealproduct
|
||||
.productImages?.first.url);
|
||||
bestdealproduct.productImages?.first.url);
|
||||
} else {
|
||||
context.push(MyRoutes.SIGNUP);
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
height: MediaQuery.of(context).size.height *
|
||||
0.035,
|
||||
width:
|
||||
MediaQuery.of(context).size.width * 0.1,
|
||||
height:
|
||||
MediaQuery.of(context).size.height * 0.035,
|
||||
width: MediaQuery.of(context).size.width * 0.1,
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.lightGreen,
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
child: Center(
|
||||
child: provider.isLoading[
|
||||
bestdealproduct.id] ??
|
||||
child: provider
|
||||
.isLoading[bestdealproduct.id] ??
|
||||
false
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
@@ -487,7 +475,6 @@ class _BestDealScreenState extends State<BestDealScreen> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -156,10 +156,7 @@ class _MycartState extends State<Mycart> {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
AppNetworkImage(
|
||||
height:
|
||||
MediaQuery.of(context).size.height *
|
||||
0.08,
|
||||
width: cardWidth * 0.7,
|
||||
|
||||
imageUrl: bestdealproduct
|
||||
.productImages?.first?.url ??
|
||||
"",
|
||||
@@ -473,8 +470,7 @@ class _MycartState extends State<Mycart> {
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
child: AppNetworkImage(
|
||||
width: 60.w,
|
||||
height: 70.h,
|
||||
|
||||
imageUrl:
|
||||
items.product!.productImages!.first.url ?? " ",
|
||||
backGroundColor: APPCOLOR.bgGrey,
|
||||
@@ -1115,8 +1111,7 @@ class _MycartState extends State<Mycart> {
|
||||
right: 15,
|
||||
bottom: 15,
|
||||
child: AppNetworkImage(
|
||||
height: 130,
|
||||
width: 150,
|
||||
|
||||
imageUrl: banner.imageUrl ??
|
||||
'https://e7.pngegg.com/pngimages/742/816/png-clipart-coca-cola-can-illustration-coca-cola-soft-drink-surge-pepsi-coke-sweetness-cola-thumbnail.png',
|
||||
backGroundColor: Colors.transparent,
|
||||
|
||||
@@ -85,8 +85,7 @@ class _FavouriteScreenState extends State<FavouriteScreen>
|
||||
top: 0,
|
||||
right: 0,
|
||||
child: AppNetworkImage(
|
||||
height: 70,
|
||||
width: 70,
|
||||
|
||||
radius: 10,
|
||||
imageUrl: wishListProvider
|
||||
.productDatumlastImageurl ??
|
||||
@@ -214,8 +213,7 @@ class _FavouriteScreenState extends State<FavouriteScreen>
|
||||
.product!.productImages!.first.url ??
|
||||
"https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png",
|
||||
backGroundColor: APPCOLOR.bgGrey,
|
||||
height: 20,
|
||||
width: 20,
|
||||
|
||||
radius: 10,
|
||||
),
|
||||
),
|
||||
|
||||
@@ -30,14 +30,16 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
final ScrollController _scrollController = ScrollController();
|
||||
@override
|
||||
void initState() {
|
||||
// Ensuring the context is available before accessing the provider
|
||||
final productProvider = Provider.of<ProductProvider>(context, listen: false)
|
||||
.gettAllProduct(context, "", true, '', true);
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
final productProvider =
|
||||
Provider.of<ProductProvider>(context, listen: false);
|
||||
// productProvider.gettAllProduct(context, "", true, '', true);
|
||||
productProvider.getAllcategory(context);
|
||||
productProvider.getCategoryByLevel();
|
||||
|
||||
productProvider.gettAllProduct(context, "", true, '');
|
||||
productProvider.setActiveIndex(0);
|
||||
});
|
||||
|
||||
_scrollController.addListener(() {
|
||||
@@ -45,7 +47,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
_scrollController.position.maxScrollExtent) {
|
||||
final productProvider =
|
||||
Provider.of<ProductProvider>(context, listen: false);
|
||||
productProvider.gettAllProduct(context, "", false, '');
|
||||
productProvider.gettAllProduct(context, "", false, '', false);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -154,26 +156,6 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
itemBuilder: (context, index) {
|
||||
if (index == provider.products.length) {
|
||||
return SizedBox.shrink();
|
||||
// return Center(
|
||||
// child: Padding(
|
||||
// padding: const EdgeInsets.only(left: 120),
|
||||
// child: Center(
|
||||
// child: Container(
|
||||
// width: 30,
|
||||
// height: 30,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.transparent,
|
||||
// borderRadius: BorderRadius.circular(20),
|
||||
// border: Border.all(
|
||||
// color: APPCOLOR.bgGrey,
|
||||
// width: 1,
|
||||
// )),
|
||||
// child: const Center(
|
||||
// child: CupertinoActivityIndicator(),
|
||||
// ),
|
||||
// )),
|
||||
// )
|
||||
// ); // Show loader when fetching more data
|
||||
}
|
||||
var product = provider.products[index];
|
||||
return InkWell(
|
||||
@@ -194,23 +176,21 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.1),
|
||||
blurRadius: 1,
|
||||
offset: const Offset(5, 5),
|
||||
// boxShadow: [
|
||||
// BoxShadow(
|
||||
// color: Colors.grey.withOpacity(0.1),
|
||||
// blurRadius: 1,
|
||||
// offset: const Offset(5, 5),
|
||||
// ),
|
||||
// ],
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(5),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
height: itemWidth *
|
||||
0.6, // Adjust height for image container
|
||||
width: itemWidth,
|
||||
0.7, // Adjust height for image container
|
||||
// width: itemWidth,
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.bgGrey,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
@@ -219,8 +199,6 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
AppNetworkImage(
|
||||
height: 70,
|
||||
width: 150,
|
||||
imageUrl: product
|
||||
.productImages!.first.url ??
|
||||
"https://5.imimg.com/data5/SELLER/Default/2024/2/385126988/OL/DA/VW/8627346/1l-fortune-sunflower-oil.jpg",
|
||||
@@ -231,19 +209,22 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
right: 1,
|
||||
bottom: 0,
|
||||
child: Container(
|
||||
height: 50,
|
||||
width: 50,
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 10, vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.red,
|
||||
borderRadius:
|
||||
BorderRadius.circular(5),
|
||||
BorderRadius.circular(100),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"${calculateDiscountPercentage(double.parse(product.basePrice), double.parse(product!.discountPrice))}% OFF",
|
||||
"${calculateDiscountPercentage(double.parse(product.basePrice), double.parse(product!.discountPrice))}% \nOFF",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15)),
|
||||
fontSize: 12)),
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -340,8 +321,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
Row(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
"₹${product.discountPrice ?? " "}",
|
||||
@@ -389,17 +369,14 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
height:
|
||||
MediaQuery.of(context).size.height *
|
||||
0.038,
|
||||
width:
|
||||
MediaQuery.of(context).size.width *
|
||||
width: MediaQuery.of(context).size.width *
|
||||
0.1,
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.lightGreen,
|
||||
borderRadius:
|
||||
BorderRadius.circular(5),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
child: Center(
|
||||
child: provider
|
||||
.isLoading[product.id] ??
|
||||
child: provider.isLoading[product.id] ??
|
||||
false
|
||||
? Padding(
|
||||
padding:
|
||||
@@ -431,7 +408,6 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
@@ -494,7 +470,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
var category = categories[index];
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8),
|
||||
padding: const EdgeInsets.only(bottom: 0),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
provider.iscroll = true;
|
||||
@@ -505,15 +481,17 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
provider.notifyListeners();
|
||||
|
||||
if (category.id == "all") {
|
||||
provider.gettAllProduct(context, "", true, '');
|
||||
provider.gettAllProduct(context, "", true, '', false);
|
||||
} else {
|
||||
// Load filtered products
|
||||
provider.gettAllProduct(
|
||||
context, "/category/${category.id}", true, '');
|
||||
context, "/category/${category.id}", true, '', false);
|
||||
}
|
||||
|
||||
activeIndexProvider.setActiveIndex(index);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 8),
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: activeIndexProvider.activeIndex == index
|
||||
@@ -521,12 +499,13 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
: APPCOLOR.bgGrey,
|
||||
borderRadius: BorderRadius.circular(5)),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(top: 10, bottom: 10),
|
||||
padding: const EdgeInsets.only(top: 0, bottom: 0),
|
||||
child: SizedBox(
|
||||
//height: 80,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
width: 70,
|
||||
child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
if (category.name == "ALL") ...{
|
||||
if (provider.categoriesss.isNotEmpty)
|
||||
@@ -541,7 +520,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
provider.hasMore = true;
|
||||
provider.page = 1;
|
||||
provider.gettAllProduct(
|
||||
context, "", true, '');
|
||||
context, "", true, '', false);
|
||||
provider.getAllcategory(context);
|
||||
} else {
|
||||
provider.categoryList.clear();
|
||||
@@ -556,13 +535,113 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
.map(
|
||||
(category) => PopupMenuItem(
|
||||
value: category,
|
||||
child: Text(
|
||||
category.name ?? "Unknown"),
|
||||
child: Text(category.name ??
|
||||
"Unknown"),
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
child: Center(
|
||||
child: CachedNetworkImage(
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Text("All"),
|
||||
Icon(Icons.arrow_drop_down)
|
||||
],
|
||||
),
|
||||
CachedNetworkImage(
|
||||
|
||||
/// height: height,
|
||||
///width: width,
|
||||
errorWidget:
|
||||
(context, url, error) {
|
||||
return Container(
|
||||
height: 40,
|
||||
// width: 50,
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.bgGrey,
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(10),
|
||||
border: Border.all(
|
||||
color: Colors
|
||||
.transparent,
|
||||
width: 1,
|
||||
)),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
APPASSETS.placeHolder,
|
||||
height: 50 * 0.4,
|
||||
color: APPCOLOR.bgGrey,
|
||||
)),
|
||||
);
|
||||
},
|
||||
placeholder: (context, url) {
|
||||
return Container(
|
||||
height: 50,
|
||||
width: 50,
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.bgGrey,
|
||||
borderRadius:
|
||||
BorderRadius
|
||||
.circular(10),
|
||||
border: Border.all(
|
||||
color:
|
||||
APPCOLOR.bgGrey,
|
||||
width: 1,
|
||||
)),
|
||||
child: const Center(
|
||||
child:
|
||||
CupertinoActivityIndicator(),
|
||||
),
|
||||
);
|
||||
},
|
||||
imageBuilder:
|
||||
(context, cIMage) {
|
||||
return Container(
|
||||
// width: 60,
|
||||
height: 70,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(5!),
|
||||
),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: cIMage,
|
||||
)),
|
||||
);
|
||||
},
|
||||
imageUrl: provider
|
||||
.selectedCategory
|
||||
?.image ??
|
||||
'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png'),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
||||
// Container(
|
||||
// child: AppNetworkImage(
|
||||
// height: 50,
|
||||
// width: 60,
|
||||
// imageUrl: provider
|
||||
// .selectedCategory?.image ??
|
||||
// 'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png',
|
||||
// backGroundColor: APPCOLOR.bgGrey,
|
||||
// radius: 10,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
),
|
||||
} else ...{
|
||||
Column(
|
||||
children: [
|
||||
CachedNetworkImage(
|
||||
|
||||
/// height: height,
|
||||
///width: width,
|
||||
@@ -606,115 +685,12 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
},
|
||||
imageBuilder: (context, cIMage) {
|
||||
return Container(
|
||||
width: 60,
|
||||
height: 70,
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.bgGrey,
|
||||
borderRadius:
|
||||
BorderRadius.only(
|
||||
topLeft:
|
||||
Radius.circular(5!),
|
||||
topRight:
|
||||
Radius.circular(5!),
|
||||
),
|
||||
border: Border.all(
|
||||
color: APPCOLOR.bgGrey,
|
||||
width: 1),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: cIMage,
|
||||
)),
|
||||
);
|
||||
},
|
||||
imageUrl: provider
|
||||
.selectedCategory?.image ??
|
||||
'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png'),
|
||||
)
|
||||
|
||||
// Container(
|
||||
// child: AppNetworkImage(
|
||||
// height: 50,
|
||||
// width: 60,
|
||||
// imageUrl: provider
|
||||
// .selectedCategory?.image ??
|
||||
// 'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png',
|
||||
// backGroundColor: APPCOLOR.bgGrey,
|
||||
// radius: 10,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
),
|
||||
} else ...{
|
||||
Column(
|
||||
children: [
|
||||
// Center(
|
||||
// child: Container(
|
||||
// child: AppNetworkImage(
|
||||
// height: 50,
|
||||
// width: 50,
|
||||
// imageUrl: category.image ??
|
||||
// 'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png',
|
||||
// backGroundColor: APPCOLOR.bgGrey,
|
||||
// radius: 10,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
|
||||
CachedNetworkImage(
|
||||
|
||||
/// height: height,
|
||||
///width: width,
|
||||
errorWidget: (context, url, error) {
|
||||
return Container(
|
||||
// height: 50,
|
||||
// width: 50,
|
||||
height: 60,
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.bgGrey,
|
||||
borderRadius:
|
||||
BorderRadius.circular(10),
|
||||
border: Border.all(
|
||||
color: Colors.transparent,
|
||||
width: 1,
|
||||
)),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
APPASSETS.placeHolder,
|
||||
height: 50 * 0.4,
|
||||
color: APPCOLOR.bgGrey,
|
||||
)),
|
||||
);
|
||||
},
|
||||
placeholder: (context, url) {
|
||||
return Container(
|
||||
height: 50,
|
||||
width: 50,
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.bgGrey,
|
||||
borderRadius:
|
||||
BorderRadius.circular(10),
|
||||
border: Border.all(
|
||||
color: APPCOLOR.bgGrey,
|
||||
width: 1,
|
||||
)),
|
||||
child: const Center(
|
||||
child: CupertinoActivityIndicator(),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(5!),
|
||||
),
|
||||
);
|
||||
},
|
||||
imageBuilder: (context, cIMage) {
|
||||
return Container(
|
||||
width: 60,
|
||||
height: 70,
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.bgGrey,
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(5!),
|
||||
topRight: Radius.circular(5!),
|
||||
),
|
||||
border: Border.all(
|
||||
color: APPCOLOR.bgGrey,
|
||||
width: 1),
|
||||
image: DecorationImage(
|
||||
fit: BoxFit.fill,
|
||||
image: cIMage,
|
||||
@@ -722,7 +698,6 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
);
|
||||
},
|
||||
imageUrl: category.image),
|
||||
|
||||
SizedBox(
|
||||
height: 5,
|
||||
),
|
||||
@@ -733,7 +708,8 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: activeIndexProvider.activeIndex ==
|
||||
style:
|
||||
activeIndexProvider.activeIndex ==
|
||||
index
|
||||
? context.customExtraBold(
|
||||
APPCOLOR.balck1A1A1A, 9)
|
||||
@@ -744,22 +720,13 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
|
||||
],
|
||||
),
|
||||
},
|
||||
// SizedBox(
|
||||
// width: 5,
|
||||
// ),
|
||||
// Container(
|
||||
// width: 2,
|
||||
// height: 0,
|
||||
// color: activeIndexProvider.activeIndex == index
|
||||
// ? APPCOLOR.lightGreen
|
||||
// : Colors.transparent,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -93,8 +93,6 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
title: Row(
|
||||
children: [
|
||||
AppNetworkImage(
|
||||
height: 25,
|
||||
width: 25,
|
||||
imageUrl: suggestion.productImages!.first.url,
|
||||
backGroundColor: APPCOLOR.bgGrey,
|
||||
radius: 10,
|
||||
@@ -309,6 +307,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
// },
|
||||
// ));
|
||||
|
||||
|
||||
context.push(MyRoutes.FRUITVEGGIEDETAIL);
|
||||
},
|
||||
child: Text(
|
||||
@@ -379,8 +378,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
itemBuilder: (context, index) {
|
||||
double cardWidth = MediaQuery.of(context).size.width * 0.4;
|
||||
return Padding(
|
||||
padding:
|
||||
const EdgeInsets.only(right: 10, bottom: 5, top: 5),
|
||||
padding: const EdgeInsets.only(right: 0, bottom: 0, top: 0),
|
||||
child: Skeletonizer(
|
||||
enabled: provider.isBestdealingloading,
|
||||
child: Container(
|
||||
@@ -478,72 +476,71 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
);
|
||||
},
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(
|
||||
right: 10, bottom: 5, top: 5),
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
width: cardWidth,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey.withOpacity(0.1),
|
||||
blurRadius: 1,
|
||||
offset: const Offset(5, 5),
|
||||
),
|
||||
// BoxShadow(
|
||||
// color: Colors.grey.withOpacity(0.1),
|
||||
// blurRadius: 1,
|
||||
// offset: const Offset(5, 5),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(5),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Center(
|
||||
child: Container(
|
||||
height:
|
||||
MediaQuery.of(context).size.height *
|
||||
height: MediaQuery.of(context).size.height *
|
||||
0.12,
|
||||
width: cardWidth * 0.9,
|
||||
// width: cardWidth * 0.9,
|
||||
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.bgGrey,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
boxShadow: [
|
||||
// BoxShadow(
|
||||
// color: Colors.grey.withOpacity(0.1),
|
||||
// blurRadius: 1,
|
||||
// offset: const Offset(5, 5),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
|
||||
child: Stack(
|
||||
alignment: Alignment.center,
|
||||
//alignment: Alignment.center,
|
||||
children: [
|
||||
AppNetworkImage(
|
||||
height: MediaQuery.of(context)
|
||||
.size
|
||||
.height *
|
||||
0.08,
|
||||
width: cardWidth * 0.7,
|
||||
imageUrl: bestdealproduct
|
||||
.productImages
|
||||
?.first
|
||||
?.url ??
|
||||
.productImages?.first?.url ??
|
||||
"",
|
||||
radius: 10,
|
||||
backGroundColor: Colors.transparent,
|
||||
),
|
||||
Positioned(
|
||||
right: 1,
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
bottom: 5,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 10, vertical: 10),
|
||||
width: 50,
|
||||
height: 50,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.red,
|
||||
borderRadius:
|
||||
BorderRadius.circular(5),
|
||||
BorderRadius.circular(100),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% OFF",
|
||||
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% \nOFF",
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontWeight:
|
||||
FontWeight.bold,
|
||||
fontSize: 18)),
|
||||
fontSize: 10)),
|
||||
),
|
||||
),
|
||||
)
|
||||
@@ -552,9 +549,9 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height:
|
||||
MediaQuery.of(context).size.height *
|
||||
height: MediaQuery.of(context).size.height *
|
||||
0.01),
|
||||
|
||||
Text(
|
||||
bestdealproduct.name ?? "",
|
||||
textAlign: TextAlign.left,
|
||||
@@ -564,8 +561,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
APPCOLOR.balck1A1A1A, 14),
|
||||
),
|
||||
SizedBox(
|
||||
height:
|
||||
MediaQuery.of(context).size.height *
|
||||
height: MediaQuery.of(context).size.height *
|
||||
0.005),
|
||||
Text(
|
||||
bestdealproduct.unit ?? "",
|
||||
@@ -599,8 +595,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: context
|
||||
.customMedium(
|
||||
Colors.grey
|
||||
.withOpacity(0.8),
|
||||
Colors.grey.withOpacity(0.8),
|
||||
15)
|
||||
.copyWith(
|
||||
decoration: TextDecoration
|
||||
@@ -649,8 +644,8 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
width: 10,
|
||||
child:
|
||||
CircularProgressIndicator(
|
||||
color: Colors
|
||||
.white,
|
||||
color:
|
||||
Colors.white,
|
||||
strokeWidth: 2),
|
||||
),
|
||||
)
|
||||
@@ -670,7 +665,6 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -775,8 +769,6 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
right: 15,
|
||||
bottom: 15,
|
||||
child: AppNetworkImage(
|
||||
height: 130,
|
||||
width: 150,
|
||||
imageUrl: banner.imageUrl ??
|
||||
'https://e7.pngegg.com/pngimages/742/816/png-clipart-coca-cola-can-illustration-coca-cola-soft-drink-surge-pepsi-coke-sweetness-cola-thumbnail.png',
|
||||
backGroundColor: Colors.transparent,
|
||||
@@ -850,7 +842,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
crossAxisSpacing: 5,
|
||||
mainAxisSpacing: 5,
|
||||
childAspectRatio: MediaQuery.of(context).size.width /
|
||||
(MediaQuery.of(context).size.height / 1.2),
|
||||
(MediaQuery.of(context).size.height / 1.4),
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
var product = provider.homeproducts[index];
|
||||
@@ -870,13 +862,13 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
height: 95,
|
||||
// width: 80,
|
||||
decoration: BoxDecoration(
|
||||
color: APPCOLOR.bgGrey,
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
child: AppNetworkImage(
|
||||
height: 80,
|
||||
width: 80,
|
||||
imageUrl: product.productImages!.first.url,
|
||||
backGroundColor: APPCOLOR.bgGrey,
|
||||
radius: 10,
|
||||
@@ -886,7 +878,7 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
Text(
|
||||
product.name ?? "",
|
||||
textAlign: TextAlign.center,
|
||||
maxLines: 2,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: context.customMedium(
|
||||
APPCOLOR.balck1A1A1A, 14),
|
||||
|
||||
@@ -321,8 +321,7 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
|
||||
width: 50,
|
||||
height: 50,
|
||||
child: AppNetworkImage(
|
||||
height: MediaQuery.of(context).size.height * 0.08,
|
||||
width: 48,
|
||||
|
||||
imageUrl: orderitem.productImage ?? "",
|
||||
backGroundColor: Colors.transparent,
|
||||
),
|
||||
|
||||
@@ -129,11 +129,7 @@ class _MyOrderScreenState extends State<MyOrderScreen> {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
AppNetworkImage(
|
||||
height: MediaQuery.of(context)
|
||||
.size
|
||||
.height *
|
||||
0.08,
|
||||
width: 48,
|
||||
|
||||
imageUrl: order.orderItems!.first
|
||||
.productImage,
|
||||
backGroundColor:
|
||||
|
||||
@@ -148,8 +148,7 @@ class _ProductDetailsState extends State<ProductDetails> {
|
||||
var productImage =
|
||||
provider.productDetails.data!.productImages![index];
|
||||
return AppNetworkImage(
|
||||
height: MediaQuery.of(context).size.height * 0.08,
|
||||
width: 2000,
|
||||
|
||||
imageUrl: productImage.url,
|
||||
backGroundColor: Colors.transparent,
|
||||
radius: 10,
|
||||
@@ -953,8 +952,7 @@ class _ProductDetailsState extends State<ProductDetails> {
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
child: AppNetworkImage(
|
||||
height: 90,
|
||||
width: 90,
|
||||
|
||||
imageUrl: "",
|
||||
backGroundColor: Colors.transparent,
|
||||
),
|
||||
@@ -1028,9 +1026,7 @@ class _ProductDetailsState extends State<ProductDetails> {
|
||||
alignment: Alignment.center,
|
||||
children: [
|
||||
AppNetworkImage(
|
||||
height: MediaQuery.of(context).size.height *
|
||||
0.08,
|
||||
width: cardWidth * 0.7,
|
||||
|
||||
imageUrl: bestdealproduct
|
||||
.productImages?.first?.url ??
|
||||
"",
|
||||
|
||||
@@ -110,14 +110,16 @@ class _ProfileScreenState extends State<ProfileScreen> {
|
||||
),
|
||||
Stack(
|
||||
children: [
|
||||
AppNetworkImage(
|
||||
Container(
|
||||
height: top < 150 ? 30 : 50,
|
||||
width: top < 150 ? 30 : 50,
|
||||
child: AppNetworkImage(
|
||||
imageUrl: provider.profile ?? "",
|
||||
radius: 90,
|
||||
backGroundColor: Colors.white,
|
||||
boxFit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
|
||||
@@ -85,8 +85,7 @@ class _RatingReviewScreenState extends State<RatingReviewScreen> {
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
AppNetworkImage(
|
||||
height: 100,
|
||||
width: 100,
|
||||
|
||||
imageUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTdQLwDqDwd2JfzifvfBTFT8I7iKFFevcedYg&s",
|
||||
backGroundColor: Colors.white,
|
||||
boxFit: BoxFit.cover,
|
||||
|
||||
24
pubspec.lock
24
pubspec.lock
@@ -748,18 +748,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker
|
||||
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
|
||||
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "10.0.5"
|
||||
version: "10.0.4"
|
||||
leak_tracker_flutter_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: leak_tracker_flutter_testing
|
||||
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
|
||||
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.5"
|
||||
version: "3.0.3"
|
||||
leak_tracker_testing:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -804,10 +804,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: material_color_utilities
|
||||
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
|
||||
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.11.1"
|
||||
version: "0.8.0"
|
||||
material_design_icons_flutter:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -820,10 +820,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
|
||||
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.15.0"
|
||||
version: "1.12.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1177,10 +1177,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: test_api
|
||||
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
|
||||
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.7.2"
|
||||
version: "0.7.0"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1297,10 +1297,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: vm_service
|
||||
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
|
||||
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "14.2.5"
|
||||
version: "14.2.1"
|
||||
web:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user