fixed ui issue

This commit is contained in:
2025-04-01 19:03:18 +05:30
parent 13f96aaf00
commit c2167f57d3
20 changed files with 1378 additions and 1482 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -1 +1 @@
3.24.3 3.22.3

View File

@@ -1,52 +1,52 @@
# This is a generated file; do not edit or check into version control. # 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/ connectivity_plus=/Users/rajeevsingh/.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_linux=/Users/rajeevsingh/.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_macos=/Users/rajeevsingh/.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/ file_selector_windows=/Users/rajeevsingh/.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=/Users/rajeevsingh/.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_android=/Users/rajeevsingh/.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_ios=/Users/rajeevsingh/.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_macos=/Users/rajeevsingh/.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_inappwebview_web=/Users/rajeevsingh/.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/ flutter_plugin_android_lifecycle=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.22/
fluttertoast=/Users/apple/.pub-cache/hosted/pub.dev/fluttertoast-8.2.11/ fluttertoast=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/fluttertoast-8.2.11/
geocoding=/Users/apple/.pub-cache/hosted/pub.dev/geocoding-3.0.0/ geocoding=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geocoding-3.0.0/
geocoding_android=/Users/apple/.pub-cache/hosted/pub.dev/geocoding_android-3.3.1/ geocoding_android=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geocoding_android-3.3.1/
geocoding_ios=/Users/apple/.pub-cache/hosted/pub.dev/geocoding_ios-3.0.1/ geocoding_ios=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geocoding_ios-3.0.1/
geolocator=/Users/apple/.pub-cache/hosted/pub.dev/geolocator-13.0.2/ geolocator=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geolocator-13.0.2/
geolocator_android=/Users/apple/.pub-cache/hosted/pub.dev/geolocator_android-4.6.1/ geolocator_android=/Users/rajeevsingh/.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_apple=/Users/rajeevsingh/.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_web=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/geolocator_web-4.1.1/
geolocator_windows=/Users/apple/.pub-cache/hosted/pub.dev/geolocator_windows-0.2.3/ geolocator_windows=/Users/rajeevsingh/.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_api_headers=/Users/rajeevsingh/.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=/Users/rajeevsingh/.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_android=/Users/rajeevsingh/.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_ios=/Users/rajeevsingh/.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/ google_maps_flutter_web=/Users/rajeevsingh/.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=/Users/rajeevsingh/.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_android=/Users/rajeevsingh/.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_for_web=/Users/rajeevsingh/.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_ios=/Users/rajeevsingh/.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_linux=/Users/rajeevsingh/.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_macos=/Users/rajeevsingh/.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/ image_picker_windows=/Users/rajeevsingh/.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/ package_info_plus=/Users/rajeevsingh/.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=/Users/rajeevsingh/.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_android=/Users/rajeevsingh/.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_foundation=/Users/rajeevsingh/.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_linux=/Users/rajeevsingh/.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/ path_provider_windows=/Users/rajeevsingh/.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=/Users/rajeevsingh/.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_android=/Users/rajeevsingh/.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_foundation=/Users/rajeevsingh/.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_linux=/Users/rajeevsingh/.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_web=/Users/rajeevsingh/.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/ shared_preferences_windows=/Users/rajeevsingh/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/
sqflite=/Users/apple/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/ sqflite=/Users/rajeevsingh/.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=/Users/rajeevsingh/.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_android=/Users/rajeevsingh/.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_ios=/Users/rajeevsingh/.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_linux=/Users/rajeevsingh/.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_macos=/Users/rajeevsingh/.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_web=/Users/rajeevsingh/.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/ 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

View File

@@ -6,8 +6,8 @@ import 'package:grocery_app/utils/constants/color_constant.dart';
//Custom AppBar widget //Custom AppBar widget
class AppNetworkImage extends StatelessWidget { class AppNetworkImage extends StatelessWidget {
final double height; // final double height;
final double width; // final double width;
final String imageUrl; final String imageUrl;
final double? noImageTextSize; final double? noImageTextSize;
final bool isBorderShow; final bool isBorderShow;
@@ -22,8 +22,6 @@ class AppNetworkImage extends StatelessWidget {
const AppNetworkImage( const AppNetworkImage(
{super.key, {super.key,
required this.height,
required this.width,
required this.imageUrl, required this.imageUrl,
this.noImageTextSize, this.noImageTextSize,
this.isBorderShow = false, this.isBorderShow = false,
@@ -38,15 +36,12 @@ class AppNetworkImage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return return CachedNetworkImage(
CachedNetworkImage(
/// height: height, /// height: height,
///width: width, ///width: width,
errorWidget: (context, url, error) { errorWidget: (context, url, error) {
return Container( return Container(
height: height,
width: width,
decoration: BoxDecoration( decoration: BoxDecoration(
color: backGroundColor, color: backGroundColor,
borderRadius: BorderRadius.circular(radius ?? 0), borderRadius: BorderRadius.circular(radius ?? 0),
@@ -57,15 +52,12 @@ class AppNetworkImage extends StatelessWidget {
child: Center( child: Center(
child: Image.asset( child: Image.asset(
APPASSETS.placeHolder, APPASSETS.placeHolder,
height: height * 0.4,
color: imageColor, color: imageColor,
)), )),
); );
}, },
placeholder: (context, url) { placeholder: (context, url) {
return Container( return Container(
width: width,
height: height,
decoration: BoxDecoration( decoration: BoxDecoration(
color: backGroundColor, color: backGroundColor,
borderRadius: BorderRadius.circular(radius ?? 0), borderRadius: BorderRadius.circular(radius ?? 0),
@@ -81,7 +73,7 @@ class AppNetworkImage extends StatelessWidget {
imageBuilder: (context, cIMage) { imageBuilder: (context, cIMage) {
return Container( return Container(
// width: width, // width: width,
height: 100, // height: 100,
decoration: BoxDecoration( decoration: BoxDecoration(
color: backGroundColor, color: backGroundColor,
borderRadius: isFromSlider borderRadius: isFromSlider
@@ -109,7 +101,5 @@ class AppNetworkImage extends StatelessWidget {
); );
}, },
imageUrl: imageUrl); imageUrl: imageUrl);
} }
} }

View File

@@ -39,10 +39,15 @@ class ProductProvider extends ChangeNotifier {
bool iscroll = true; bool iscroll = true;
Future<void> gettAllProduct( Future<void> gettAllProduct(BuildContext context, String id, bool status,
BuildContext context, String id, bool status, String search) async { String search, bool first) async {
if (isLoadingg || !hasMore) return; if (isLoadingg || !hasMore) return;
print("kjldfgjklfjkdgjkhlfg");
if (first) {
print("kdjfhgkfkjdghkjkdfg");
products.clear();
notifyListeners();
}
if (id.isNotEmpty) { if (id.isNotEmpty) {
products.clear(); products.clear();
@@ -81,6 +86,8 @@ class ProductProvider extends ChangeNotifier {
// hasMore = false; // hasMore = false;
// } // }
print("jdksgfkgkbfgh ${response}");
if (response.data != null && response.data!.isNotEmpty) { if (response.data != null && response.data!.isNotEmpty) {
if (id.isNotEmpty) { if (id.isNotEmpty) {
products = response.data!; products = response.data!;

View File

@@ -166,8 +166,6 @@ class _BestDealScreenState extends State<BestDealScreen> {
top: 0, top: 0,
right: 0, right: 0,
child: AppNetworkImage( child: AppNetworkImage(
height: 70,
width: 70,
radius: 10, radius: 10,
imageUrl: provider.lastImageurl ?? imageUrl: provider.lastImageurl ??
"https://5.imimg.com/data5/SELLER/Default/2024/2/385126988/OL/DA/VW/8627346/1l-fortune-sunflower-oil.jpg", "https://5.imimg.com/data5/SELLER/Default/2024/2/385126988/OL/DA/VW/8627346/1l-fortune-sunflower-oil.jpg",
@@ -326,166 +324,155 @@ class _BestDealScreenState extends State<BestDealScreen> {
), ),
], ],
), ),
child: Padding( child: Column(
padding: const EdgeInsets.all(5), crossAxisAlignment: CrossAxisAlignment.start,
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Container(
children: [ height: MediaQuery.of(context).size.height * 0.15,
Container( // width: MediaQuery.of(context).size.width *
height: MediaQuery.of(context).size.height * // 0.4, // Dynamic width
0.15, // Dynamic height decoration: BoxDecoration(
width: MediaQuery.of(context).size.width * color: APPCOLOR.bgGrey,
0.4, // Dynamic width borderRadius: BorderRadius.circular(15),
decoration: BoxDecoration(
color: APPCOLOR.bgGrey,
borderRadius: BorderRadius.circular(15),
),
child: Stack(
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 ??
"",
backGroundColor: Colors.transparent,
radius: 10,
),
),
Positioned(
right: 1,
bottom: 0,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 10, vertical: 10),
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(5),
),
child: Center(
child: Text(
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% OFF",
style: TextStyle(
color: Colors.white, fontSize: 15)),
),
),
)
],
),
), ),
SizedBox( child: Stack(
height: MediaQuery.of(context).size.height * 0.005), //alignment: Alignment.center,
Text(
bestdealproduct.name ?? "",
textAlign: TextAlign.left,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: context.customMedium(APPCOLOR.balck1A1A1A, 16),
),
Text(
bestdealproduct.unit ?? "",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customMedium(
Colors.grey.withOpacity(0.8),
12,
),
),
if (bestdealproduct!.quantity > 0)
Text("In Stock ",
style:
TextStyle(color: Colors.green, fontSize: 14)),
Spacer(),
Row(
children: [ children: [
Column( Center(
children: [ child: AppNetworkImage(
Text( imageUrl:
"${bestdealproduct.discountPrice ?? ""} ", bestdealproduct.productImages?.first.url ??
textAlign: TextAlign.left, "",
maxLines: 1, backGroundColor: Colors.transparent,
overflow: TextOverflow.ellipsis, radius: 10,
style:
context.customSemiBold(Colors.black, 15),
),
Text(
"${bestdealproduct.basePrice ?? ""}",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context
.customMedium(
Colors.grey.withOpacity(0.8),
15,
)
.copyWith(
decoration: TextDecoration.lineThrough,
),
),
],
),
Spacer(),
Align(
alignment: Alignment.centerRight,
child: GestureDetector(
onTap: () async {
if (await SharedPrefUtils.getToken() !=
null) {
await provider.addToWithCart(
context,
bestdealproduct.id!,
bestdealproduct,
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,
decoration: BoxDecoration(
color: APPCOLOR.lightGreen,
borderRadius: BorderRadius.circular(5),
),
child: Center(
child: provider.isLoading[
bestdealproduct.id] ??
false
? Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
height: 10,
width: 10,
child: CircularProgressIndicator(
color: Colors.white,
strokeWidth: 2),
),
)
: Text(
// provider.cartItems
// .contains(bestdealproduct.id)
// ? 'Added'
// :
'Add',
style: context.customRegular(
Colors.white, 12),
),
),
),
), ),
), ),
Positioned(
right: 1,
bottom: 0,
child: Container(
width: 50,
height: 50,
decoration: BoxDecoration(
color: Colors.red,
borderRadius: BorderRadius.circular(100),
),
child: Center(
child: Text(
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% \nOFF",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white, fontSize: 12)),
),
),
)
], ],
), ),
], ),
), SizedBox(
height: MediaQuery.of(context).size.height * 0.005),
Text(
bestdealproduct.name ?? "",
textAlign: TextAlign.left,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: context.customMedium(APPCOLOR.balck1A1A1A, 16),
),
Text(
bestdealproduct.unit ?? "",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customMedium(
Colors.grey.withOpacity(0.8),
12,
),
),
if (bestdealproduct!.quantity > 0)
Text("In Stock ",
style:
TextStyle(color: Colors.green, fontSize: 14)),
Spacer(),
Row(
children: [
Column(
children: [
Text(
"${bestdealproduct.discountPrice ?? ""} ",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customSemiBold(Colors.black, 15),
),
Text(
"${bestdealproduct.basePrice ?? ""}",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context
.customMedium(
Colors.grey.withOpacity(0.8),
15,
)
.copyWith(
decoration: TextDecoration.lineThrough,
),
),
],
),
Spacer(),
Align(
alignment: Alignment.centerRight,
child: GestureDetector(
onTap: () async {
if (await SharedPrefUtils.getToken() != null) {
await provider.addToWithCart(
context,
bestdealproduct.id!,
bestdealproduct,
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,
decoration: BoxDecoration(
color: APPCOLOR.lightGreen,
borderRadius: BorderRadius.circular(5),
),
child: Center(
child: provider
.isLoading[bestdealproduct.id] ??
false
? Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
height: 10,
width: 10,
child: CircularProgressIndicator(
color: Colors.white,
strokeWidth: 2),
),
)
: Text(
// provider.cartItems
// .contains(bestdealproduct.id)
// ? 'Added'
// :
'Add',
style: context.customRegular(
Colors.white, 12),
),
),
),
),
),
],
),
],
), ),
), ),
); );

View File

@@ -156,10 +156,7 @@ class _MycartState extends State<Mycart> {
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
AppNetworkImage( AppNetworkImage(
height:
MediaQuery.of(context).size.height *
0.08,
width: cardWidth * 0.7,
imageUrl: bestdealproduct imageUrl: bestdealproduct
.productImages?.first?.url ?? .productImages?.first?.url ??
"", "",
@@ -473,8 +470,7 @@ class _MycartState extends State<Mycart> {
borderRadius: BorderRadius.circular(5), borderRadius: BorderRadius.circular(5),
), ),
child: AppNetworkImage( child: AppNetworkImage(
width: 60.w,
height: 70.h,
imageUrl: imageUrl:
items.product!.productImages!.first.url ?? " ", items.product!.productImages!.first.url ?? " ",
backGroundColor: APPCOLOR.bgGrey, backGroundColor: APPCOLOR.bgGrey,
@@ -1115,8 +1111,7 @@ class _MycartState extends State<Mycart> {
right: 15, right: 15,
bottom: 15, bottom: 15,
child: AppNetworkImage( child: AppNetworkImage(
height: 130,
width: 150,
imageUrl: banner.imageUrl ?? 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', '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, backGroundColor: Colors.transparent,

View File

@@ -85,8 +85,7 @@ class _FavouriteScreenState extends State<FavouriteScreen>
top: 0, top: 0,
right: 0, right: 0,
child: AppNetworkImage( child: AppNetworkImage(
height: 70,
width: 70,
radius: 10, radius: 10,
imageUrl: wishListProvider imageUrl: wishListProvider
.productDatumlastImageurl ?? .productDatumlastImageurl ??
@@ -214,8 +213,7 @@ class _FavouriteScreenState extends State<FavouriteScreen>
.product!.productImages!.first.url ?? .product!.productImages!.first.url ??
"https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png", "https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png",
backGroundColor: APPCOLOR.bgGrey, backGroundColor: APPCOLOR.bgGrey,
height: 20,
width: 20,
radius: 10, radius: 10,
), ),
), ),

File diff suppressed because it is too large Load Diff

View File

@@ -93,8 +93,6 @@ class _HomeScreenState extends State<HomeScreen> {
title: Row( title: Row(
children: [ children: [
AppNetworkImage( AppNetworkImage(
height: 25,
width: 25,
imageUrl: suggestion.productImages!.first.url, imageUrl: suggestion.productImages!.first.url,
backGroundColor: APPCOLOR.bgGrey, backGroundColor: APPCOLOR.bgGrey,
radius: 10, radius: 10,
@@ -309,6 +307,7 @@ class _HomeScreenState extends State<HomeScreen> {
// }, // },
// )); // ));
context.push(MyRoutes.FRUITVEGGIEDETAIL); context.push(MyRoutes.FRUITVEGGIEDETAIL);
}, },
child: Text( child: Text(
@@ -379,8 +378,7 @@ class _HomeScreenState extends State<HomeScreen> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
double cardWidth = MediaQuery.of(context).size.width * 0.4; double cardWidth = MediaQuery.of(context).size.width * 0.4;
return Padding( return Padding(
padding: padding: const EdgeInsets.only(right: 0, bottom: 0, top: 0),
const EdgeInsets.only(right: 10, bottom: 5, top: 5),
child: Skeletonizer( child: Skeletonizer(
enabled: provider.isBestdealingloading, enabled: provider.isBestdealingloading,
child: Container( child: Container(
@@ -478,196 +476,192 @@ class _HomeScreenState extends State<HomeScreen> {
); );
}, },
child: Padding( child: Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.all(8.0),
right: 10, bottom: 5, top: 5),
child: Container( child: Container(
width: cardWidth, width: cardWidth,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
boxShadow: [ boxShadow: [
BoxShadow( // BoxShadow(
color: Colors.grey.withOpacity(0.1), // color: Colors.grey.withOpacity(0.1),
blurRadius: 1, // blurRadius: 1,
offset: const Offset(5, 5), // offset: const Offset(5, 5),
), // ),
], ],
), ),
child: Padding( child: Column(
padding: const EdgeInsets.all(5), crossAxisAlignment: CrossAxisAlignment.start,
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Center(
children: [ child: Container(
Center( height: MediaQuery.of(context).size.height *
child: Container( 0.12,
height: // width: cardWidth * 0.9,
MediaQuery.of(context).size.height *
0.12, decoration: BoxDecoration(
width: cardWidth * 0.9, color: APPCOLOR.bgGrey,
decoration: BoxDecoration( borderRadius: BorderRadius.circular(15),
color: APPCOLOR.bgGrey, boxShadow: [
borderRadius: BorderRadius.circular(15), // BoxShadow(
), // color: Colors.grey.withOpacity(0.1),
child: Stack( // blurRadius: 1,
alignment: Alignment.center, // offset: const Offset(5, 5),
children: [ // ),
AppNetworkImage( ],
height: MediaQuery.of(context)
.size
.height *
0.08,
width: cardWidth * 0.7,
imageUrl: bestdealproduct
.productImages
?.first
?.url ??
"",
radius: 10,
backGroundColor: Colors.transparent,
),
Positioned(
right: 1,
bottom: 0,
child: Container(
padding: EdgeInsets.symmetric(
horizontal: 10, vertical: 10),
decoration: BoxDecoration(
color: Colors.red,
borderRadius:
BorderRadius.circular(5),
),
child: Center(
child: Text(
"${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% OFF",
style: TextStyle(
color: Colors.white,
fontWeight:
FontWeight.bold,
fontSize: 18)),
),
),
)
],
),
), ),
),
SizedBox( child: Stack(
height: //alignment: Alignment.center,
MediaQuery.of(context).size.height * children: [
0.01), AppNetworkImage(
Text( imageUrl: bestdealproduct
bestdealproduct.name ?? "", .productImages?.first?.url ??
textAlign: TextAlign.left, "",
maxLines: 2, radius: 10,
overflow: TextOverflow.ellipsis, backGroundColor: Colors.transparent,
style: context.customMedium( ),
APPCOLOR.balck1A1A1A, 14), Positioned(
), right: 0,
SizedBox( bottom: 5,
height:
MediaQuery.of(context).size.height *
0.005),
Text(
bestdealproduct.unit ?? "",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customMedium(
Colors.grey.withOpacity(0.8), 12),
),
// SizedBox(
// height:
// MediaQuery.of(context).size.height *
// 0.005),
const Spacer(),
Row(
children: [
Column(
children: [
Text(
"${bestdealproduct.discountPrice ?? ""} ",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customSemiBold(
Colors.black, 15),
),
Text(
"${bestdealproduct.basePrice ?? ""}",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context
.customMedium(
Colors.grey
.withOpacity(0.8),
15)
.copyWith(
decoration: TextDecoration
.lineThrough),
),
],
),
const Spacer(),
Align(
alignment: Alignment.centerRight,
child: GestureDetector(
onTap: () async {
if (await SharedPrefUtils
.getToken() !=
null) {
await provider.addToCart(context,
bestdealproduct.id!, 1);
} else {
context.push(MyRoutes.SIGNUP);
}
},
child: Container( child: Container(
height: MediaQuery.of(context) width: 50,
.size height: 50,
.height *
0.035,
width: MediaQuery.of(context)
.size
.width *
0.1,
decoration: BoxDecoration( decoration: BoxDecoration(
color: APPCOLOR.lightGreen, color: Colors.red,
borderRadius: borderRadius:
BorderRadius.circular(5), BorderRadius.circular(100),
), ),
child: Center( child: Center(
child: provider.isLoading[ child: Text(
bestdealproduct.id] ?? "${calculateDiscountPercentage(double.parse(bestdealproduct.basePrice), double.parse(bestdealproduct.discountPrice))}% \nOFF",
false textAlign: TextAlign.center,
? Padding( style: TextStyle(
padding: color: Colors.white,
const EdgeInsets.all( fontWeight:
8.0), FontWeight.bold,
child: SizedBox( fontSize: 10)),
height: 10,
width: 10,
child:
CircularProgressIndicator(
color: Colors
.white,
strokeWidth: 2),
),
)
: Text(
'Add',
style:
context.customRegular(
Colors.white, 12),
),
), ),
), ),
)
],
),
),
),
SizedBox(
height: MediaQuery.of(context).size.height *
0.01),
Text(
bestdealproduct.name ?? "",
textAlign: TextAlign.left,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: context.customMedium(
APPCOLOR.balck1A1A1A, 14),
),
SizedBox(
height: MediaQuery.of(context).size.height *
0.005),
Text(
bestdealproduct.unit ?? "",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customMedium(
Colors.grey.withOpacity(0.8), 12),
),
// SizedBox(
// height:
// MediaQuery.of(context).size.height *
// 0.005),
const Spacer(),
Row(
children: [
Column(
children: [
Text(
"${bestdealproduct.discountPrice ?? ""} ",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customSemiBold(
Colors.black, 15),
),
Text(
"${bestdealproduct.basePrice ?? ""}",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context
.customMedium(
Colors.grey.withOpacity(0.8),
15)
.copyWith(
decoration: TextDecoration
.lineThrough),
),
],
),
const Spacer(),
Align(
alignment: Alignment.centerRight,
child: GestureDetector(
onTap: () async {
if (await SharedPrefUtils
.getToken() !=
null) {
await provider.addToCart(context,
bestdealproduct.id!, 1);
} else {
context.push(MyRoutes.SIGNUP);
}
},
child: Container(
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] ??
false
? Padding(
padding:
const EdgeInsets.all(
8.0),
child: SizedBox(
height: 10,
width: 10,
child:
CircularProgressIndicator(
color:
Colors.white,
strokeWidth: 2),
),
)
: Text(
'Add',
style:
context.customRegular(
Colors.white, 12),
),
),
), ),
), ),
], ),
), ],
], ),
), ],
), ),
), ),
), ),
@@ -775,8 +769,6 @@ class _HomeScreenState extends State<HomeScreen> {
right: 15, right: 15,
bottom: 15, bottom: 15,
child: AppNetworkImage( child: AppNetworkImage(
height: 130,
width: 150,
imageUrl: banner.imageUrl ?? 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', '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, backGroundColor: Colors.transparent,
@@ -850,7 +842,7 @@ class _HomeScreenState extends State<HomeScreen> {
crossAxisSpacing: 5, crossAxisSpacing: 5,
mainAxisSpacing: 5, mainAxisSpacing: 5,
childAspectRatio: MediaQuery.of(context).size.width / childAspectRatio: MediaQuery.of(context).size.width /
(MediaQuery.of(context).size.height / 1.2), (MediaQuery.of(context).size.height / 1.4),
), ),
itemBuilder: (context, index) { itemBuilder: (context, index) {
var product = provider.homeproducts[index]; var product = provider.homeproducts[index];
@@ -870,13 +862,13 @@ class _HomeScreenState extends State<HomeScreen> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
height: 95,
// width: 80,
decoration: BoxDecoration( decoration: BoxDecoration(
color: APPCOLOR.bgGrey, color: APPCOLOR.bgGrey,
borderRadius: BorderRadius.circular(5), borderRadius: BorderRadius.circular(5),
), ),
child: AppNetworkImage( child: AppNetworkImage(
height: 80,
width: 80,
imageUrl: product.productImages!.first.url, imageUrl: product.productImages!.first.url,
backGroundColor: APPCOLOR.bgGrey, backGroundColor: APPCOLOR.bgGrey,
radius: 10, radius: 10,
@@ -886,7 +878,7 @@ class _HomeScreenState extends State<HomeScreen> {
Text( Text(
product.name ?? "", product.name ?? "",
textAlign: TextAlign.center, textAlign: TextAlign.center,
maxLines: 2, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
style: context.customMedium( style: context.customMedium(
APPCOLOR.balck1A1A1A, 14), APPCOLOR.balck1A1A1A, 14),

View File

@@ -321,8 +321,7 @@ class _OrderDetailsScreenState extends State<OrderDetailsScreen> {
width: 50, width: 50,
height: 50, height: 50,
child: AppNetworkImage( child: AppNetworkImage(
height: MediaQuery.of(context).size.height * 0.08,
width: 48,
imageUrl: orderitem.productImage ?? "", imageUrl: orderitem.productImage ?? "",
backGroundColor: Colors.transparent, backGroundColor: Colors.transparent,
), ),

View File

@@ -129,11 +129,7 @@ class _MyOrderScreenState extends State<MyOrderScreen> {
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
AppNetworkImage( AppNetworkImage(
height: MediaQuery.of(context)
.size
.height *
0.08,
width: 48,
imageUrl: order.orderItems!.first imageUrl: order.orderItems!.first
.productImage, .productImage,
backGroundColor: backGroundColor:

View File

@@ -148,8 +148,7 @@ class _ProductDetailsState extends State<ProductDetails> {
var productImage = var productImage =
provider.productDetails.data!.productImages![index]; provider.productDetails.data!.productImages![index];
return AppNetworkImage( return AppNetworkImage(
height: MediaQuery.of(context).size.height * 0.08,
width: 2000,
imageUrl: productImage.url, imageUrl: productImage.url,
backGroundColor: Colors.transparent, backGroundColor: Colors.transparent,
radius: 10, radius: 10,
@@ -953,8 +952,7 @@ class _ProductDetailsState extends State<ProductDetails> {
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
), ),
child: AppNetworkImage( child: AppNetworkImage(
height: 90,
width: 90,
imageUrl: "", imageUrl: "",
backGroundColor: Colors.transparent, backGroundColor: Colors.transparent,
), ),
@@ -1028,9 +1026,7 @@ class _ProductDetailsState extends State<ProductDetails> {
alignment: Alignment.center, alignment: Alignment.center,
children: [ children: [
AppNetworkImage( AppNetworkImage(
height: MediaQuery.of(context).size.height *
0.08,
width: cardWidth * 0.7,
imageUrl: bestdealproduct imageUrl: bestdealproduct
.productImages?.first?.url ?? .productImages?.first?.url ??
"", "",

View File

@@ -110,13 +110,15 @@ class _ProfileScreenState extends State<ProfileScreen> {
), ),
Stack( Stack(
children: [ children: [
AppNetworkImage( Container(
height: top < 150 ? 30 : 50, height: top < 150 ? 30 : 50,
width: top < 150 ? 30 : 50, width: top < 150 ? 30 : 50,
imageUrl: provider.profile ?? "", child: AppNetworkImage(
radius: 90, imageUrl: provider.profile ?? "",
backGroundColor: Colors.white, radius: 90,
boxFit: BoxFit.fill, backGroundColor: Colors.white,
boxFit: BoxFit.fill,
),
), ),
], ],
), ),

View File

@@ -85,8 +85,7 @@ class _RatingReviewScreenState extends State<RatingReviewScreen> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
AppNetworkImage( AppNetworkImage(
height: 100,
width: 100,
imageUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTdQLwDqDwd2JfzifvfBTFT8I7iKFFevcedYg&s", imageUrl: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTdQLwDqDwd2JfzifvfBTFT8I7iKFFevcedYg&s",
backGroundColor: Colors.white, backGroundColor: Colors.white,
boxFit: BoxFit.cover, boxFit: BoxFit.cover,

View File

@@ -748,18 +748,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker name: leak_tracker
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "10.0.5" version: "10.0.4"
leak_tracker_flutter_testing: leak_tracker_flutter_testing:
dependency: transitive dependency: transitive
description: description:
name: leak_tracker_flutter_testing name: leak_tracker_flutter_testing
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.5" version: "3.0.3"
leak_tracker_testing: leak_tracker_testing:
dependency: transitive dependency: transitive
description: description:
@@ -804,10 +804,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.11.1" version: "0.8.0"
material_design_icons_flutter: material_design_icons_flutter:
dependency: "direct main" dependency: "direct main"
description: description:
@@ -820,10 +820,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.15.0" version: "1.12.0"
mime: mime:
dependency: transitive dependency: transitive
description: description:
@@ -1177,10 +1177,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.2" version: "0.7.0"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
@@ -1297,10 +1297,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: vm_service name: vm_service
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "14.2.5" version: "14.2.1"
web: web:
dependency: transitive dependency: transitive
description: description: