Compare commits

..

10 Commits

Author SHA1 Message Date
e3f26aab40 Initial commit of Flutter project 2025-09-19 11:16:52 +05:30
9abcd609bf Code committed 2025-08-08 22:21:49 +05:30
f572983146 final last code 2025-07-01 11:20:04 +05:30
082c98ae5e last commit 2025-06-30 22:11:53 +05:30
13629b29d4 update category and privacy policy 2025-05-29 12:40:46 +05:30
bc1a25a2ac final code push 2025-05-14 22:52:53 +05:30
dfee0afba3 final code 2025-05-12 23:29:53 +05:30
f1abe0e179 final category issue fixed 2025-05-11 09:25:49 +05:30
ce0a60dbd1 seaching competed 2025-05-10 15:38:46 +05:30
e10f6747c9 final after change app 2025-05-10 13:09:19 +05:30
57 changed files with 1782 additions and 3431 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -1,38 +0,0 @@
// Flutter web plugin registrant file.
//
// Generated file. Do not edit.
//
// @dart = 2.13
// ignore_for_file: type=lint
import 'package:connectivity_plus/src/connectivity_plus_web.dart';
import 'package:firebase_core_web/firebase_core_web.dart';
import 'package:firebase_messaging_web/firebase_messaging_web.dart';
import 'package:flutter_inappwebview_web/web/main.dart';
import 'package:fluttertoast/fluttertoast_web.dart';
import 'package:geolocator_web/geolocator_web.dart';
import 'package:google_maps_flutter_web/google_maps_flutter_web.dart';
import 'package:image_picker_for_web/image_picker_for_web.dart';
import 'package:package_info_plus/src/package_info_plus_web.dart';
import 'package:permission_handler_html/permission_handler_html.dart';
import 'package:shared_preferences_web/shared_preferences_web.dart';
import 'package:url_launcher_web/url_launcher_web.dart';
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
void registerPlugins([final Registrar? pluginRegistrar]) {
final Registrar registrar = pluginRegistrar ?? webPluginRegistrar;
ConnectivityPlusWebPlugin.registerWith(registrar);
FirebaseCoreWeb.registerWith(registrar);
FirebaseMessagingWeb.registerWith(registrar);
InAppWebViewFlutterPlugin.registerWith(registrar);
FluttertoastWebPlugin.registerWith(registrar);
GeolocatorPlugin.registerWith(registrar);
GoogleMapsPlugin.registerWith(registrar);
ImagePickerPlugin.registerWith(registrar);
PackageInfoPlusWebPlugin.registerWith(registrar);
WebPermissionHandler.registerWith(registrar);
SharedPreferencesPlugin.registerWith(registrar);
UrlLauncherPlugin.registerWith(registrar);
registrar.registerMessageHandler();
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,745 +0,0 @@
_flutterfire_internals
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/_flutterfire_internals-1.3.54/
file:///Users/apple/.pub-cache/hosted/pub.dev/_flutterfire_internals-1.3.54/lib/
animation_list
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/animation_list-3.1.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/animation_list-3.1.0/lib/
animations
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/animations-2.0.11/
file:///Users/apple/.pub-cache/hosted/pub.dev/animations-2.0.11/lib/
args
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/args-2.6.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/args-2.6.0/lib/
art_sweetalert
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/art_sweetalert-0.0.5/
file:///Users/apple/.pub-cache/hosted/pub.dev/art_sweetalert-0.0.5/lib/
async
2.18
file:///Users/apple/.pub-cache/hosted/pub.dev/async-2.11.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/async-2.11.0/lib/
back_button_interceptor
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/back_button_interceptor-8.0.4/
file:///Users/apple/.pub-cache/hosted/pub.dev/back_button_interceptor-8.0.4/lib/
blur
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/blur-4.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/blur-4.0.0/lib/
boolean_selector
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/lib/
cached_network_image
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/cached_network_image-3.3.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/cached_network_image-3.3.1/lib/
cached_network_image_platform_interface
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/cached_network_image_platform_interface-4.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/cached_network_image_platform_interface-4.0.0/lib/
cached_network_image_web
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/cached_network_image_web-1.2.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/cached_network_image_web-1.2.0/lib/
carousel_slider
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/carousel_slider-5.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/carousel_slider-5.0.0/lib/
change_app_package_name
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/change_app_package_name-1.5.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/change_app_package_name-1.5.0/lib/
characters
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/characters-1.3.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/characters-1.3.0/lib/
clock
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/clock-1.1.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/clock-1.1.1/lib/
collection
2.18
file:///Users/apple/.pub-cache/hosted/pub.dev/collection-1.18.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/
connectivity_plus
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.3/
file:///Users/apple/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.3/lib/
connectivity_plus_platform_interface
2.18
file:///Users/apple/.pub-cache/hosted/pub.dev/connectivity_plus_platform_interface-2.0.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/connectivity_plus_platform_interface-2.0.1/lib/
cross_file
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/cross_file-0.3.4+2/
file:///Users/apple/.pub-cache/hosted/pub.dev/cross_file-0.3.4+2/lib/
crypto
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/crypto-3.0.6/
file:///Users/apple/.pub-cache/hosted/pub.dev/crypto-3.0.6/lib/
csslib
3.1
file:///Users/apple/.pub-cache/hosted/pub.dev/csslib-1.0.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/csslib-1.0.2/lib/
cupertino_icons
3.1
file:///Users/apple/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8/
file:///Users/apple/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8/lib/
dbus
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/dbus-0.7.11/
file:///Users/apple/.pub-cache/hosted/pub.dev/dbus-0.7.11/lib/
dio
2.18
file:///Users/apple/.pub-cache/hosted/pub.dev/dio-5.8.0+1/
file:///Users/apple/.pub-cache/hosted/pub.dev/dio-5.8.0+1/lib/
dio_web_adapter
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/dio_web_adapter-2.1.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/dio_web_adapter-2.1.0/lib/
dots_indicator
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/dots_indicator-3.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/dots_indicator-3.0.0/lib/
dotted_border
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/dotted_border-2.1.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/dotted_border-2.1.0/lib/
fake_async
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/fake_async-1.3.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/fake_async-1.3.1/lib/
ffi
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/ffi-2.1.3/
file:///Users/apple/.pub-cache/hosted/pub.dev/ffi-2.1.3/lib/
file
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/file-7.0.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/file-7.0.1/lib/
file_selector_linux
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3+2/
file:///Users/apple/.pub-cache/hosted/pub.dev/file_selector_linux-0.9.3+2/lib/
file_selector_macos
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/
file:///Users/apple/.pub-cache/hosted/pub.dev/file_selector_macos-0.9.4+2/lib/
file_selector_platform_interface
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/file_selector_platform_interface-2.6.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/file_selector_platform_interface-2.6.2/lib/
file_selector_windows
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/
file:///Users/apple/.pub-cache/hosted/pub.dev/file_selector_windows-0.9.3+3/lib/
firebase_core
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/firebase_core-3.13.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/firebase_core-3.13.0/lib/
firebase_core_platform_interface
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/firebase_core_platform_interface-5.4.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/firebase_core_platform_interface-5.4.0/lib/
firebase_core_web
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/firebase_core_web-2.22.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/firebase_core_web-2.22.0/lib/
firebase_messaging
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/firebase_messaging-15.2.5/
file:///Users/apple/.pub-cache/hosted/pub.dev/firebase_messaging-15.2.5/lib/
firebase_messaging_platform_interface
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/firebase_messaging_platform_interface-4.6.5/
file:///Users/apple/.pub-cache/hosted/pub.dev/firebase_messaging_platform_interface-4.6.5/lib/
firebase_messaging_web
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/firebase_messaging_web-3.10.5/
file:///Users/apple/.pub-cache/hosted/pub.dev/firebase_messaging_web-3.10.5/lib/
fixnum
3.1
file:///Users/apple/.pub-cache/hosted/pub.dev/fixnum-1.1.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/fixnum-1.1.1/lib/
flutter_animate
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_animate-4.5.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_animate-4.5.2/lib/
flutter_cache_manager
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_cache_manager-3.3.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_cache_manager-3.3.1/lib/
flutter_google_places
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_google_places-0.3.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_google_places-0.3.0/lib/
flutter_inappwebview
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview-6.0.0/lib/
flutter_inappwebview_android
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_android-1.0.13/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_android-1.0.13/lib/
flutter_inappwebview_internal_annotations
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_internal_annotations-1.2.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_internal_annotations-1.2.0/lib/
flutter_inappwebview_ios
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.0.13/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_ios-1.0.13/lib/
flutter_inappwebview_macos
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_macos-1.0.11/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_macos-1.0.11/lib/
flutter_inappwebview_platform_interface
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_platform_interface-1.0.10/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_platform_interface-1.0.10/lib/
flutter_inappwebview_web
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_web-1.0.8/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_inappwebview_web-1.0.8/lib/
flutter_lints
3.1
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_lints-3.0.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_lints-3.0.2/lib/
flutter_local_notifications
3.1
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_local_notifications-18.0.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_local_notifications-18.0.1/lib/
flutter_local_notifications_linux
3.1
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-5.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-5.0.0/lib/
flutter_local_notifications_platform_interface
3.1
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_local_notifications_platform_interface-8.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_local_notifications_platform_interface-8.0.0/lib/
flutter_plugin_android_lifecycle
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.22/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.22/lib/
flutter_rating_bar
2.14
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_rating_bar-4.0.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_rating_bar-4.0.1/lib/
flutter_rating_stars
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_rating_stars-1.1.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_rating_stars-1.1.0/lib/
flutter_screenutil
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_screenutil-5.9.3/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_screenutil-5.9.3/lib/
flutter_shaders
2.19
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_shaders-0.1.3/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_shaders-0.1.3/lib/
flutter_svg
2.19
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_svg-2.0.9/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_svg-2.0.9/lib/
flutter_toggle_tab
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_toggle_tab-1.5.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/flutter_toggle_tab-1.5.1/lib/
fluttertoast
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/fluttertoast-8.2.11/
file:///Users/apple/.pub-cache/hosted/pub.dev/fluttertoast-8.2.11/lib/
fpdart
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/fpdart-1.1.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/fpdart-1.1.1/lib/
gap
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/gap-3.0.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/gap-3.0.1/lib/
geocoding
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/geocoding-3.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/geocoding-3.0.0/lib/
geocoding_android
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/geocoding_android-3.3.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/geocoding_android-3.3.1/lib/
geocoding_ios
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/geocoding_ios-3.0.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/geocoding_ios-3.0.1/lib/
geocoding_platform_interface
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/geocoding_platform_interface-3.2.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/geocoding_platform_interface-3.2.0/lib/
geolocator
2.15
file:///Users/apple/.pub-cache/hosted/pub.dev/geolocator-13.0.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/geolocator-13.0.2/lib/
geolocator_android
2.15
file:///Users/apple/.pub-cache/hosted/pub.dev/geolocator_android-4.6.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/geolocator_android-4.6.1/lib/
geolocator_apple
2.15
file:///Users/apple/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.8+1/
file:///Users/apple/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.8+1/lib/
geolocator_platform_interface
2.15
file:///Users/apple/.pub-cache/hosted/pub.dev/geolocator_platform_interface-4.2.4/
file:///Users/apple/.pub-cache/hosted/pub.dev/geolocator_platform_interface-4.2.4/lib/
geolocator_web
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/geolocator_web-4.1.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/geolocator_web-4.1.1/lib/
geolocator_windows
2.15
file:///Users/apple/.pub-cache/hosted/pub.dev/geolocator_windows-0.2.3/
file:///Users/apple/.pub-cache/hosted/pub.dev/geolocator_windows-0.2.3/lib/
get_it
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/get_it-8.0.3/
file:///Users/apple/.pub-cache/hosted/pub.dev/get_it-8.0.3/lib/
go_router
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/go_router-14.8.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/go_router-14.8.0/lib/
google_api_headers
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/google_api_headers-1.6.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/google_api_headers-1.6.0/lib/
google_fonts
2.14
file:///Users/apple/.pub-cache/hosted/pub.dev/google_fonts-4.0.4/
file:///Users/apple/.pub-cache/hosted/pub.dev/google_fonts-4.0.4/lib/
google_maps
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps-8.1.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps-8.1.1/lib/
google_maps_flutter
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter-2.10.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter-2.10.0/lib/
google_maps_flutter_android
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter_android-2.14.7/
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter_android-2.14.7/lib/
google_maps_flutter_ios
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter_ios-2.13.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter_ios-2.13.2/lib/
google_maps_flutter_platform_interface
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter_platform_interface-2.10.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter_platform_interface-2.10.0/lib/
google_maps_flutter_web
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter_web-0.5.10/
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps_flutter_web-0.5.10/lib/
google_maps_webservice
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps_webservice-0.0.20-nullsafety.5/
file:///Users/apple/.pub-cache/hosted/pub.dev/google_maps_webservice-0.0.20-nullsafety.5/lib/
html
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/html-0.15.5/
file:///Users/apple/.pub-cache/hosted/pub.dev/html-0.15.5/lib/
http
2.19
file:///Users/apple/.pub-cache/hosted/pub.dev/http-0.13.6/
file:///Users/apple/.pub-cache/hosted/pub.dev/http-0.13.6/lib/
http_parser
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/http_parser-4.0.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/http_parser-4.0.2/lib/
image_picker
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker-1.1.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker-1.1.2/lib/
image_picker_android
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+12/
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+12/lib/
image_picker_for_web
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.6/
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_for_web-3.0.6/lib/
image_picker_ios
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+2/
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_ios-0.8.12+2/lib/
image_picker_linux
2.19
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_linux-0.2.1+1/lib/
image_picker_macos
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+2/
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_macos-0.2.1+2/lib/
image_picker_platform_interface
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_platform_interface-2.10.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_platform_interface-2.10.1/lib/
image_picker_windows
2.19
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/
file:///Users/apple/.pub-cache/hosted/pub.dev/image_picker_windows-0.2.1+1/lib/
intl
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/intl-0.20.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/intl-0.20.2/lib/
js
2.19
file:///Users/apple/.pub-cache/hosted/pub.dev/js-0.6.7/
file:///Users/apple/.pub-cache/hosted/pub.dev/js-0.6.7/lib/
json_annotation
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/json_annotation-4.9.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/json_annotation-4.9.0/lib/
leak_tracker
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/leak_tracker-10.0.5/
file:///Users/apple/.pub-cache/hosted/pub.dev/leak_tracker-10.0.5/lib/
leak_tracker_flutter_testing
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.5/
file:///Users/apple/.pub-cache/hosted/pub.dev/leak_tracker_flutter_testing-3.0.5/lib/
leak_tracker_testing
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/lib/
lints
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/lints-3.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/lints-3.0.0/lib/
loader_overlay
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/loader_overlay-4.0.4+1/
file:///Users/apple/.pub-cache/hosted/pub.dev/loader_overlay-4.0.4+1/lib/
logging
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/logging-1.3.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/logging-1.3.0/lib/
matcher
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/
file:///Users/apple/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/lib/
material_color_utilities
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/material_color_utilities-0.11.1/lib/
material_design_icons_flutter
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/material_design_icons_flutter-7.0.7296/
file:///Users/apple/.pub-cache/hosted/pub.dev/material_design_icons_flutter-7.0.7296/lib/
meta
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/meta-1.15.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/meta-1.15.0/lib/
mime
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/mime-2.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/mime-2.0.0/lib/
nested
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/nested-1.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/nested-1.0.0/lib/
nm
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/nm-0.5.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/nm-0.5.0/lib/
octo_image
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/octo_image-2.1.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/octo_image-2.1.0/lib/
otp_text_field
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/otp_text_field-1.1.3/
file:///Users/apple/.pub-cache/hosted/pub.dev/otp_text_field-1.1.3/lib/
package_info_plus
2.18
file:///Users/apple/.pub-cache/hosted/pub.dev/package_info_plus-4.2.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/package_info_plus-4.2.0/lib/
package_info_plus_platform_interface
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/package_info_plus_platform_interface-2.0.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/package_info_plus_platform_interface-2.0.1/lib/
path
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/path-1.9.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/path-1.9.0/lib/
path_drawing
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/path_drawing-1.0.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/path_drawing-1.0.1/lib/
path_parsing
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/path_parsing-1.1.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/path_parsing-1.1.0/lib/
path_provider
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/path_provider-2.1.5/
file:///Users/apple/.pub-cache/hosted/pub.dev/path_provider-2.1.5/lib/
path_provider_android
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/path_provider_android-2.2.10/
file:///Users/apple/.pub-cache/hosted/pub.dev/path_provider_android-2.2.10/lib/
path_provider_foundation
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.1/lib/
path_provider_linux
2.19
file:///Users/apple/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/lib/
path_provider_platform_interface
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/path_provider_platform_interface-2.1.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/path_provider_platform_interface-2.1.2/lib/
path_provider_windows
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/lib/
permission_handler
2.15
file:///Users/apple/.pub-cache/hosted/pub.dev/permission_handler-11.3.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/permission_handler-11.3.1/lib/
permission_handler_android
2.15
file:///Users/apple/.pub-cache/hosted/pub.dev/permission_handler_android-12.0.13/
file:///Users/apple/.pub-cache/hosted/pub.dev/permission_handler_android-12.0.13/lib/
permission_handler_apple
2.18
file:///Users/apple/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.7/
file:///Users/apple/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.7/lib/
permission_handler_html
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/permission_handler_html-0.1.3+5/
file:///Users/apple/.pub-cache/hosted/pub.dev/permission_handler_html-0.1.3+5/lib/
permission_handler_platform_interface
2.14
file:///Users/apple/.pub-cache/hosted/pub.dev/permission_handler_platform_interface-4.2.3/
file:///Users/apple/.pub-cache/hosted/pub.dev/permission_handler_platform_interface-4.2.3/lib/
permission_handler_windows
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/permission_handler_windows-0.2.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/permission_handler_windows-0.2.1/lib/
petitparser
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/petitparser-6.0.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/petitparser-6.0.2/lib/
platform
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/platform-3.1.6/
file:///Users/apple/.pub-cache/hosted/pub.dev/platform-3.1.6/lib/
plugin_platform_interface
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8/
file:///Users/apple/.pub-cache/hosted/pub.dev/plugin_platform_interface-2.1.8/lib/
pretty_dio_logger
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/pretty_dio_logger-1.4.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/pretty_dio_logger-1.4.0/lib/
provider
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/provider-6.1.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/provider-6.1.2/lib/
readmore
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/readmore-3.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/readmore-3.0.0/lib/
rxdart
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/rxdart-0.26.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/rxdart-0.26.0/lib/
sanitize_html
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/sanitize_html-2.1.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/sanitize_html-2.1.0/lib/
shared_preferences
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences-2.3.3/
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences-2.3.3/lib/
shared_preferences_android
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.2/lib/
shared_preferences_foundation
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/lib/
shared_preferences_linux
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/lib/
shared_preferences_platform_interface
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_platform_interface-2.4.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_platform_interface-2.4.1/lib/
shared_preferences_web
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/lib/
shared_preferences_windows
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/lib/
shimmer
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/shimmer-3.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/shimmer-3.0.0/lib/
skeletonizer
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/skeletonizer-1.4.3/
file:///Users/apple/.pub-cache/hosted/pub.dev/skeletonizer-1.4.3/lib/
source_span
2.18
file:///Users/apple/.pub-cache/hosted/pub.dev/source_span-1.10.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/source_span-1.10.0/lib/
sprintf
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/sprintf-7.0.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/sprintf-7.0.0/lib/
sqflite
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/
file:///Users/apple/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/lib/
sqflite_common
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/sqflite_common-2.5.4/
file:///Users/apple/.pub-cache/hosted/pub.dev/sqflite_common-2.5.4/lib/
stack_trace
2.18
file:///Users/apple/.pub-cache/hosted/pub.dev/stack_trace-1.11.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/stack_trace-1.11.1/lib/
stream_channel
2.19
file:///Users/apple/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/stream_channel-2.1.2/lib/
stream_transform
3.1
file:///Users/apple/.pub-cache/hosted/pub.dev/stream_transform-2.1.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/stream_transform-2.1.1/lib/
string_scanner
2.18
file:///Users/apple/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/string_scanner-1.2.0/lib/
synchronized
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/synchronized-3.1.0+1/
file:///Users/apple/.pub-cache/hosted/pub.dev/synchronized-3.1.0+1/lib/
term_glyph
2.12
file:///Users/apple/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/term_glyph-1.2.1/lib/
test_api
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/test_api-0.7.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/test_api-0.7.2/lib/
timezone
2.19
file:///Users/apple/.pub-cache/hosted/pub.dev/timezone-0.9.4/
file:///Users/apple/.pub-cache/hosted/pub.dev/timezone-0.9.4/lib/
typed_data
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/typed_data-1.3.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/typed_data-1.3.2/lib/
url_launcher
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher-6.3.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher-6.3.1/lib/
url_launcher_android
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.9/
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.9/lib/
url_launcher_ios
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_ios-6.3.2/lib/
url_launcher_linux
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.1/lib/
url_launcher_macos
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.2/lib/
url_launcher_platform_interface
3.1
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_platform_interface-2.3.2/
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_platform_interface-2.3.2/lib/
url_launcher_web
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.3/
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_web-2.3.3/lib/
url_launcher_windows
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/
file:///Users/apple/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.4/lib/
uuid
3.0
file:///Users/apple/.pub-cache/hosted/pub.dev/uuid-4.5.1/
file:///Users/apple/.pub-cache/hosted/pub.dev/uuid-4.5.1/lib/
vector_graphics
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/vector_graphics-1.1.10+1/
file:///Users/apple/.pub-cache/hosted/pub.dev/vector_graphics-1.1.10+1/lib/
vector_graphics_codec
2.17
file:///Users/apple/.pub-cache/hosted/pub.dev/vector_graphics_codec-1.1.10+1/
file:///Users/apple/.pub-cache/hosted/pub.dev/vector_graphics_codec-1.1.10+1/lib/
vector_graphics_compiler
2.19
file:///Users/apple/.pub-cache/hosted/pub.dev/vector_graphics_compiler-1.1.10+1/
file:///Users/apple/.pub-cache/hosted/pub.dev/vector_graphics_compiler-1.1.10+1/lib/
vector_math
2.14
file:///Users/apple/.pub-cache/hosted/pub.dev/vector_math-2.1.4/
file:///Users/apple/.pub-cache/hosted/pub.dev/vector_math-2.1.4/lib/
vm_service
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/vm_service-14.2.5/
file:///Users/apple/.pub-cache/hosted/pub.dev/vm_service-14.2.5/lib/
web
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/web-1.1.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/web-1.1.0/lib/
win32
3.4
file:///Users/apple/.pub-cache/hosted/pub.dev/win32-5.5.4/
file:///Users/apple/.pub-cache/hosted/pub.dev/win32-5.5.4/lib/
xdg_directories
3.3
file:///Users/apple/.pub-cache/hosted/pub.dev/xdg_directories-1.1.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/xdg_directories-1.1.0/lib/
xml
3.2
file:///Users/apple/.pub-cache/hosted/pub.dev/xml-6.5.0/
file:///Users/apple/.pub-cache/hosted/pub.dev/xml-6.5.0/lib/
grocery_app
3.4
file:///Users/apple/Documents/Allflutter%20/freelancing/groceryApp/
file:///Users/apple/Documents/Allflutter%20/freelancing/groceryApp/lib/
sky_engine
3.2
file:///Users/apple/Documents/development/flutter/bin/cache/pkg/sky_engine/
file:///Users/apple/Documents/development/flutter/bin/cache/pkg/sky_engine/lib/
flutter
3.3
file:///Users/apple/Documents/development/flutter/packages/flutter/
file:///Users/apple/Documents/development/flutter/packages/flutter/lib/
flutter_test
3.3
file:///Users/apple/Documents/development/flutter/packages/flutter_test/
file:///Users/apple/Documents/development/flutter/packages/flutter_test/lib/
flutter_web_plugins
3.2
file:///Users/apple/Documents/development/flutter/packages/flutter_web_plugins/
file:///Users/apple/Documents/development/flutter/packages/flutter_web_plugins/lib/
2

View File

@@ -1 +0,0 @@
3.24.3

View File

@@ -1,63 +0,0 @@
# 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/
firebase_core=/Users/apple/.pub-cache/hosted/pub.dev/firebase_core-3.13.0/
firebase_core_web=/Users/apple/.pub-cache/hosted/pub.dev/firebase_core_web-2.22.0/
firebase_messaging=/Users/apple/.pub-cache/hosted/pub.dev/firebase_messaging-15.2.5/
firebase_messaging_web=/Users/apple/.pub-cache/hosted/pub.dev/firebase_messaging_web-3.10.5/
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_local_notifications=/Users/apple/.pub-cache/hosted/pub.dev/flutter_local_notifications-18.0.1/
flutter_local_notifications_linux=/Users/apple/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-5.0.0/
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/
permission_handler=/Users/apple/.pub-cache/hosted/pub.dev/permission_handler-11.3.1/
permission_handler_android=/Users/apple/.pub-cache/hosted/pub.dev/permission_handler_android-12.0.13/
permission_handler_apple=/Users/apple/.pub-cache/hosted/pub.dev/permission_handler_apple-9.4.7/
permission_handler_html=/Users/apple/.pub-cache/hosted/pub.dev/permission_handler_html-0.1.3+5/
permission_handler_windows=/Users/apple/.pub-cache/hosted/pub.dev/permission_handler_windows-0.2.1/
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/

File diff suppressed because one or more lines are too long

BIN
android/.DS_Store vendored

Binary file not shown.

View File

@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings"> <component name="GradleSettings">
<option name="linkedExternalProjectsSettings"> <option name="linkedExternalProjectsSettings">
<GradleProjectSettings> <GradleProjectSettings>
@@ -19,7 +20,10 @@
<option name="modules"> <option name="modules">
<set> <set>
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.3/android" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/connectivity_plus-6.1.3/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/firebase_core-3.13.0/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/firebase_messaging-15.2.5/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_inappwebview_android-1.0.13/android" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_inappwebview_android-1.0.13/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_local_notifications-18.0.1/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.22/android" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.22/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/fluttertoast-8.2.11/android" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/fluttertoast-8.2.11/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/geocoding_android-3.3.1/android" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/geocoding_android-3.3.1/android" />
@@ -29,6 +33,7 @@
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+12/android" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/image_picker_android-0.8.12+12/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/package_info_plus-4.2.0/android" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/package_info_plus-4.2.0/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.2.10/android" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/path_provider_android-2.2.10/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/permission_handler_android-12.0.13/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.2/android" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.2/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/android" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/sqflite-2.3.3+1/android" />
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.9/android" /> <option value="$USER_HOME$/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.9/android" />

View File

@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">

BIN
android/app/.DS_Store vendored

Binary file not shown.

View File

@@ -1,58 +1,68 @@
plugins { plugins {
id "com.android.application" id "com.android.application"
id "kotlin-android" id "kotlin-android"
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id "dev.flutter.flutter-gradle-plugin" id "dev.flutter.flutter-gradle-plugin"
} }
def localProperties = new Properties() // Load key.properties for signing release builds
def localPropertiesFile = rootProject.file("local.properties") def keystoreProperties = new Properties()
if (localPropertiesFile.exists()) { def keystorePropertiesFile = rootProject.file("key.properties")
localPropertiesFile.withReader("UTF-8") { reader -> if (keystorePropertiesFile.exists()) {
localProperties.load(reader) keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
} }
def flutterVersionCode = localProperties.getProperty("flutter.versionCode") // Flutter versioning
if (flutterVersionCode == null) { def flutterVersionCode = 12
flutterVersionCode = "1" def flutterVersionName = "1.0.4"
}
def flutterVersionName = localProperties.getProperty("flutter.versionName")
if (flutterVersionName == null) {
flutterVersionName = "1.0"
}
android { android {
namespace = "com.frontshop.userapp" namespace = "com.frontshop.userapp"
compileSdk = flutter.compileSdkVersion compileSdk = 35
ndkVersion = flutter.ndkVersion ndkVersion = "26.1.10909125" // Optional; only if you use native code
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
defaultConfig { defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.frontshop.userapp" applicationId = "com.frontshop.userapp"
// You can update the following values to match your application needs. minSdk = 23
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. targetSdk = 35
minSdk = flutter.minSdkVersion versionCode = flutterVersionCode
targetSdk = flutter.targetSdkVersion
versionCode = flutterVersionCode.toInteger()
versionName = flutterVersionName versionName = flutterVersionName
} }
signingConfigs {
release {
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}
buildTypes { buildTypes {
release { release {
// TODO: Add your own signing config for the release build. signingConfig = signingConfigs.release
// Signing with the debug keys for now, so `flutter run --release` works. minifyEnabled false
signingConfig = signingConfigs.debug shrinkResources false
} }
} }
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
coreLibraryDesugaringEnabled true
}
kotlinOptions {
jvmTarget = '1.8'
}
} }
flutter { flutter {
source = "../.." source = "../.."
} }
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
// ✅ PhonePe SDK - ensure this matches your maven URL from root `build.gradle`
}

Binary file not shown.

View File

@@ -1,35 +1,35 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
package="com.frontshop.userapp"> package="com.frontshop.userapp">
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<application
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/> android:requestLegacyExternalStorage="true"
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<application
android:requestLegacyExternalStorage="true"
android:enableOnBackInvokedCallback="true" android:enableOnBackInvokedCallback="true"
android:label="Frontshop" android:label="Frontshop"
android:name="${applicationName}" android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"> android:icon="@mipmap/ic_launcher">
<meta-data <!-- Firebase notification channel -->
android:name="com.google.firebase.messaging.default_notification_channel_id" <meta-data
android:value="high_importance_channel"/> android:name="com.google.firebase.messaging.default_notification_channel_id"
android:value="high_importance_channel"/>
<!-- Main activity -->
<activity <activity
android:name=".MainActivity" android:name=".MainActivity"
android:exported="true" android:exported="true"
@@ -39,69 +39,76 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true" android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize"> android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user <!-- Flutter splash theme -->
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data <meta-data
android:name="io.flutter.embedding.android.NormalTheme" android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" android:resource="@style/NormalTheme"/>
/>
<!-- PhonePe / Deeplink support -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="frontshop"
android:host="payment-response"
android:pathPrefix="/" />
</intent-filter>
<!-- Main launcher -->
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category android:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
<!-- Razorpay Tokenizer -->
<activity
android:name="com.razorpay.RzpTokeniserSdkFlutter.TokeniserSdkActivity"
android:theme="@style/Theme.AppCompat.NoActionBar"
android:exported="false" />
<!-- Firebase Messaging -->
<service
android:name="io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingService"
android:exported="true"
tools:replace="android:exported">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<!-- Firebase Maps API Key -->
<meta-data android:name="com.google.android.geo.API_KEY" <meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyAi3_Dls63iGs7Nccgdm-4FkS0rhT03-4U"/> android:value="AIzaSyAi3_Dls63iGs7Nccgdm-4FkS0rhT03-4U"/>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java --> <!-- Flutter embedding -->
<meta-data <meta-data
android:name="flutterEmbedding" android:name="flutterEmbedding"
android:value="2" /> android:value="2" />
<service
android:name="io.flutter.plugins.firebase.messaging.FlutterFirebaseMessagingService"
android:exported="true"
tools:replace="android:exported">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
</application> </application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. --> <!-- Queries for package visibility -->
<queries> <queries>
<intent> <intent>
<action android:name="android.intent.action.PROCESS_TEXT"/> <action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/> <data android:mimeType="text/plain"/>
</intent> </intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="sms" />
</intent>
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="tel" />
</intent>
<intent>
<action android:name="android.support.customtabs.action.CustomTabsService" />
</intent>
</queries> </queries>
<!-- Provide required visibility configuration for API level 30 and above -->
<queries>
<!-- If your app checks for SMS support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="sms" />
</intent>
<!-- If your app checks for call support -->
<intent>
<action android:name="android.intent.action.VIEW" />
<data android:scheme="tel" />
</intent>
<!-- If your application checks for inAppBrowserView launch mode support -->
<intent>
<action android:name="android.support.customtabs.action.CustomTabsService" />
</intent>
</queries>
</manifest> </manifest>

View File

@@ -1,5 +1,3 @@
package com.frontshop.userapp package com.frontshop.userapp
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.android.FlutterActivity class MainActivity : FlutterFragmentActivity()
class MainActivity: FlutterActivity()

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@@ -2,14 +2,18 @@ allprojects {
repositories { repositories {
google() google()
mavenCentral() mavenCentral()
// ✅ Required for PhonePe SDK
maven {
url "https://phonepe.mycloudrepo.io/public/repositories/phonepe-intentsdk-android"
}
} }
} }
rootProject.buildDir = "../build" rootProject.buildDir = "../build"
subprojects { subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}" project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(":app") project.evaluationDependsOn(":app")
} }

View File

@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip

View File

@@ -18,7 +18,7 @@ pluginManagement {
plugins { plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false id "com.android.application" version "8.6.0" apply false
id "org.jetbrains.kotlin.android" version "1.9.10" apply false id "org.jetbrains.kotlin.android" version "1.9.10" apply false
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

View File

@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project # Uncomment this line to define a global platform for your project
# platform :ios, '12.0' # platform :ios, '13.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'

View File

@@ -45,5 +45,21 @@
<true/> <true/>
<key>UIApplicationSupportsIndirectInputEvents</key> <key>UIApplicationSupportsIndirectInputEvents</key>
<true/> <true/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>tez</string>
<string>phonepe</string>
<string>paytmmp</string>
<string>bhim</string>
</array>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>frontshop</string> <!-- 👈 must match `appSchema` -->
</array>
</dict>
</array>
</dict> </dict>
</plist> </plist>

View File

@@ -28,7 +28,9 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async
await Firebase.initializeApp(); await Firebase.initializeApp();
print("💬 Background Message Received: ${message.notification?.title}"); print("💬 Background Message Received: ${message.notification?.title}");
if (message.notification != null) { if (message.notification != null) {
NotificationService.flutterLocalNotificationsPlugin.show( NotificationService.flutterLocalNotificationsPlugin.show(
message.hashCode, message.hashCode,
message.notification!.title, message.notification!.title,
message.notification!.body, message.notification!.body,
@@ -39,6 +41,7 @@ Future<void> _firebaseMessagingBackgroundHandler(RemoteMessage message) async
channelDescription: 'Used for important notifications.', channelDescription: 'Used for important notifications.',
importance: Importance.max, importance: Importance.max,
priority: Priority.high, priority: Priority.high,
), ),
), ),
); );

View File

@@ -1,11 +1,11 @@
class APIURL { class APIURL {
static const BASE_URL = "http://210.89.44.183:3333/xam/"; static const BASE_URL = "https://www.mv.frontshopemporium.in/xam/";
static const String sendOtp = "${BASE_URL}auth/send-otp/customer"; static const String sendOtp = "${BASE_URL}auth/send-otp/customer";
static const String verifyOtp = "${BASE_URL}auth/verify-otp/customer"; static const String verifyOtp = "${BASE_URL}auth/verify-otp/customer";
static const String loginOtp = "${BASE_URL}auth/login/customer"; static const String loginOtp = "${BASE_URL}auth/login/customer";
static const String login = "${BASE_URL}auth/login/vendor"; static const String login = "${BASE_URL}auth/login/vendor";
static const String customerRegister = "${BASE_URL}auth/register/customer"; static const String customerRegister = "${BASE_URL}auth/register/customer";
static const String getAllProduct = "${BASE_URL}products"; static const String getAllProduct = "${BASE_URL}products?order=home";
static const String getProductDetails = "${BASE_URL}products/"; static const String getProductDetails = "${BASE_URL}products/";
static const String getBanners = "${BASE_URL}banners"; static const String getBanners = "${BASE_URL}banners";
static const String customerLogOut = "${BASE_URL}auth/logout/customer"; static const String customerLogOut = "${BASE_URL}auth/logout/customer";
@@ -39,6 +39,8 @@ class APIURL {
static const String getProduct = "${BASE_URL}products"; static const String getProduct = "${BASE_URL}products";
static const String getCategoryByLevel = "${BASE_URL}categories/by-level/1"; static const String getCategoryByLevel = "${BASE_URL}categories/by-level/1";
static const String getMe = "${BASE_URL}auth/me"; static const String getMe = "${BASE_URL}auth/me";
static const String distanctByProduct = "${BASE_URL}distance/delivery-charges-by-distance";
static const String createProduct = "${BASE_URL}products"; static const String createProduct = "${BASE_URL}products";
@@ -50,6 +52,7 @@ class APIURL {
static const String updateStatus = "${BASE_URL}orders/items/"; static const String updateStatus = "${BASE_URL}orders/items/";
static const String checkAddress = "${BASE_URL}distance/by-address/"; static const String checkAddress = "${BASE_URL}distance/by-address/";
static const String productReview = "${BASE_URL}products/"; static const String productReview = "${BASE_URL}products/";
static const String upDateDeviceToken = "${BASE_URL}devices/register"; static const String upDateDeviceToken = "${BASE_URL}devices/register";

View File

@@ -68,8 +68,9 @@
// }; // };
// } // }
// To parse this JSON data, do
//
// final couponResponse = couponResponseFromJson(jsonString);
// To parse this JSON data, do // To parse this JSON data, do
// //
@@ -77,40 +78,41 @@
import 'dart:convert'; import 'dart:convert';
CouponResponse couponResponseFromJson(String str) => CouponResponse.fromJson(json.decode(str)); CouponResponse couponResponseFromJson(String str) =>
CouponResponse.fromJson(json.decode(str));
String couponResponseToJson(CouponResponse data) => json.encode(data.toJson()); String couponResponseToJson(CouponResponse data) => json.encode(data.toJson());
class CouponResponse { class CouponResponse {
bool? isValid; bool? isValid;
int? originalPrice; double? originalPrice;
int? eligibleSubtotal; double? eligibleSubtotal;
int? discountAmount; dynamic? discountAmount;
int? finalPrice; double? finalPrice;
String? message; String? message;
CouponDetails? couponDetails; CouponDetails? couponDetails;
CouponResponse({ CouponResponse({
this.isValid, this.isValid,
this.originalPrice, this.originalPrice,
this.eligibleSubtotal, this.eligibleSubtotal,
this.discountAmount, this.discountAmount,
this.finalPrice, this.finalPrice,
this.message, this.message,
this.couponDetails, this.couponDetails,
}); });
factory CouponResponse.fromJson(Map<String, dynamic> json) => CouponResponse( factory CouponResponse.fromJson(Map<String, dynamic> json) => CouponResponse(
isValid: json["isValid"], isValid: json["isValid"],
originalPrice: json["originalPrice"], originalPrice: json["originalPrice"].toDouble(),
eligibleSubtotal: json["eligibleSubtotal"], eligibleSubtotal: json["eligibleSubtotal"].toDouble(),
discountAmount: json["discountAmount"], discountAmount: json["discountAmount"],
finalPrice: json["finalPrice"], finalPrice: json["finalPrice"].toDouble(),
message: json["message"], message: json["message"],
couponDetails: CouponDetails.fromJson(json["couponDetails"]), couponDetails: CouponDetails.fromJson(json["couponDetails"]),
); );
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {
"isValid": isValid, "isValid": isValid,
"originalPrice": originalPrice, "originalPrice": originalPrice,
"eligibleSubtotal": eligibleSubtotal, "eligibleSubtotal": eligibleSubtotal,
@@ -118,30 +120,29 @@ class CouponResponse {
"finalPrice": finalPrice, "finalPrice": finalPrice,
"message": message, "message": message,
"couponDetails": couponDetails!.toJson(), "couponDetails": couponDetails!.toJson(),
}; };
} }
class CouponDetails { class CouponDetails {
String? code; String? code;
String ?type; String? type;
String ?discountValue; String? discountValue;
CouponDetails({ CouponDetails({
this.code, this.code,
this.type, this.type,
this.discountValue, this.discountValue,
}); });
factory CouponDetails.fromJson(Map<String, dynamic> json) => CouponDetails( factory CouponDetails.fromJson(Map<String, dynamic> json) => CouponDetails(
code: json["code"], code: json["code"],
type: json["type"], type: json["type"],
discountValue: json["discountValue"], discountValue: json["discountValue"],
); );
Map<String, dynamic> toJson() => { Map<String, dynamic> toJson() => {
"code": code, "code": code,
"type": type, "type": type,
"discountValue": discountValue, "discountValue": discountValue,
}; };
} }

View File

@@ -256,7 +256,6 @@ class AddtocartProvider extends ChangeNotifier {
print("ijdfhjhgjfgihj $data"); print("ijdfhjhgjfgihj $data");
try { try {
var result = await _homeRepo.applyCoupon(data); var result = await _homeRepo.applyCoupon(data);
return result.fold( return result.fold(
(error) { (error) {
@@ -273,8 +272,9 @@ class AddtocartProvider extends ChangeNotifier {
notifyListeners(); notifyListeners();
return false; return false;
}, },
(response) (response)
{ {
print("dfkhjkfgdkfkgh ");
if (response != null) { if (response != null) {
couponResponse = response; couponResponse = response;
_couponId = id; _couponId = id;
@@ -377,75 +377,66 @@ class AddtocartProvider extends ChangeNotifier {
////////////////////////////COD //////////// ////////////////////////////COD ////////////
Future<void> paymentCODOrder( Future<bool> paymentCODOrder(
BuildContext context, BuildContext context,
double subtotal, double subtotal,
int deliverCharge, int deliverCharge,
String couponId, String couponId,
String addressId, String addressId,
) async { ) async {
ispaymentLoader = true; ispaymentLoader = true;
notifyListeners(); notifyListeners();
var data;
if (couponId.isNotEmpty) {
data = {
"addressId": addressId,
"paymentMethod": "COD",
"paymentStatus": "PENDING",
"orderStatus": "PENDING",
"subtotal": subtotal,
"deliveryCharge": deliverCharge,
"transactionId": "phonepe_transaction_123",
"couponId": couponId
};
} else {
data = {
"addressId": addressId,
"paymentMethod": "COD",
"paymentStatus": "PENDING",
"orderStatus": "PENDING",
"subtotal": subtotal,
"deliveryCharge": deliverCharge,
};
}
print("kjfhxgkljfhg ${data}"); var data = {
"addressId": addressId,
"paymentMethod": "COD",
"paymentStatus": "PENDING",
"orderStatus": "PENDING",
"subtotal": subtotal,
"deliveryCharge": deliverCharge,
};
if (couponId.isNotEmpty) {
data["couponId"] = couponId;
data["transactionId"] = "phonepe_transaction_123";
}
try { try {
var result = await _homeRepo.paymentCODOrder(data); var result = await _homeRepo.paymentCODOrder(data);
return result.fold( return result.fold(
(error) { (error) {
Fluttertoast.showToast( Fluttertoast.showToast(
msg: "${error.message}", msg: "${error.message}",
toastLength: Toast.LENGTH_SHORT, toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM, gravity: ToastGravity.BOTTOM,
backgroundColor: Colors.green, backgroundColor: Colors.red,
textColor: Colors.white, textColor: Colors.white,
fontSize: 14.0, fontSize: 14.0,
); );
ispaymentLoader = false; ispaymentLoader = false;
notifyListeners(); notifyListeners();
return false;
}, },
(response) { (response) {
context.clearAndPush(routePath: MyRoutes.SUCCESSPAYMENT);
ispaymentLoader = false; ispaymentLoader = false;
notifyListeners(); notifyListeners();
return true;
}, },
); );
} catch (e) { } catch (e) {
ispaymentLoader = false; ispaymentLoader = false;
notifyListeners();
Fluttertoast.showToast( Fluttertoast.showToast(
msg: "${e}", msg: "${e}",
toastLength: Toast.LENGTH_SHORT, toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM, gravity: ToastGravity.BOTTOM,
backgroundColor: Colors.green, backgroundColor: Colors.red,
textColor: Colors.white, textColor: Colors.white,
fontSize: 14.0, fontSize: 14.0,
); );
notifyListeners(); return false;
} }
} }

View File

@@ -144,7 +144,7 @@ class ProductProvider extends ChangeNotifier {
"minPrice": "${minPrice}", "minPrice": "${minPrice}",
"maxPrice": maxprice, "maxPrice": maxprice,
"search": search, "search": search,
"sortBy": orderby, "sortBy": 'basePrice',
"sortOrder": "asc" "sortOrder": "asc"
}; };
} else { } else {
@@ -157,6 +157,8 @@ class ProductProvider extends ChangeNotifier {
"sortOrder": "asc" "sortOrder": "asc"
}; };
} }
print("ljdkgkjdfghkj ${data}");
var result = await _homeRepo.getAllProduct(data, context, id); var result = await _homeRepo.getAllProduct(data, context, id);
return result.fold( return result.fold(
@@ -180,11 +182,14 @@ class ProductProvider extends ChangeNotifier {
ProductDetailsData productDetails = ProductDetailsData(); ProductDetailsData productDetails = ProductDetailsData();
bool isProductLoading = true; bool isProductLoading = true;
Future<void> getProduuctDetails( Future<bool> getProduuctDetails(
BuildContext context, String id, int quantity, String price) async { BuildContext context, String id, int quantity, String price) async {
var data = {}; var data = {};
context.showLoader(show: true);
productDetails = ProductDetailsData(); productDetails = ProductDetailsData();
isProductLoading = true; isProductLoading = true;
quantitys = quantity; quantitys = quantity;
_totalPrice = quantity * (double.parse(price)); _totalPrice = quantity * (double.parse(price));
notifyListeners(); notifyListeners();
@@ -192,13 +197,18 @@ class ProductProvider extends ChangeNotifier {
var result = await _homeRepo.getProductDetails(data, context, id); var result = await _homeRepo.getProductDetails(data, context, id);
return result.fold( return result.fold(
(error) { (error) {
context.showLoader(show: false);
isProductLoading = false; isProductLoading = false;
notifyListeners(); notifyListeners();
return false;
}, },
(response) { (response) {
context.showLoader(show: false);
productDetails = response!; productDetails = response!;
isProductLoading = false; isProductLoading = false;
notifyListeners(); notifyListeners();
return true;
}, },
); );
} }
@@ -231,37 +241,13 @@ class ProductProvider extends ChangeNotifier {
Future<void> getAllcategory(BuildContext context) async { Future<void> getAllcategory(BuildContext context) async {
var data = {}; var data = {};
var result = await _homeRepo.getAllcategory(data, context);
return result.fold(
(error) {
print("djhgfjdfhjg ${error}");
iscategroyloading = false;
notifyListeners();
},
(response) {
print("jdshfjghdhfjhgjd");
categoryList = response.data!;
iscategroyloading = false;
notifyListeners();
},
);
}
Future<void> getSubcategory(BuildContext context, String? id) async {
var data = {"parentId": id};
print("kdjhgkjfkjgkj ${id}");
var result = await _homeRepo.getSubcategory(data, context); var result = await _homeRepo.getSubcategory(data, context);
return result.fold( return result.fold(
(error) { (error) {
print("djhgfjdfhjg ${error}");
iscategroyloading = false; iscategroyloading = false;
notifyListeners(); notifyListeners();
}, },
(response) { (response) {
print("dsfdgdfgfhfghjghjghjghjhkghj");
categoryList = response!; categoryList = response!;
iscategroyloading = false; iscategroyloading = false;
notifyListeners(); notifyListeners();
@@ -269,10 +255,31 @@ class ProductProvider extends ChangeNotifier {
); );
} }
// Future<void> getSubcategory(BuildContext context, String? id) async {
// var data = {"parentId": id};
// var result = await _homeRepo.getSubcategory(data, context);
// return result.fold(
// (error) {
// print("djhgfjdfhjg ${error}");
// subCategoryloading = false;
// notifyListeners();
// },
// (response) {
// print("dsfdgdfgfhfghjghjghjghjhkghj");
// categoryList = response!;
// subCategoryloading = false;
// notifyListeners();
// },
// );
// }
List<ProductCategoryModel> categoriesss = []; List<ProductCategoryModel> categoriesss = [];
ProductCategoryModel? selectedCategory; ProductCategoryModel? selectedCategory;
bool subCategoryloading = true;
Future<void> getCategoryByLevel() async { Future<void> getCategoryByLevel() async {
categoriesss.clear(); categoriesss.clear();
@@ -280,6 +287,7 @@ class ProductProvider extends ChangeNotifier {
result.fold( result.fold(
(error) { (error) {
subCategoryloading = false;
print("Error fetching categories: $error"); print("Error fetching categories: $error");
notifyListeners(); notifyListeners();
}, },
@@ -292,6 +300,7 @@ class ProductProvider extends ChangeNotifier {
} else { } else {
print("No categories found."); print("No categories found.");
} }
subCategoryloading = false;
notifyListeners(); // Notify UI after update notifyListeners(); // Notify UI after update
}, },
); );
@@ -524,8 +533,9 @@ class ProductProvider extends ChangeNotifier {
), ),
); );
}, },
(response) { (response) async {
cartItems.add(productId); // Add product to cart cartItems.add(productId);
Fluttertoast.showToast( Fluttertoast.showToast(
msg: "Added to cart successfully!", msg: "Added to cart successfully!",
toastLength: Toast.LENGTH_SHORT, toastLength: Toast.LENGTH_SHORT,
@@ -535,7 +545,7 @@ class ProductProvider extends ChangeNotifier {
fontSize: 14.0, fontSize: 14.0,
); );
iscardAdded = true; iscardAdded = true;
notifyListeners(); // Update UI after adding to cart notifyListeners();
}, },
); );
} catch (e) { } catch (e) {

View File

@@ -94,7 +94,7 @@ class ProductRepo {
ProductCategory productCategory = ProductCategory productCategory =
productCategoryFromJson(response.toString()); productCategoryFromJson(response.toString());
// final String model = response.toString();
return right(productCategory); return right(productCategory);
} on DioException catch (e) { } on DioException catch (e) {
@@ -103,8 +103,7 @@ class ProductRepo {
} }
} }
FutureResult<List<DatumCategory>> getSubcategory( FutureResult<List<DatumCategory>> getSubcategory( data, BuildContext context) async {
data, BuildContext context) async {
try { try {
var response = await _productService.getSubcategory(data); var response = await _productService.getSubcategory(data);
@@ -143,7 +142,6 @@ class ProductRepo {
.map((item) => ProductCategoryModel.fromJson(item)) .map((item) => ProductCategoryModel.fromJson(item))
.toList(); .toList();
if (response != null && response.data != null) { if (response != null && response.data != null) {
final List<ProductCategoryModel> productModels = (response.data as List) final List<ProductCategoryModel> productModels = (response.data as List)
.map((item) => ProductCategoryModel.fromJson(item)) .map((item) => ProductCategoryModel.fromJson(item))
.toList(); .toList();
@@ -236,7 +234,7 @@ class ProductRepo {
FutureResult<CouponResponse> applyCoupon(data) async { FutureResult<CouponResponse> applyCoupon(data) async {
try { try {
var response = await _productService.applyCoupon(data); var response = await _productService.applyCoupon(data);
print("jdjkgdfjkhdfg ");
CouponResponse couponresponse = CouponResponse couponresponse =
couponResponseFromJson(response.toString()); couponResponseFromJson(response.toString());
print("jdjkgdfjkhdfg $couponresponse"); print("jdjkgdfjkhdfg $couponresponse");

View File

@@ -19,7 +19,6 @@ class ProductService extends ApiService {
return response; return response;
} }
Future updateDeviceToken(data) async { Future updateDeviceToken(data) async {
var response = var response =
await api.post(APIURL.upDateDeviceToken, data: jsonEncode(data)); await api.post(APIURL.upDateDeviceToken, data: jsonEncode(data));
@@ -48,8 +47,6 @@ class ProductService extends ApiService {
return response; return response;
} }
// //
Future getBestDealProduct(data) async { Future getBestDealProduct(data) async {
@@ -65,20 +62,20 @@ class ProductService extends ApiService {
return response; return response;
} }
Future getSubcategory(data) async { Future getSubcategory(data) async {
var response = await api.get(APIURL.getSubcategory, data: jsonEncode(data),queryParameters: data);
var response = await api.get(APIURL.getSubcategory, data: jsonEncode(data));
return response; return response;
} }
Future getCategoryByLevel(data) async { Future getCategoryByLevel(data) async {
var response = await api.get(APIURL.getCategoryByLevel, data: jsonEncode(data)); var response =
await api.get(APIURL.getCategoryByLevel, data: jsonEncode(data));
return response; return response;
} }
Future paymentOrder(data) async { Future paymentOrder(data) async {
var response = await api.post(APIURL.paymentOrder, data: jsonEncode(data)); var response = await api.post(APIURL.paymentOrder, data: jsonEncode(data));
@@ -124,7 +121,7 @@ Future getCategoryByLevel(data) async {
return response; return response;
} }
Future checkAddress(data, id) async { Future checkAddress(data, id) async {
var response = var response =
await api.get(APIURL.checkAddress + id, data: jsonEncode(data)); await api.get(APIURL.checkAddress + id, data: jsonEncode(data));
return response; return response;

View File

@@ -2,14 +2,13 @@ import 'package:flutter/material.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:firebase_messaging/firebase_messaging.dart'; import 'package:firebase_messaging/firebase_messaging.dart';
class NotificationService { class NotificationService {
static final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = static final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
FlutterLocalNotificationsPlugin(); FlutterLocalNotificationsPlugin();
static Future<void> init() async { static Future<void> init() async {
const AndroidInitializationSettings initializationSettingsAndroid = const AndroidInitializationSettings initializationSettingsAndroid =
AndroidInitializationSettings('@mipmap/ic_launcher'); AndroidInitializationSettings('logo');
const DarwinInitializationSettings initializationSettingsIOS = const DarwinInitializationSettings initializationSettingsIOS =
DarwinInitializationSettings( DarwinInitializationSettings(

View File

@@ -70,6 +70,14 @@ class _BestDealScreenState extends State<BestDealScreen> {
? TextField( ? TextField(
controller: _searchController, controller: _searchController,
autofocus: true, autofocus: true,
keyboardType: TextInputType.text,
textInputAction: TextInputAction.search,
onSubmitted: (value) {
if (value.isNotEmpty) {
Provider.of<ProductProvider>(context, listen: false)
.getBestDealProduct(context, _searchController.text);
}
},
decoration: const InputDecoration( decoration: const InputDecoration(
hintText: "Search...", hintText: "Search...",
border: InputBorder.none, border: InputBorder.none,
@@ -290,22 +298,35 @@ class _BestDealScreenState extends State<BestDealScreen> {
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, crossAxisCount: 2,
childAspectRatio: MediaQuery.of(context).size.width / childAspectRatio: MediaQuery.of(context).size.width /
(MediaQuery.of(context).size.height / 1.3), (MediaQuery.of(context).size.height / 1.1),
crossAxisSpacing: 10, crossAxisSpacing: 10,
mainAxisSpacing: 10, mainAxisSpacing: 10,
), ),
itemBuilder: (context, index) { itemBuilder: (context, index) {
var bestdealproduct = provider.bestdeal[index]; var bestdealproduct = provider.bestdeal[index];
return InkWell( return InkWell(
onTap: () { onTap: () async {
context.push( var status = await provider.getProduuctDetails(context,
MyRoutes.PRODUCTDETAILS, bestdealproduct.id, 1, bestdealproduct.discountPrice);
extra: { if (status) {
"id": bestdealproduct.id, context.push(
"quantity": 1, MyRoutes.PRODUCTDETAILS,
"price": bestdealproduct.discountPrice, extra: {
}, "id": bestdealproduct.id,
); "quantity": 1,
"price": bestdealproduct.discountPrice,
},
);
}
// context.push(
// MyRoutes.PRODUCTDETAILS,
// extra: {
// "id": bestdealproduct.id,
// "quantity": 1,
// "price": bestdealproduct.discountPrice,
// },
// );
}, },
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@@ -329,7 +350,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( Container(
height: MediaQuery.of(context).size.height * 0.19, height: MediaQuery.of(context).size.height * 0.25,
decoration: BoxDecoration( decoration: BoxDecoration(
color: APPCOLOR.bgGrey, color: APPCOLOR.bgGrey,
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
@@ -397,6 +418,7 @@ class _BestDealScreenState extends State<BestDealScreen> {
], ],
), ),
), ),
SizedBox(height: 8), SizedBox(height: 8),
Row( Row(
children: [ children: [

View File

@@ -1,13 +1,17 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:grocery_app/src/common_widget/name_text_field.dart'; import 'package:grocery_app/src/common_widget/name_text_field.dart';
import 'package:grocery_app/src/common_widget/network_image.dart'; import 'package:grocery_app/src/common_widget/network_image.dart';
import 'package:grocery_app/src/logic/provider/addTocart_provider.dart'; import 'package:grocery_app/src/logic/provider/addTocart_provider.dart';
import 'package:grocery_app/src/ui/payment/phonepe_payment.dart';
import 'package:grocery_app/utils/constants/assets_constant.dart'; import 'package:grocery_app/utils/constants/assets_constant.dart';
import 'package:grocery_app/utils/constants/color_constant.dart'; import 'package:grocery_app/utils/constants/color_constant.dart';
import 'package:grocery_app/utils/extensions/uicontext.dart'; import 'package:grocery_app/utils/extensions/uicontext.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../payment/razorpay_payment.dart';
class CardCheckoutScreen extends StatefulWidget { class CardCheckoutScreen extends StatefulWidget {
int deliveryCharge; int deliveryCharge;
// String currency; // String currency;
@@ -15,7 +19,7 @@ class CardCheckoutScreen extends StatefulWidget {
// String name; // String name;
// String phone; // String phone;
// String email; // String email;
// String userId; String userId;
String cartId; String cartId;
String addressId; String addressId;
// String remarks; // String remarks;
@@ -30,7 +34,7 @@ class CardCheckoutScreen extends StatefulWidget {
// required this.name, // required this.name,
// required this.phone, // required this.phone,
// required this.email, // required this.email,
// required this.userId, required this.userId,
required this.cartId, required this.cartId,
required this.addressId, required this.addressId,
// required this.remarks, // required this.remarks,
@@ -84,7 +88,7 @@ class _CardCheckoutScreenState extends State<CardCheckoutScreen> {
), ),
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () { /* onTap: () {
if (paymentProvider.selectedPaymentMethod == "Online") { if (paymentProvider.selectedPaymentMethod == "Online") {
print("dsjfkhkdfhgdkfghdfg"); print("dsjfkhkdfhgdkfghdfg");
paymentProvider.orderPaymnet( paymentProvider.orderPaymnet(
@@ -93,7 +97,8 @@ class _CardCheckoutScreenState extends State<CardCheckoutScreen> {
widget.cartId, widget.cartId,
widget.addressId, widget.addressId,
widget.couponId!); widget.couponId!);
} else { }
else {
paymentProvider.paymentCODOrder( paymentProvider.paymentCODOrder(
context, context,
widget.originalAmount, widget.originalAmount,
@@ -102,6 +107,68 @@ class _CardCheckoutScreenState extends State<CardCheckoutScreen> {
widget.addressId, widget.addressId,
); );
} }
},*/
onTap: (){
if(paymentProvider.selectedPaymentMethod!=null) {
if (paymentProvider.selectedPaymentMethod ==
"razorpay") {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
RazorpayPaymentScreen(
amount: widget.originalAmount +
widget.deliveryCharge,
cartId: widget.cartId,
addressId: widget.addressId,
couponId: widget.couponId,
userId: widget.userId,
),
),
);
} else if (paymentProvider.selectedPaymentMethod ==
"phonepe") {
// Navigate to PhonePe screen (optional for now)
// Replace this when you implement PhonePe
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
PhonePePaymentScreen(
amount: widget.originalAmount +
widget.deliveryCharge,
cartId: widget.cartId,
addressId: widget.addressId,
//couponId: widget.couponId,
userId: widget.userId,
),
),
);
/* ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text("PhonePe integration coming soon")),
);*/
} /*
else {
paymentProvider.paymentCODOrder(
context,
widget.originalAmount,
widget.deliveryCharge,
widget.couponId ?? "",
widget.addressId,
);
}*/
}else
{
Fluttertoast.showToast(
msg: "Select Payment method",
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM,
backgroundColor: Colors.green,
textColor: Colors.white,
fontSize: 14.0,
);
}
}, },
child: Container( child: Container(
height: 50, height: 50,
@@ -173,30 +240,48 @@ class _CardCheckoutScreenState extends State<CardCheckoutScreen> {
), ),
SizedBox(height: 0), SizedBox(height: 0),
ListTile( /* ListTile(
leading: Icon(Icons.payment, color: Colors.blue), leading: Icon(Icons.payment, color: Colors.blue),
title: Text("Online Payment"), title: Text("Online Payment"),
trailing: paymentProvider.selectedPaymentMethod == "Online" trailing: paymentProvider.selectedPaymentMethod == "Online"
? Icon(Icons.check_circle, color: Colors.green) ? Icon(Icons.check_circle, color: Colors.green)
: null, : null,
onTap: () { onTap: () {
paymentProvider.selectPaymentMethod("Online"); // paymentProvider.selectPaymentMethod("Online");
// Navigator.pop(context); // Navigator.pop(context);
}, },
),*/
RadioListTile<String>(
value: "razorpay",
groupValue: paymentProvider.selectedPaymentMethod,
title: const Text("Razorpay Online Payment"),
onChanged: (value) {
paymentProvider.selectPaymentMethod(value!);
},
),
RadioListTile<String>(
value: "phonepe",
groupValue: paymentProvider.selectedPaymentMethod,
title: const Text("PhonePe Online Payment"),
onChanged: (value) {
paymentProvider.selectPaymentMethod(value!);
},
), ),
// Cash on Delivery (COD) Option // Cash on Delivery (COD) Option
ListTile( // ListTile(
leading: Icon(Icons.money, color: Colors.orange), // leading: Icon(Icons.money, color: Colors.orange),
title: Text("Cash on Delivery (COD)"), // title: Text("Cash on Delivery (COD)"),
trailing: paymentProvider.selectedPaymentMethod == "COD" // trailing: paymentProvider.selectedPaymentMethod == "COD"
? Icon(Icons.check_circle, color: Colors.green) // ? Icon(Icons.check_circle, color: Colors.green)
: null, // : null,
onTap: () { // onTap: () {
paymentProvider.selectPaymentMethod("COD"); // paymentProvider.selectPaymentMethod("COD");
// Navigator.pop(context); // // Navigator.pop(context);
}, // },
), // ),
], ],
), ),
); );
@@ -404,3 +489,4 @@ class _CardCheckoutScreenState extends State<CardCheckoutScreen> {
); );
} }
} }

View File

@@ -1,3 +1,5 @@
import 'dart:convert';
import 'package:carousel_slider/carousel_slider.dart'; import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
@@ -15,6 +17,7 @@ import 'package:grocery_app/src/ui/widgets/elevated_button.dart';
import 'package:grocery_app/utils/constants/color_constant.dart'; import 'package:grocery_app/utils/constants/color_constant.dart';
import 'package:grocery_app/utils/constants/shared_pref_utils.dart'; import 'package:grocery_app/utils/constants/shared_pref_utils.dart';
import 'package:grocery_app/utils/extensions/uicontext.dart'; import 'package:grocery_app/utils/extensions/uicontext.dart';
import 'package:http/http.dart' as http;
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:skeletonizer/skeletonizer.dart'; import 'package:skeletonizer/skeletonizer.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
@@ -101,15 +104,28 @@ class _MycartState extends State<Mycart> {
double cardWidth = MediaQuery.of(context).size.width * 0.4; double cardWidth = MediaQuery.of(context).size.width * 0.4;
return InkWell( return InkWell(
onTap: () { onTap: () async {
context.push( var status = await provider.getProduuctDetails(context,
MyRoutes.PRODUCTDETAILS, bestdealproduct.id, 1, bestdealproduct.discountPrice);
extra: { if (status) {
"id": bestdealproduct.id, context.push(
"quantity": 1, MyRoutes.PRODUCTDETAILS,
"price": bestdealproduct.discountPrice, extra: {
}, "id": bestdealproduct.id,
); "quantity": 1,
"price": bestdealproduct.discountPrice,
},
);
}
// context.push(
// MyRoutes.PRODUCTDETAILS,
// extra: {
// "id": bestdealproduct.id,
// "quantity": 1,
// "price": bestdealproduct.discountPrice,
// },
// );
}, },
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
@@ -216,8 +232,11 @@ class _MycartState extends State<Mycart> {
onTap: () async { onTap: () async {
if (await SharedPrefUtils.getToken() != if (await SharedPrefUtils.getToken() !=
null) { null) {
await provider.addToCart( await Provider.of<AddtocartProvider>(
context, bestdealproduct.id!, 1); context,
listen: false)
.addToCart(
context, bestdealproduct.id!, 1);
} else { } else {
context.push(MyRoutes.SIGNUP); context.push(MyRoutes.SIGNUP);
} }
@@ -410,15 +429,30 @@ class _MycartState extends State<Mycart> {
var items = provider.allitem.items![index]; var items = provider.allitem.items![index];
return InkWell( return InkWell(
onTap: () { onTap: () async {
context.push( var status =
MyRoutes.PRODUCTDETAILS, await Provider.of<ProductProvider>(context, listen: false)
extra: { .getProduuctDetails(context, items.product!.id!,
"id": items.product!.id, items.quantity!, items.product!.discountPrice!);
"quantity": items.quantity, if (status) {
"price": items.product!.discountPrice, context.push(
}, MyRoutes.PRODUCTDETAILS,
); extra: {
"id": items.product!.id,
"quantity": items.quantity,
"price": items.product!.discountPrice,
},
);
}
// context.push(
// MyRoutes.PRODUCTDETAILS,
// extra: {
// "id": items.product!.id,
// "quantity": items.quantity,
// "price": items.product!.discountPrice,
// },
// );
}, },
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w), padding: EdgeInsets.symmetric(horizontal: 10.w),
@@ -869,7 +903,8 @@ class _MycartState extends State<Mycart> {
.viewInsets .viewInsets
.bottom, // Adjusts for keyboard .bottom, // Adjusts for keyboard
), ),
child: SingleChildScrollView(child: Consumer<AddtocartProvider>( child: SingleChildScrollView(child:
Consumer<AddtocartProvider>(
builder: (context, pinProvider, child) { builder: (context, pinProvider, child) {
return Container( return Container(
padding: EdgeInsets.all(20.w), padding: EdgeInsets.all(20.w),
@@ -974,6 +1009,8 @@ class _MycartState extends State<Mycart> {
); );
} }
void _showAddressBottomSheet(BuildContext context) { void _showAddressBottomSheet(BuildContext context) {
showModalBottomSheet( showModalBottomSheet(
context: context, context: context,
@@ -1108,6 +1145,67 @@ class AddressBottomSheet extends StatefulWidget {
} }
class _AddressBottomSheetState extends State<AddressBottomSheet> { class _AddressBottomSheetState extends State<AddressBottomSheet> {
Future<String?> fetchDeliveryMessage() async {
const String url = 'https://www.mv.frontshopemporium.in/xam/distance/delivery-charges-by-distance';
try {
final response = await http.get(Uri.parse(url), headers: {
"Content-Type": "application/json",
"authorization": "Bearer ${await SharedPrefUtils.getToken()}"
});
print('continue response');
print(response.statusCode);
print(response.body);
if (response.statusCode == 200) {
final Map<String, dynamic> data = json.decode(response.body);
print(data);
final List<dynamic> nonDeliverableProducts = data['nonDeliverableProducts'] ?? [];
if (nonDeliverableProducts.isNotEmpty) {
final String reason = nonDeliverableProducts[0]['reason'];
print(reason);
return reason;
} else {
return '';
}
} else {
return 'Failed with status: ${response.statusCode}';
}
} catch (e) {
return 'Error: $e';
}
}
Future<String?> setDefaultAddress(String addressId) async {
String url = 'https://www.mv.frontshopemporium.in/xam/user/addresses/${addressId}/set-default';
try {
final response = await http.put(Uri.parse(url), headers: {
"Content-Type": "application/json",
"authorization": "Bearer ${await SharedPrefUtils.getToken()}"
});
print('address response');
print(response.statusCode);
print(response.body);
if (response.statusCode == 200) {
/* final Map<String, dynamic> data = json.decode(response.body);
print(data);
final List<dynamic> nonDeliverableProducts = data['nonDeliverableProducts'] ?? [];
if (nonDeliverableProducts.isNotEmpty) {
final String reason = nonDeliverableProducts[0]['reason'];
return reason;
} else {
return 'No non-deliverable products found';
}*/
} else {
return 'Failed with status: ${response.statusCode}';
}
} catch (e) {
return 'Error: $e';
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Padding( return Padding(
@@ -1154,8 +1252,8 @@ class _AddressBottomSheetState extends State<AddressBottomSheet> {
Consumer<AddtocartProvider>( Consumer<AddtocartProvider>(
builder: (context, paymentProvider, child) { builder: (context, paymentProvider, child) {
return ElevatedButton.icon( return ElevatedButton.icon(
onPressed: () { onPressed: () async{
if (paymentProvider.selectedAddress.isNotEmpty) { /* if (paymentProvider.selectedAddress.isNotEmpty) {
if (paymentProvider.isDeliverable) { if (paymentProvider.isDeliverable) {
Navigator.pop(context); Navigator.pop(context);
Navigator.of(context).push(MaterialPageRoute( Navigator.of(context).push(MaterialPageRoute(
@@ -1168,7 +1266,7 @@ class _AddressBottomSheetState extends State<AddressBottomSheet> {
// name: paymentProvider.selecteUserName, // name: paymentProvider.selecteUserName,
// phone: paymentProvider.selecteUserPhone, // phone: paymentProvider.selecteUserPhone,
// email: paymentProvider.selecteEmail, // email: paymentProvider.selecteEmail,
// userId: paymentProvider.allitem.userId!, userId: paymentProvider.allitem.userId!,
cartId: paymentProvider.allitem.id!, cartId: paymentProvider.allitem.id!,
addressId: paymentProvider.selectedAddress, addressId: paymentProvider.selectedAddress,
// remarks: paymentProvider.selecteUserName, // remarks: paymentProvider.selecteUserName,
@@ -1197,17 +1295,97 @@ class _AddressBottomSheetState extends State<AddressBottomSheet> {
textColor: Colors.white, textColor: Colors.white,
fontSize: 14.0, fontSize: 14.0,
); );
}*/
// Call your API and get the message
String? message = await fetchDeliveryMessage(); // Use the function from earlier
if (message != null && message.isNotEmpty) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: Text("Alert"),
content: Text(message),
actions: [
TextButton(
onPressed: () {
Navigator.of(context).pop(); // Close the dialog
},
child: Text("OK"),
),
],
);
},
);
} else {
Navigator.pop(context);
Navigator.of(context).push(MaterialPageRoute(
builder: (context) {
return CardCheckoutScreen(
deliveryCharge: paymentProvider.getdeliverycharge,
originalAmount: paymentProvider.grandPrice,
userId: paymentProvider.allitem.userId!,
cartId: paymentProvider.allitem.id!,
addressId: paymentProvider.selectedAddress,
couponId: paymentProvider.couponId,
);
},
));
} }
}, },
/*
// Call your API and get the message
await paymentProvider.paymentCODOrder(
context,
paymentProvider.grandPrice,
paymentProvider.getdeliverycharge,
paymentProvider.couponId ?? "",
paymentProvider.selectedAddress,
);
*/
/* if (message != null && message.isNotEmpty) {
Fluttertoast.showToast(
msg: message,
toastLength: Toast.LENGTH_SHORT,
gravity: ToastGravity.BOTTOM,
backgroundColor: Colors.red,
textColor: Colors.white,
fontSize: 14.0,
);
} else {*/
/*
Navigator.pop(context);
Navigator.of(context).push(MaterialPageRoute(
builder: (context) {
return CardCheckoutScreen(
deliveryCharge: paymentProvider.getdeliverycharge,
originalAmount: paymentProvider.grandPrice,
userId: paymentProvider.allitem.userId!,
cartId: paymentProvider.allitem.id!,
addressId: paymentProvider.selectedAddress,
couponId: paymentProvider.couponId,
);
},
));
// }
},*/
label: Text( label: Text(
"Continue", "Continue",
style: TextStyle(color: Colors.white, fontSize: 16), style: TextStyle(color: Colors.white, fontSize: 16),
), ),
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
backgroundColor: paymentProvider.isDeliverable backgroundColor:Colors.green,
/*backgroundColor: paymentProvider.isDeliverable
? Colors.green ? Colors.green
: Colors.grey, : Colors.grey,
minimumSize: Size(double.infinity, 50), */minimumSize: Size(double.infinity, 50),
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)), borderRadius: BorderRadius.circular(10)),
), ),
@@ -1246,12 +1424,13 @@ class _AddressBottomSheetState extends State<AddressBottomSheet> {
activeColor: Colors.green, activeColor: Colors.green,
onChanged: (value) { onChanged: (value) {
addressProvider.checkAddress(context, value); addressProvider.checkAddress(context, value);
setDefaultAddress(address.id);
addressProvider.selectAddress( addressProvider.selectAddress(
value.toString(), value.toString(),
address.phoneNumber, address.phoneNumber,
address.name, address.name,
address.user!.email); address.user!.email);
}, },
), ),
title: Text( title: Text(

View File

@@ -108,27 +108,21 @@ class CouponsScreen extends StatelessWidget {
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
child: Stack( child: Stack(
children: [ children: [
// Background Image
Positioned.fill( Positioned.fill(
child: Image.network( child: Image.network(
coupon.imageUrl, coupon.imageUrl,
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
// Blur Effect
Positioned.fill( Positioned.fill(
child: BackdropFilter( child: BackdropFilter(
filter: filter:
ImageFilter.blur(sigmaX: 5, sigmaY: 5), ImageFilter.blur(sigmaX: 5, sigmaY: 5),
child: Container( child: Container(
color: Colors.black.withOpacity( color: Colors.black.withOpacity(0.3),
0.3), // Dark overlay for readability
), ),
), ),
), ),
// Coupon Content
Padding( Padding(
padding: EdgeInsets.all(16.0), padding: EdgeInsets.all(16.0),
child: Column( child: Column(
@@ -139,8 +133,7 @@ class CouponsScreen extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors color: Colors.white,
.white, // Ensure contrast with background
), ),
), ),
SizedBox(height: 5), SizedBox(height: 5),
@@ -151,8 +144,7 @@ class CouponsScreen extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors color: Colors.white,
.white, // Ensure contrast with background
), ),
), ),
Text( Text(
@@ -162,19 +154,20 @@ class CouponsScreen extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: color: Colors.white,
Colors.white, // Highlight price
), ),
), ),
], ],
), ),
SizedBox(height: 5), SizedBox(height: 5),
Text( Text(
"${coupon.discountValue ?? ''}", coupon.type == "PERCENTAGE"
? "${coupon.discountValue ?? ''}%"
: "${coupon.discountValue ?? ''}",
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Colors.amber, // Highlight price color: Colors.amber,
), ),
), ),
SizedBox(height: 5), SizedBox(height: 5),
@@ -183,13 +176,10 @@ class CouponsScreen extends StatelessWidget {
style: TextStyle(color: Colors.white70), style: TextStyle(color: Colors.white70),
), ),
SizedBox(height: 10), SizedBox(height: 10),
// Coupon Code and Apply Button
Row( Row(
mainAxisAlignment: mainAxisAlignment:
MainAxisAlignment.spaceBetween, MainAxisAlignment.spaceBetween,
children: [ children: [
// Coupon Code Box
Container( Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: 10, vertical: 5), horizontal: 10, vertical: 5),
@@ -209,18 +199,18 @@ class CouponsScreen extends StatelessWidget {
), ),
), ),
), ),
// Apply Button
ElevatedButton( ElevatedButton(
onPressed: isCouponValid onPressed: isCouponValid
? () async { ? () async
{
var status = await provider var status = await provider
.applyCoupon( .applyCoupon(
context, context,
cartId, cartId,
coupon.code, coupon.code,
coupon.id); coupon.id);
if (status) { if (status)
{
Navigator.pop(context); Navigator.pop(context);
} }
} }

View File

@@ -202,17 +202,30 @@ class _FavouriteScreenState extends State<FavouriteScreen>
_animationController.forward(from: 0); _animationController.forward(from: 0);
return GestureDetector( return GestureDetector(
onTap: () { onTap: () async {
context.push( var status = await provider.getProduuctDetails(
MyRoutes.PRODUCTDETAILS, context, productId, 1, product.discountPrice);
// extra: productId if (status) {
context.push(
MyRoutes.PRODUCTDETAILS,
extra: {
"id": productId,
"quantity": 1,
"price": product.discountPrice,
},
);
}
extra: { // context.push(
"id": productId, // MyRoutes.PRODUCTDETAILS,
"quantity": 1, // // extra: productId
"price": product.discountPrice,
}, // extra: {
); // "id": productId,
// "quantity": 1,
// "price": product.discountPrice,
// },
// );
}, },
child: Container( child: Container(
padding: EdgeInsets.all(8), padding: EdgeInsets.all(8),

View File

@@ -9,7 +9,6 @@ import 'package:grocery_app/src/common_widget/network_image.dart';
import 'package:grocery_app/src/core/routes/routes.dart'; import 'package:grocery_app/src/core/routes/routes.dart';
import 'package:grocery_app/src/data/ProductCategoryModel.dart'; import 'package:grocery_app/src/data/ProductCategoryModel.dart';
import 'package:grocery_app/src/data/product_category.dart'; import 'package:grocery_app/src/data/product_category.dart';
import 'package:grocery_app/src/logic/provider/home_provider.dart'; import 'package:grocery_app/src/logic/provider/home_provider.dart';
import 'package:grocery_app/src/ui/data_notfound.dart'; import 'package:grocery_app/src/ui/data_notfound.dart';
import 'package:grocery_app/utils/constants/assets_constant.dart'; import 'package:grocery_app/utils/constants/assets_constant.dart';
@@ -34,20 +33,12 @@ class _CtegoryProductState extends State<CtegoryProduct> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
final productProvider = final productProvider =
Provider.of<ProductProvider>(context, listen: false); Provider.of<ProductProvider>(context, listen: false);
productProvider.page = 1; productProvider.page = 1;
// productProvider.gettAllProduct(context, "", true, '', true);
productProvider.gettAllProduct( productProvider.gettAllProduct(
context, "/category/${widget.categoryId}", true, '', false); context, "/category/${widget.categoryId}", true, '', false);
// productProvider.getAllcategory(context);
// productProvider.getCategoryByLevel();
// productProvider.setActiveIndex(0);
}); });
_scrollController.addListener(() { _scrollController.addListener(() {
@@ -55,7 +46,6 @@ class _CtegoryProductState extends State<CtegoryProduct> {
_scrollController.position.maxScrollExtent) { _scrollController.position.maxScrollExtent) {
final productProvider = final productProvider =
Provider.of<ProductProvider>(context, listen: false); Provider.of<ProductProvider>(context, listen: false);
productProvider.gettAllProduct(context, "", false, '', false); productProvider.gettAllProduct(context, "", false, '', false);
} }
}); });
@@ -78,28 +68,31 @@ class _CtegoryProductState extends State<CtegoryProduct> {
height: 20, height: 20,
width: 20, width: 20,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
Navigator.of(context).pop(); Navigator.of(context).pop();
}, },
child: SvgPicture.asset( child: SvgPicture.asset(
APPASSETS.back, APPASSETS.back,
height: 20, height: 20,
width: 20, width: 20,
)), ),
),
), ),
), ),
title: Text( title: Text(
widget.name ?? "", widget.name,
style: TextStyle( style: const TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
), ),
), ),
actions: [], actions: [],
), ),
body: Padding( body: Column(
padding: const EdgeInsets.all(8.0), children: [
child: productWidget(), const SizedBox(height: 8),
Expanded(child: productWidget()),
],
), ),
); );
} }
@@ -108,20 +101,22 @@ class _CtegoryProductState extends State<CtegoryProduct> {
return Consumer<ProductProvider>(builder: (context, provider, child) { return Consumer<ProductProvider>(builder: (context, provider, child) {
if (provider.isLoadingg) { if (provider.isLoadingg) {
return Center( return Center(
child: Container( child: Container(
width: 30, width: 30,
height: 30, height: 30,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.transparent, color: Colors.transparent,
borderRadius: BorderRadius.circular(20), borderRadius: BorderRadius.circular(20),
border: Border.all( border: Border.all(
color: APPCOLOR.bgGrey, color: APPCOLOR.bgGrey,
width: 1, width: 1,
)), ),
child: const Center( ),
child: CupertinoActivityIndicator(), child: const Center(
child: CupertinoActivityIndicator(),
),
), ),
)); );
} else if (provider.products.isEmpty) { } else if (provider.products.isEmpty) {
return Center( return Center(
child: DataNotFound( child: DataNotFound(
@@ -132,31 +127,34 @@ class _CtegoryProductState extends State<CtegoryProduct> {
), ),
); );
} else { } else {
return Expanded( return Padding(
child: Padding( padding: const EdgeInsets.symmetric(horizontal: 10),
padding: const EdgeInsets.only(left: 10, right: 10), child: LayoutBuilder(
child: LayoutBuilder( builder: (context, constraints) {
builder: (context, constraints) { final itemWidth = (constraints.maxWidth - 20) / 2;
final itemWidth = (constraints.maxWidth - 20) / 2; final itemHeight = itemWidth * 1.7;
final itemHeight = itemWidth * 1.4;
return GridView.builder( return GridView.builder(
controller: _scrollController, physics: BouncingScrollPhysics(),
itemCount: controller: _scrollController,
provider.products.length + (provider.hasMore ? 1 : 0), itemCount:
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( provider.products.length + (provider.hasMore ? 1 : 0),
crossAxisCount: 2, gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
childAspectRatio: itemWidth / itemHeight, crossAxisCount: 2,
crossAxisSpacing: 10, childAspectRatio: itemWidth / itemHeight,
mainAxisSpacing: 10, crossAxisSpacing: 10,
), mainAxisSpacing: 10,
itemBuilder: (context, index) { ),
if (index == provider.products.length) { itemBuilder: (context, index) {
return SizedBox.shrink(); if (index == provider.products.length) {
} return const SizedBox.shrink();
var product = provider.products[index]; }
return InkWell( var product = provider.products[index];
onTap: () { return InkWell(
onTap: () async {
var status = await provider.getProduuctDetails(
context, product.id, 1, product.discountPrice);
if (status) {
context.push( context.push(
MyRoutes.PRODUCTDETAILS, MyRoutes.PRODUCTDETAILS,
extra: { extra: {
@@ -165,189 +163,164 @@ class _CtegoryProductState extends State<CtegoryProduct> {
"price": product.discountPrice, "price": product.discountPrice,
}, },
); );
}, }
child: Container( },
height: itemHeight, child: Container(
decoration: BoxDecoration( height: itemHeight,
color: Colors.white, decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15), color: Colors.white,
// boxShadow: [ borderRadius: BorderRadius.circular(15),
// BoxShadow( ),
// color: Colors.grey.withOpacity(0.1), child: Column(
// blurRadius: 1, crossAxisAlignment: CrossAxisAlignment.start,
// offset: const Offset(5, 5), children: [
// ), Container(
// ], height: itemWidth * 1.1,
), decoration: BoxDecoration(
child: Column( color: APPCOLOR.bgGrey,
crossAxisAlignment: CrossAxisAlignment.start, borderRadius: BorderRadius.circular(15),
children: [
Container(
height: itemWidth *
0.9, // Adjust height for image container
// width: itemWidth,
decoration: BoxDecoration(
color: APPCOLOR.bgGrey,
borderRadius: BorderRadius.circular(15),
),
child: Stack(
alignment: Alignment.center,
children: [
AppNetworkImage(
imageUrl: product
.productImages!.first.url ??
"https://5.imimg.com/data5/SELLER/Default/2024/2/385126988/OL/DA/VW/8627346/1l-fortune-sunflower-oil.jpg",
backGroundColor: Colors.transparent,
radius: 10,
boxFit: BoxFit.fill),
Positioned(
right: 1,
bottom: 0,
child: Container(
height: 35,
width: 35,
padding: EdgeInsets.symmetric(
horizontal: 1, vertical: 1),
decoration: BoxDecoration(
color: Colors.red,
borderRadius:
BorderRadius.circular(100),
),
child: Center(
child: Text(
"${calculateDiscountPercentage(double.parse(product.basePrice), double.parse(product!.discountPrice))}%\nOFF",
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold,
fontSize: 10)),
),
),
)
],
),
), ),
const SizedBox(height: 5), child: Stack(
Text( alignment: Alignment.center,
product.name ?? " ",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context
.customMedium(
APPCOLOR.balck1A1A1A,
15,
)
.copyWith(fontWeight: FontWeight.bold),
),
const SizedBox(height: 2),
Text(
product.unit ?? " ",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customMedium(
Colors.grey.withOpacity(0.8),
13,
),
),
const SizedBox(height: 1),
Spacer(),
Row(
children: [ children: [
Column( AppNetworkImage(
crossAxisAlignment: CrossAxisAlignment.start, imageUrl: product.productImages!.first.url ??
children: [ "https://5.imimg.com/data5/SELLER/Default/2024/2/385126988/OL/DA/VW/8627346/1l-fortune-sunflower-oil.jpg",
Text( backGroundColor: Colors.transparent,
"${product.discountPrice ?? " "}", radius: 10,
textAlign: TextAlign.left, boxFit: BoxFit.fill,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customSemiBold(
Colors.black, 15),
),
const SizedBox(width: 5),
Text(
"${product.basePrice ?? " "}",
textAlign: TextAlign.left,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context
.customMedium(
Colors.grey.withOpacity(0.8),
15,
)
.copyWith(
decoration:
TextDecoration.lineThrough,
),
),
],
), ),
Spacer(), Positioned(
Align( right: 1,
alignment: Alignment.centerRight, bottom: 0,
child: GestureDetector( child: Container(
onTap: () async { height: 35,
print( width: 35,
"Add to Cart Pressed for ${product.id}"); padding: const EdgeInsets.all(1),
decoration: BoxDecoration(
if (await SharedPrefUtils.getToken() != color: Colors.red,
null) { borderRadius: BorderRadius.circular(100),
await provider.addToCart( ),
context, product.id!, 1); child: Center(
} else { child: Text(
context.push(MyRoutes.SIGNUP); "${calculateDiscountPercentage(double.parse(product.basePrice), double.parse(product.discountPrice))}%\nOFF",
} textAlign: TextAlign.center,
}, style: const TextStyle(
child: Container( color: Colors.white,
height: fontWeight: FontWeight.bold,
MediaQuery.of(context).size.height * fontSize: 10,
0.038, ),
width: MediaQuery.of(context).size.width *
0.1,
decoration: BoxDecoration(
color: APPCOLOR.lightGreen,
borderRadius: BorderRadius.circular(5),
),
child: Center(
child: provider.isLoading[product.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),
),
), ),
), ),
), ),
), ),
], ],
), ),
], ),
), const SizedBox(height: 5),
Text(
product.name ?? " ",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context
.customMedium(
APPCOLOR.balck1A1A1A,
15,
)
.copyWith(fontWeight: FontWeight.bold),
),
const SizedBox(height: 2),
Text(
product.unit ?? " ",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: context.customMedium(
Colors.grey.withOpacity(0.8),
13,
),
),
const SizedBox(height: 1),
const Spacer(),
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"${product.discountPrice ?? " "}",
style: context.customSemiBold(
Colors.black, 15),
),
const SizedBox(width: 5),
Text(
"${product.basePrice ?? " "}",
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, product.id!, 1);
} else {
context.push(MyRoutes.SIGNUP);
}
},
child: Container(
height: MediaQuery.of(context).size.height *
0.038,
width:
MediaQuery.of(context).size.width * 0.1,
decoration: BoxDecoration(
color: APPCOLOR.lightGreen,
borderRadius: BorderRadius.circular(5),
),
child: Center(
child: provider.isLoading[product.id] ??
false
? const Padding(
padding: 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),
),
),
),
),
),
],
),
],
), ),
); ),
}, );
); },
}, );
), },
), ),
); );
} }
@@ -362,277 +335,4 @@ class _CtegoryProductState extends State<CtegoryProduct> {
double discountPercentage = (discountAmount / basePrice) * 100; double discountPercentage = (discountAmount / basePrice) * 100;
return discountPercentage.round(); return discountPercentage.round();
} }
Widget filterCategory() {
final activeIndexProvider = Provider.of<ProductProvider>(context);
return Consumer<ProductProvider>(builder: (context, provider, child) {
if (provider.iscategroyloading) {
return Center(
child: Container(
width: 20,
height: 20,
decoration: BoxDecoration(
color: APPCOLOR.bgGrey,
borderRadius: BorderRadius.circular(10),
border: Border.all(
color: APPCOLOR.bgGrey,
width: 1,
),
),
child: const Center(
child: CupertinoActivityIndicator(),
),
),
);
} else {
final categories = [DatumCategory(id: "all", name: "ALL")];
categories.addAll(provider.categoryList.cast<DatumCategory>());
return Container(
decoration: const BoxDecoration(color: Colors.white),
width: 70,
child: ListView.builder(
itemCount: categories.length,
scrollDirection: Axis.vertical,
itemBuilder: (context, index) {
var category = categories[index];
return Padding(
padding: const EdgeInsets.only(bottom: 0),
child: InkWell(
onTap: () {
provider.iscroll = true;
provider.products.clear();
provider.isLoadingg = false;
provider.hasMore = true;
provider.page = 1;
provider.notifyListeners();
if (category.id == "all") {
provider.gettAllProduct(context, "", true, '', false);
} else {
provider.gettAllProduct(
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
? Colors.greenAccent.withOpacity(0.3)
: APPCOLOR.bgGrey,
borderRadius: BorderRadius.circular(5)),
child: Padding(
padding: const EdgeInsets.only(top: 0, bottom: 0),
child: SizedBox(
width: 70,
child: Column(
children: [
if (category.name == "ALL") ...{
if (provider.categoriesss.isNotEmpty)
PopupMenuButton<ProductCategoryModel>(
onSelected: (ProductCategoryModel value) {
activeIndexProvider.setActiveIndex(0);
if (value.id == "all") {
provider.iscroll = true;
provider.products.clear();
provider.isLoadingg = false;
provider.hasMore = true;
provider.page = 1;
provider.gettAllProduct(
context, "", true, '', false);
provider.getAllcategory(context);
} else {
provider.categoryList.clear();
provider.getSubcategory(
context, value.id);
}
provider.setSelectedCategory(value);
},
itemBuilder: (BuildContext context) =>
provider.categoriesss
.map(
(category) => PopupMenuItem(
value: category,
child: Text(category.name ??
"Unknown"),
),
)
.toList(),
child: Center(
child: Column(
children: [
const Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Text("All"),
Icon(Icons.arrow_drop_down)
],
),
CachedNetworkImage(
errorWidget:
(context, url, error) {
return Container(
height: 40,
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'),
],
),
)),
} else ...{
Column(
children: [
CachedNetworkImage(
errorWidget: (context, url, error) {
return Container(
height: 50,
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(
height: 60,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(5!),
),
image: DecorationImage(
fit: BoxFit.fill,
image: cIMage,
)),
);
},
imageUrl: category.image),
SizedBox(
height: 5,
),
Container(
width: 50,
child: Text(
category.name,
textAlign: TextAlign.center,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style:
activeIndexProvider.activeIndex ==
index
? context.customExtraBold(
APPCOLOR.balck1A1A1A, 9)
: context.customMedium(
APPCOLOR.balck1A1A1A, 10),
),
),
],
),
},
],
),
),
),
),
),
),
);
},
),
);
}
});
}
} }

View File

@@ -22,6 +22,7 @@ class FruitVeggieDetail extends StatefulWidget {
class _FruitVeggieDetailState extends State<FruitVeggieDetail> { class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
final ScrollController _scrollController = ScrollController(); final ScrollController _scrollController = ScrollController();
Map<String, bool> _expansionState = {};
@override @override
void initState() { void initState() {
@@ -32,31 +33,14 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
Provider.of<ProductProvider>(context, listen: false); Provider.of<ProductProvider>(context, listen: false);
productProvider.page = 1; productProvider.page = 1;
// productProvider.gettAllProduct(context, "", true, '', true); productProvider.getCategoryByLevel();
productProvider.getAllcategory(context); productProvider.getAllcategory(context);
productProvider.getCategoryByLevel();
productProvider.setActiveIndex(0); productProvider.setActiveIndex(0);
}); });
// _scrollController.addListener(() {
// if (_scrollController.position.pixels ==
// _scrollController.position.maxScrollExtent) {
// final productProvider =
// Provider.of<ProductProvider>(context, listen: false);
// productProvider.gettAllProduct(context, "", false, '', false);
// }
// });
} }
// @override
// void dispose() {
// _scrollController.dispose();
// super.dispose();
// }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
@@ -79,7 +63,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
), ),
), ),
title: const Text( title: const Text(
"Vegetables & Fruits", "Frontshop Emporium",
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
@@ -103,7 +87,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
Widget expendablecategory() { Widget expendablecategory() {
return Consumer<ProductProvider>( return Consumer<ProductProvider>(
builder: (context, provider, child) { builder: (context, provider, child) {
if (provider.iscategroyloading) { if (provider.subCategoryloading) {
return const Center(child: CupertinoActivityIndicator()); return const Center(child: CupertinoActivityIndicator());
} }
@@ -124,6 +108,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
} }
Widget _buildExpandableTile(ProductCategoryModel category) { Widget _buildExpandableTile(ProductCategoryModel category) {
final isExpanded = _expansionState[category.id] ?? false;
if (category.childCategories!.isEmpty) { if (category.childCategories!.isEmpty) {
return ListTile( return ListTile(
leading: CachedNetworkImage( leading: CachedNetworkImage(
@@ -135,7 +120,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
title: Text(category.name!), title: Text(category.name!),
onTap: () { onTap: () {
context.push(MyRoutes.CATEGORYPRODUCT, context.push(MyRoutes.CATEGORYPRODUCT,
extra: {"id":category.id,"name": category.name}); extra: {"id": category.id, "name": category.name});
}, },
); );
} }
@@ -143,8 +128,16 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
return Theme( return Theme(
data: Theme.of(context).copyWith(dividerColor: Colors.transparent), data: Theme.of(context).copyWith(dividerColor: Colors.transparent),
child: Card( child: Card(
color: Colors.grey.shade100, color: isExpanded
? Colors.tealAccent.withOpacity(0.3)
: Colors.grey.shade100,
child: ExpansionTile( child: ExpansionTile(
initiallyExpanded: isExpanded,
onExpansionChanged: (expanded) {
setState(() {
_expansionState[category.id!] = expanded;
});
},
leading: CachedNetworkImage( leading: CachedNetworkImage(
imageUrl: category.image!, imageUrl: category.image!,
width: 40, width: 40,
@@ -152,6 +145,11 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
errorWidget: (context, url, error) => const Icon(Icons.error), errorWidget: (context, url, error) => const Icon(Icons.error),
), ),
title: Text(category.name!), title: Text(category.name!),
trailing: Icon(
isExpanded ? Icons.keyboard_arrow_down : Icons.keyboard_arrow_right,
color: isExpanded ? Colors.greenAccent : Colors.black,
size: 35,
),
children: children:
category.childCategories!.map(_buildExpandableTile).toList(), category.childCategories!.map(_buildExpandableTile).toList(),
), ),
@@ -180,6 +178,8 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
), ),
), ),
); );
} else if (provider.categoryList.isEmpty) {
return SizedBox.shrink();
} else { } else {
// final categories = [DatumCategory(id: "all", name: "ALL")]; // final categories = [DatumCategory(id: "all", name: "ALL")];
// categories.addAll(provider.categoryList.cast<DatumCategory>()); // categories.addAll(provider.categoryList.cast<DatumCategory>());
@@ -198,8 +198,8 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
padding: const EdgeInsets.only(bottom: 0), padding: const EdgeInsets.only(bottom: 0),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
context.push(MyRoutes.CATEGORYPRODUCT, context.push(MyRoutes.CATEGORYPRODUCT,
extra: {"id":category.id,"name": category.name}); extra: {"id": category.id, "name": category.name});
// provider.iscroll = true; // provider.iscroll = true;
// provider.products.clear(); // provider.products.clear();
// provider.isLoadingg = false; // provider.isLoadingg = false;
@@ -232,117 +232,117 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
child: Column( child: Column(
children: [ children: [
if (category.name == "ALL") ...{ if (category.name == "ALL") ...{
if (provider.categoriesss.isNotEmpty) // if (provider.categoriesss.isNotEmpty)
PopupMenuButton<ProductCategoryModel>( // PopupMenuButton<ProductCategoryModel>(
onSelected: (ProductCategoryModel value) { // onSelected: (ProductCategoryModel value) {
activeIndexProvider.setActiveIndex(0); // activeIndexProvider.setActiveIndex(0);
if (value.id == "all") { // if (value.id == "all") {
provider.iscroll = true; // provider.iscroll = true;
provider.products.clear(); // provider.products.clear();
provider.isLoadingg = false; // provider.isLoadingg = false;
provider.hasMore = true; // provider.hasMore = true;
provider.page = 1; // provider.page = 1;
provider.gettAllProduct( // provider.gettAllProduct(
context, "", true, '', false); // context, "", true, '', false);
provider.getAllcategory(context); // provider.getAllcategory(context);
} else { // } else {
provider.categoryList.clear(); // provider.categoryList.clear();
provider.getSubcategory( // provider.getSubcategory(
context, value.id); // context, value.id);
} // }
provider.setSelectedCategory(value); // provider.setSelectedCategory(value);
}, // },
itemBuilder: (BuildContext context) => // itemBuilder: (BuildContext context) =>
provider.categoriesss // provider.categoriesss
.map( // .map(
(category) => PopupMenuItem( // (category) => PopupMenuItem(
value: category, // value: category,
child: Text(category.name ?? // child: Text(category.name ??
"Unknown"), // "Unknown"),
), // ),
) // )
.toList(), // .toList(),
child: Center( // child: Center(
child: Column( // child: Column(
children: [ // children: [
const Row( // const Row(
crossAxisAlignment: // crossAxisAlignment:
CrossAxisAlignment.center, // CrossAxisAlignment.center,
mainAxisAlignment: // mainAxisAlignment:
MainAxisAlignment.center, // MainAxisAlignment.center,
children: [ // children: [
Text("All"), // Text("All"),
Icon(Icons.arrow_drop_down) // Icon(Icons.arrow_drop_down)
], // ],
), // ),
CachedNetworkImage( // CachedNetworkImage(
errorWidget: // errorWidget:
(context, url, error) { // (context, url, error) {
return Container( // return Container(
height: 40, // height: 40,
decoration: BoxDecoration( // decoration: BoxDecoration(
color: APPCOLOR.bgGrey, // color: APPCOLOR.bgGrey,
borderRadius: // borderRadius:
BorderRadius // BorderRadius
.circular(10), // .circular(10),
border: Border.all( // border: Border.all(
color: Colors // color: Colors
.transparent, // .transparent,
width: 1, // width: 1,
)), // )),
child: Center( // child: Center(
child: Image.asset( // child: Image.asset(
APPASSETS.placeHolder, // APPASSETS.placeHolder,
height: 50 * 0.4, // height: 50 * 0.4,
color: APPCOLOR.bgGrey, // color: APPCOLOR.bgGrey,
)), // )),
); // );
}, // },
placeholder: (context, url) { // placeholder: (context, url) {
return Container( // return Container(
height: 50, // height: 50,
width: 50, // width: 50,
decoration: BoxDecoration( // decoration: BoxDecoration(
color: APPCOLOR.bgGrey, // color: APPCOLOR.bgGrey,
borderRadius: // borderRadius:
BorderRadius // BorderRadius
.circular(10), // .circular(10),
border: Border.all( // border: Border.all(
color: // color:
APPCOLOR.bgGrey, // APPCOLOR.bgGrey,
width: 1, // width: 1,
)), // )),
child: const Center( // child: const Center(
child: // child:
CupertinoActivityIndicator(), // CupertinoActivityIndicator(),
), // ),
); // );
}, // },
imageBuilder: // imageBuilder:
(context, cIMage) { // (context, cIMage) {
return Container( // return Container(
// width: 60, // // width: 60,
height: 70, // height: 70,
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: // borderRadius:
BorderRadius.all( // BorderRadius.all(
Radius.circular(5!), // Radius.circular(5!),
), // ),
image: DecorationImage( // image: DecorationImage(
fit: BoxFit.fill, // fit: BoxFit.fill,
image: cIMage, // image: cIMage,
)), // )),
); // );
}, // },
imageUrl: provider // imageUrl: provider
.selectedCategory // .selectedCategory
?.image ?? // ?.image ??
'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png'), // 'https://i.pinimg.com/originals/a5/f3/5f/a5f35fb23e942809da3df91b23718e8d.png'),
], // ],
), // ),
)), // )),
} else ...{ } else ...{
Column( Column(
children: [ children: [
@@ -387,7 +387,7 @@ class _FruitVeggieDetailState extends State<FruitVeggieDetail> {
}, },
imageBuilder: (context, cIMage) { imageBuilder: (context, cIMage) {
return Container( return Container(
height: 60, height: 70,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(5!), Radius.circular(5!),

View File

@@ -37,7 +37,7 @@ class _HomeScreenState extends State<HomeScreen> {
productProvider.getBanners(context); productProvider.getBanners(context);
productProvider.getHomeProduct(context, "", '', '', '', ''); productProvider.getHomeProduct(context, "", '', '', '', '');
productProvider.getBestDealProduct(context, ''); productProvider.getBestDealProduct(context, '');
productProvider.getAllcategory(context); // productProvider.getAllcategory(context);
productProvider.updateDeviceToken(context); productProvider.updateDeviceToken(context);
// productProvider.getCategoryByLevel(); // productProvider.getCategoryByLevel();
@@ -87,7 +87,8 @@ class _HomeScreenState extends State<HomeScreen> {
child: ListView( child: ListView(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
shrinkWrap: true, shrinkWrap: true,
children: searchProvider.suggestions.map((suggestion) { children: searchProvider.suggestions.map((suggestion)
{
return ListTile( return ListTile(
title: Row( title: Row(
children: [ children: [
@@ -103,24 +104,26 @@ class _HomeScreenState extends State<HomeScreen> {
Text(suggestion.name), Text(suggestion.name),
], ],
), ),
onTap: () { onTap: () async {
// _searchController.text = suggestion.name; var status = await searchProvider.getProduuctDetails(
// searchProvider.getHomeProduct( context, suggestion.id, 1, suggestion.discountPrice);
// context, "", suggestion.name, '', '', ''); if (status) {
context.push(
context.push( MyRoutes.PRODUCTDETAILS,
MyRoutes.PRODUCTDETAILS, extra: {
extra: { "id": suggestion.id,
"id": suggestion.id, "quantity": 1,
"quantity": 1, "price": suggestion.discountPrice,
"price": suggestion.discountPrice, },
}, );
); }
_clearOverlay(); _clearOverlay();
}, },
); );
}).toList(), }).toList(),
), ),
), ),
), ),
@@ -164,6 +167,15 @@ class _HomeScreenState extends State<HomeScreen> {
), ),
child: TextFormField( child: TextFormField(
controller: _searchController, controller: _searchController,
keyboardType: TextInputType.text,
textInputAction: TextInputAction.search,
onFieldSubmitted: (value)
{
if (value.isNotEmpty) {
provider.getHomeProduct(context, "",
_searchController.text, '', '', '');
}
},
onChanged: (value) { onChanged: (value) {
if (value.isEmpty) { if (value.isEmpty) {
provider.getHomeProduct(context, "", provider.getHomeProduct(context, "",
@@ -202,6 +214,7 @@ class _HomeScreenState extends State<HomeScreen> {
); );
}), }),
), ),
const SizedBox(width: 10), const SizedBox(width: 10),
InkWell( InkWell(
onTap: () { onTap: () {
@@ -383,25 +396,32 @@ class _HomeScreenState extends State<HomeScreen> {
height: 300.h, height: 300.h,
)) ))
: SizedBox( : SizedBox(
height: MediaQuery.of(context).size.height * 0.3, height: MediaQuery.of(context).size.height * 0.4,
child: ListView.builder( child: ListView.builder(
itemCount: provider.bestdeal.length, itemCount: provider.bestdeal.length,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemBuilder: (context, index) { itemBuilder: (context, index) {
var bestdealproduct = provider.bestdeal[index]; var bestdealproduct = provider.bestdeal[index];
double cardWidth = double cardWidth =
MediaQuery.of(context).size.width * 0.4; MediaQuery.of(context).size.width * 0.5;
return InkWell( return InkWell(
onTap: () { onTap: () async {
context.push( var status = await provider.getProduuctDetails(
MyRoutes.PRODUCTDETAILS, context,
extra: { bestdealproduct.id,
"id": bestdealproduct.id, 1,
"quantity": 1, bestdealproduct.discountPrice);
"price": bestdealproduct.discountPrice, if (status) {
}, context.push(
); MyRoutes.PRODUCTDETAILS,
extra: {
"id": bestdealproduct.id,
"quantity": 1,
"price": bestdealproduct.discountPrice,
},
);
}
}, },
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
@@ -417,7 +437,7 @@ class _HomeScreenState extends State<HomeScreen> {
Center( Center(
child: Container( child: Container(
height: MediaQuery.of(context).size.height * height: MediaQuery.of(context).size.height *
0.17, 0.25,
decoration: BoxDecoration( decoration: BoxDecoration(
color: APPCOLOR.bgGrey, color: APPCOLOR.bgGrey,
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
@@ -461,8 +481,6 @@ class _HomeScreenState extends State<HomeScreen> {
SizedBox( SizedBox(
height: MediaQuery.of(context).size.height * height: MediaQuery.of(context).size.height *
0.01), 0.01),
Text( Text(
bestdealproduct.name ?? "", bestdealproduct.name ?? "",
textAlign: TextAlign.left, textAlign: TextAlign.left,
@@ -756,15 +774,19 @@ class _HomeScreenState extends State<HomeScreen> {
itemBuilder: (context, index) { itemBuilder: (context, index) {
var product = provider.homeproducts[index]; var product = provider.homeproducts[index];
return InkWell( return InkWell(
onTap: () { onTap: () async {
context.push( var status = await provider.getProduuctDetails(
MyRoutes.PRODUCTDETAILS, context, product.id, 1, product.discountPrice);
extra: { if (status) {
"id": product.id, context.push(
"quantity": 1, MyRoutes.PRODUCTDETAILS,
"price": product.discountPrice, extra: {
}, "id": product.id,
); "quantity": 1,
"price": product.discountPrice,
},
);
}
}, },
child: SizedBox( child: SizedBox(
child: Column( child: Column(

View File

@@ -59,7 +59,7 @@ class _MyOrderScreenState extends State<MyOrderScreen> {
width: 20, width: 20,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
context.clearAndPush(routePath: MyRoutes.BOTTOMNAV); context.clearAndPush(routePath: MyRoutes.HOME);
}, },
child: SvgPicture.asset( child: SvgPicture.asset(
APPASSETS.back, APPASSETS.back,

View File

@@ -0,0 +1,271 @@
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:http/http.dart' as http;
import 'package:phonepe_payment_sdk/phonepe_payment_sdk.dart';
import 'package:uuid/uuid.dart';
import 'dart:convert';
import 'dart:async';
import 'package:app_links/app_links.dart';
import '../../../utils/constants/shared_pref_utils.dart';
import '../../core/routes/routes.dart';
import '../myOrder/my_order.dart';
class PhonePePaymentScreen extends StatefulWidget {
final double amount;
final String cartId;
final String addressId;
final String userId;
const PhonePePaymentScreen({
required this.amount,
required this.cartId,
required this.addressId,
required this.userId,
super.key,
});
@override
State<PhonePePaymentScreen> createState() => _PhonePePaymentScreenState();
}
class _PhonePePaymentScreenState extends State<PhonePePaymentScreen> {
String _statusMessage = "Initiating payment...";
bool _isLoading = true;
final AppLinks _appLinks = AppLinks();
StreamSubscription<Uri>? _linkSub;
@override
void initState() {
super.initState();
_listenForRedirect();
_initiateAndStartPayment();
}
@override
void dispose() {
_linkSub?.cancel();
super.dispose();
}
void _listenForRedirect() {
print("Listening for redirect...");
_linkSub = _appLinks.uriLinkStream.listen((Uri uri) {
print("Deep link received: $uri");
final transactionId = uri.queryParameters['transactionId'];
final status = uri.queryParameters['status'];
if (transactionId != null && status == "SUCCESS") {
//_verifyPayment(transactionId);
} else if (status == "CANCEL") {
setState(() {
_statusMessage = "Payment cancelled by user.";
_isLoading = false;
});
Navigator.pop(context, false); // 👈 Return failure
} else {
setState(() {
_statusMessage = "Payment failed or unknown status.";
_isLoading = false;
});
Navigator.pop(context, false); // 👈 Return failure
}
}, onError: (err) {
print("Deep link error: $err");
setState(() {
_statusMessage = "Error handling redirect: $err";
_isLoading = false;
});
Navigator.pop(context, false); // 👈 Return failure
});
}
Future<void> _initiateAndStartPayment() async {
try {
final uri = Uri.parse("https://www.mv.frontshopemporium.in/xam/payment/phonepe/sdk/initiate");
print("Calling backend initiate API...");
final response = await http.post(
uri,
headers: {
"Content-Type": "application/json",
"authorization": "Bearer ${await SharedPrefUtils.getToken()}",
},
body: jsonEncode({
"amount": widget.amount,
"cartId": widget.cartId,
"addressId": widget.addressId,
}),
);
print("Response code: ${response.statusCode}");
print("Response body: ${response.body}");
if (response.statusCode != 200 && response.statusCode != 201) {
setState(() {
_statusMessage = "Failed to initiate payment.";
_isLoading = false;
});
return;
}
final data = jsonDecode(response.body);
final String? orderId = data['orderId'];
final String? merchantId = data['merchantId'];
final String? token = data['token'];
const String environment = "PRODUCTION";
const String appSchema = "frontshop";
final String flowId = 'FLWID_${Uuid().v4()}';
if (orderId == null || merchantId == null || token == null) {
print("Invalid response from backend. Missing fields.");
setState(() {
_statusMessage = "Invalid response from backend.";
_isLoading = false;
});
return;
}
print("Initializing SDK...");
PhonePePaymentSdk.init(environment, merchantId, flowId, true);
final payload = {
"orderId": orderId,
"merchantId": merchantId,
"token": token,
"paymentMode": {"type": "PAY_PAGE"},
};
String request = jsonEncode(payload);
print("Starting transaction with payload: $request");
final result = await PhonePePaymentSdk.startTransaction(request, appSchema);
print("Transaction result: $result");
if (result != null) {
final status = result['status']?.toString() ?? '';
final error = result['error']?.toString() ?? '';
if (status == 'SUCCESS') {
final txnId = data['merchantOrderId']?? '';
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text("Payment Successful!")),
);
_verifyPayment(txnId);
context.push(MyRoutes.MYORDER);
} else if (status == 'CANCELLED') {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text("Payment Cancelled by User")),
);
setState(() {
_statusMessage = "Payment cancelled.";
_isLoading = false;
});
Navigator.pop(context, false);
} else {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text("Payment Failed: $error")),
);
setState(() {
_statusMessage = "Payment failed.";
_isLoading = false;
});
Navigator.pop(context, false);
}
} else {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text("No response from PhonePe")),
);
setState(() {
_statusMessage = "No response.";
_isLoading = false;
});
Navigator.pop(context, false);
}
} catch (e) {
print("Error during payment: $e");
setState(() {
_statusMessage = "Error: ${e.toString()}";
_isLoading = false;
});
Navigator.pop(context, false); // 👈 Exit with failure
}
}
Future<void> _verifyPayment(String transactionId) async {
try {
final verifyUri = Uri.parse(
"https://mv.frontshopemporium.in/xam/payment/phonepe/sdk/status/$transactionId",
);
final response = await http.get(
verifyUri,
headers: {
"Content-Type": "application/json",
"authorization": "Bearer ${await SharedPrefUtils.getToken()}",
},
);
print("Status check response: ${response.body}");
if (response.statusCode == 200) {
final statusData = jsonDecode(response.body);
final paymentStatus = statusData['status'];
if (paymentStatus == "SUCCESS") {
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(content: Text("Order Placed Successfully")),
);
Navigator.pushAndRemoveUntil(
context,
MaterialPageRoute(builder: (_) => MyOrderScreen()),
(route) => false,
);
}
else {
setState(() {
_statusMessage = "Payment verification failed: $paymentStatus";
_isLoading = false;
});
Navigator.pop(context, false); // ❌ Return failure
}
} else {
setState(() {
_statusMessage = "Failed to verify payment.";
_isLoading = false;
});
Navigator.pop(context, false);
}
} catch (e) {
print("Verification error: $e");
setState(() {
_statusMessage = "Verification error: ${e.toString()}";
_isLoading = false;
});
Navigator.pop(context, false); // ❌ Return failure
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("PhonePe Payment")),
body: Center(
child: _isLoading
? const CircularProgressIndicator()
: Text(
_statusMessage,
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 16),
),
),
);
}
}

View File

@@ -46,8 +46,8 @@ class _ProductDetailsState extends State<ProductDetails> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
Provider.of<ProductProvider>(context, listen: false) // Provider.of<ProductProvider>(context, listen: false)
.getProduuctDetails(context, widget.id, widget.quantity, widget.price); // .getProduuctDetails(context, widget.id, widget.quantity, widget.price);
} }
double value = 3.5; double value = 3.5;
@@ -421,7 +421,7 @@ class _ProductDetailsState extends State<ProductDetails> {
children: [ children: [
_buildText( _buildText(
"Customer Care Details ", "Customer Care Details ",
'In case of any issue, contact us${provider.productDetails.data!.store!.officialPhoneNumber ?? ''}', 'In case of any issue, contact us: +91${provider.productDetails.data!.store!.officialPhoneNumber ?? ''}',
), ),
if (isExpanded) if (isExpanded)
_buildText( _buildText(
@@ -962,11 +962,9 @@ class _ProductDetailsState extends State<ProductDetails> {
} }
String formatDate(String dateStr) { String formatDate(String dateStr) {
// Parse the date string to DateTime
DateTime date = DateTime.parse(dateStr).toLocal(); DateTime date = DateTime.parse(dateStr).toLocal();
// Format the date return DateFormat('MMMM d, yyyy').format(date);
return DateFormat('MMMM d, yyyy').format(date); // "February 4, 2025"
} }
Widget bestDeal() { Widget bestDeal() {
@@ -977,24 +975,31 @@ class _ProductDetailsState extends State<ProductDetails> {
return Center(child: Text('No products available')); return Center(child: Text('No products available'));
} else { } else {
return SizedBox( return SizedBox(
height: MediaQuery.of(context).size.height * 0.3, height: MediaQuery.of(context).size.height * 0.4,
child: ListView.builder( child: ListView.builder(
itemCount: provider.bestdeal.length, itemCount: provider.bestdeal.length,
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemBuilder: (context, index) { itemBuilder: (context, index) {
var bestdealproduct = provider.bestdeal[index]; var bestdealproduct = provider.bestdeal[index];
double cardWidth = MediaQuery.of(context).size.width * 0.4; double cardWidth = MediaQuery.of(context).size.width * 0.5;
return InkWell( return InkWell(
onTap: () { onTap: () async
context.push( {
MyRoutes.PRODUCTDETAILS, var status = await provider.getProduuctDetails(context,
extra: { bestdealproduct.id, 1, bestdealproduct.discountPrice);
"id": bestdealproduct.id, if (status) {
"quantity": 1, context.push(
"price": bestdealproduct.discountPrice, MyRoutes.PRODUCTDETAILS,
}, extra: {
); "id": bestdealproduct.id,
"quantity": 1,
"price": bestdealproduct.discountPrice,
},
);
}
}, },
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
@@ -1009,7 +1014,7 @@ class _ProductDetailsState extends State<ProductDetails> {
children: [ children: [
Center( Center(
child: Container( child: Container(
height: MediaQuery.of(context).size.height * 0.17, height: MediaQuery.of(context).size.height * 0.25,
decoration: BoxDecoration( decoration: BoxDecoration(
color: APPCOLOR.bgGrey, color: APPCOLOR.bgGrey,
borderRadius: BorderRadius.circular(15), borderRadius: BorderRadius.circular(15),
@@ -1244,89 +1249,3 @@ class _ProductDetailsState extends State<ProductDetails> {
}); });
} }
} }
// Widget _slider(BuildContext context) {
// double height = MediaQuery.of(context).size.height * .43;
// double statusBarHeight = MediaQuery.of(context).padding.top;
// // Fetch product data from Provider
// final productProvider = Provider.of<ProductProvider>(context);
// Product? model = productProvider.selectedProduct; // Ensure you have a selected product
// if (model == null) {
// return Center(child: CircularProgressIndicator()); // Show loading if no product data
// }
// return GestureDetector(
// onTap: () {
// Navigator.push(
// context,
// PageRouteBuilder(
// pageBuilder: (_, __, ___) => ProductPreview(
// pos: _curSlider,
// secPos: widget.secPos,
// index: widget.index,
// id: model.id,
// imgList: sliderList,
// list: widget.list,
// video: model.video,
// videoType: model.videType,
// from: true,
// ),
// ),
// );
// },
// child: Stack(
// children: <Widget>[
// Container(
// alignment: Alignment.center,
// padding: EdgeInsets.only(top: statusBarHeight + kToolbarHeight),
// child: PageView.builder(
// physics: const BouncingScrollPhysics(),
// itemCount: sliderList.length,
// scrollDirection: Axis.horizontal,
// controller: _pageController,
// reverse: false,
// onPageChanged: (index) {
// setState(() {
// _curSlider = index;
// });
// },
// itemBuilder: (BuildContext context, int i) {
// return sliderList[i] != "youtube"
// ? networkImageCommon(sliderList[i]!, height, true)
// : playIcon(model);
// },
// ),
// ),
// Positioned(
// bottom: 30,
// height: 20,
// width: MediaQuery.of(context).size.width,
// child: Row(
// mainAxisSize: MainAxisSize.max,
// mainAxisAlignment: MainAxisAlignment.center,
// children: List.generate(
// sliderList.length,
// (index) => AnimatedContainer(
// duration: const Duration(milliseconds: 500),
// width: _curSlider == index ? 30.0 : 8.0,
// height: 8.0,
// margin: const EdgeInsets.symmetric(vertical: 2.0, horizontal: 4.0),
// decoration: BoxDecoration(
// border: Border.all(
// color: Theme.of(context).colorScheme.primary),
// borderRadius: BorderRadius.circular(20.0),
// color: _curSlider == index
// ? Theme.of(context).colorScheme.primary
// : Colors.transparent,
// ),
// ),
// ),
// ),
// ),
// indicatorImage(model),
// ],
// ),
// );
// }

View File

@@ -395,4 +395,7 @@ class _ProfileScreenState extends State<ProfileScreen> {
}, },
); );
} }
} }

View File

@@ -1,9 +1,5 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:grocery_app/utils/extensions/extensions.dart';
import 'package:provider/provider.dart';
import 'package:gap/gap.dart'; import 'package:gap/gap.dart';
class PrivacyPolicy extends StatelessWidget { class PrivacyPolicy extends StatelessWidget {
@@ -17,7 +13,7 @@ class PrivacyPolicy extends StatelessWidget {
leading: IconButton( leading: IconButton(
icon: Icon(Icons.arrow_back_ios_rounded), icon: Icon(Icons.arrow_back_ios_rounded),
onPressed: () { onPressed: () {
Navigator.pop(context); // Handle back button functionality Navigator.pop(context);
}, },
), ),
title: Text( title: Text(
@@ -32,72 +28,60 @@ class PrivacyPolicy extends StatelessWidget {
padding: EdgeInsets.all(16.w), padding: EdgeInsets.all(16.w),
child: ListView( child: ListView(
children: [ children: [
_buildSectionTitle('1. General Terms'),
_buildSectionContent( _buildSectionContent(
'Welcome to Frontshop Emporium! Were delighted to have you here. By accessing or using our platform, ' 'Frontshop Emporium values your privacy and is committed to protecting your personal data. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you use our App.',
'we kindly ask that you review and agree to our terms and conditions. These ensure a safe and seamless '
'experience for everyone. If you have any concerns or do not agree with these terms, we respect your '
'choice to refrain from using our platform. Thank you for understanding!',
), ),
_buildSectionTitle('2. User Terms'), _buildSectionTitle('1. Information We Collect'),
_buildSubSectionTitle('Eligibility'),
_buildSectionContent( _buildSectionContent(
'• Users must provide accurate and complete information during registration.', 'We collect the following types of personal data:\n\n'
'• Personal Identifiers: Name, phone number, email address, billing/shipping address.\n'
'• Payment Details: Through secure third-party payment processors (we do not store card details).\n'
'• Device and Usage Information: IP address, device type, OS version, and activity logs.',
), ),
_buildSubSectionTitle('User Responsibilities'), _buildSectionTitle('2. How We Use Your Information'),
_buildSectionContent( _buildSectionContent(
'• Ensure your account details are secure. You are responsible for all activities under your account.\n' 'Your information may be used to:\n\n'
'Use the platform in compliance with all applicable laws and regulations.\n' 'Process and fulfill orders\n'
'Do not engage in fraudulent, abusive, or harmful activities, including posting inappropriate content ' 'Communicate with you regarding orders, support, and updates\n'
'or exploiting platform features.', '• Improve the App\'s performance and customer experience\n'
'• Prevent fraud and ensure security\n'
'• Comply with legal obligations',
), ),
_buildSubSectionTitle('Order and Payment'), _buildSectionTitle('3. Information Sharing'),
_buildSectionContent( _buildSectionContent(
'• Orders are confirmed only upon payment.\n' 'We do not sell, trade, or rent your personal information to third parties. We may share information with:\n\n'
'Prices, discounts, and offers are subject to change without notice.', 'Service Providers: Such as delivery partners and payment gateways, strictly for fulfilling your orders.\n'
'• Legal Authorities: If required by law, court order, or legal process.',
), ),
_buildSectionTitle('3. Vendor Terms'), _buildSectionTitle('4. Data Security'),
_buildSubSectionTitle('Registration and Eligibility'),
_buildSectionContent( _buildSectionContent(
'• Vendors must provide valid business details and adhere to local commerce regulations.\n' 'We implement strong physical, electronic, and procedural safeguards to protect your data. '
'• Vendors must be legally registered businesses and provide necessary documentation (e.g., business ' 'However, no method of transmission over the internet or mobile networks is 100% secure.',
'licenses, tax identification). The Company reserves the right to approve or deny vendor applications.\n'
'• Both parties agree to keep proprietary information confidential. Vendor information will not be shared '
'without consent, except as required by law.',
), ),
_buildSubSectionTitle('Vendor Responsibilities'), _buildSectionTitle('5. Your Rights'),
_buildSectionContent( _buildSectionContent(
'• Maintain accurate product descriptions, prices, and inventory levels.\n' 'You have the right to:\n\n'
'Ensure timely dispatch and delivery of products. Resolve user complaints promptly.\n' 'Access the personal data we hold about you\n'
'Vendors must ensure that all products meet quality and safety standards.', 'Request correction of inaccurate information\n'
'• Withdraw consent or delete your account (subject to certain legal or operational exceptions)\n\n'
'To exercise any of the above rights, please contact us at support@frontshopemporium.com.',
), ),
_buildSectionTitle('4. Delivery Partner Terms'), _buildSectionTitle('6. Retention of Data'),
_buildSubSectionTitle('Eligibility'),
_buildSectionContent( _buildSectionContent(
'• Delivery Partners must provide valid identification. Delivery Partners must be legally registered entities ' 'We retain your personal data only for as long as necessary to fulfill the purposes for which it was collected, or as required by law.',
'or individuals with appropriate licenses and follow all traffic rules and regulations.',
), ),
_buildSectionTitle('5. Privacy Policy'), _buildSectionTitle('7. Childrens Privacy'),
_buildSectionContent( _buildSectionContent(
'Frontshop Emporium is committed to protecting your privacy.\n' 'Our App is not intended for use by individuals under the age of 18. '
'We do not sell your data to third parties.\n' 'We do not knowingly collect personal data from minors.',
'• Data may be shared with service providers, delivery partners, and legal authorities as necessary.',
), ),
_buildSectionTitle('6. Refund Policy'), _buildSectionTitle('8. Changes to the Policy'),
_buildSectionContent( _buildSectionContent(
'• Products are eligible for a refund if they are defective, damaged during delivery, or not as described.\n' 'We may update this Privacy Policy from time to time. Updates will be posted in the App and will be effective from the date of publication.',
'• Requests must be initiated within 7 days of receiving the product.',
), ),
_buildSectionTitle('7. Support Policy'), _buildSectionTitle('Contact us :'),
_buildSectionContent( _buildcontact("Phone :", "9406348489"),
'• For assistance, contact our support team via email or live chat available on the platform.\n' _buildcontact("Email :", "support@frontshopemporium.com"),
'• Support hours: Monday to Friday, 9 AM 6 PM (local time).',
),
SizedBox(height: 20),
Gap(20.h),
// Continue Button
Gap(20.h), Gap(20.h),
], ],
), ),
@@ -135,3 +119,21 @@ Widget _buildSectionContent(String content) {
), ),
); );
} }
Widget _buildcontact(String title, String description) {
return Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Row(
children: [
Text(
title,
style: TextStyle(fontSize: 18, height: 1.5),
),
Text(
description,
style: TextStyle(fontSize: 17, height: 1.5, color: Colors.blue),
),
],
),
);
}

View File

@@ -1,5 +1,4 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
import 'package:grocery_app/utils/extensions/extensions.dart'; import 'package:grocery_app/utils/extensions/extensions.dart';
@@ -17,7 +16,7 @@ class TermsAndConditionsScreen extends StatelessWidget {
leading: IconButton( leading: IconButton(
icon: Icon(Icons.arrow_back_ios_rounded), icon: Icon(Icons.arrow_back_ios_rounded),
onPressed: () { onPressed: () {
Navigator.pop(context); // Handle back button functionality Navigator.pop(context);
}, },
), ),
title: Text( title: Text(
@@ -32,72 +31,90 @@ class TermsAndConditionsScreen extends StatelessWidget {
padding: EdgeInsets.all(16.w), padding: EdgeInsets.all(16.w),
child: ListView( child: ListView(
children: [ children: [
_buildSectionTitle('1. General Terms'),
_buildSectionContent( _buildSectionContent(
'Welcome to Frontshop Emporium! Were delighted to have you here. By accessing or using our platform, ' 'These Terms and Conditions ("Terms") govern your access to and use of the Frontshop Emporium mobile application ("App"). By downloading, accessing, or using the App, you agree to these Terms. If you do not agree, please do not use the App.',
'we kindly ask that you review and agree to our terms and conditions. These ensure a safe and seamless '
'experience for everyone. If you have any concerns or do not agree with these terms, we respect your '
'choice to refrain from using our platform. Thank you for understanding!',
), ),
_buildSectionTitle('2. User Terms'), _buildSectionTitle('1. Acceptance of Terms'),
_buildSubSectionTitle('Eligibility'),
_buildSectionContent( _buildSectionContent(
'• Users must provide accurate and complete information during registration.', 'By accessing or using the App, you confirm that you are legally capable of entering into a binding agreement and that you have read, understood, and accepted these Terms.',
), ),
_buildSubSectionTitle('User Responsibilities'), _buildSectionTitle('2. User Account'),
_buildSectionContent( _buildSectionContent(
'• Ensure your account details are secure. You are responsible for all activities under your account.\n' 'To access certain features of the App, you may be required to create an account. You agree to provide accurate, current, and complete information and to keep it updated. You are solely responsible for maintaining the confidentiality of your account credentials and for all activities that occur under your account.',
'• Use the platform in compliance with all applicable laws and regulations.\n'
'• Do not engage in fraudulent, abusive, or harmful activities, including posting inappropriate content '
'or exploiting platform features.',
), ),
_buildSubSectionTitle('Order and Payment'), _buildSectionTitle('3. Use of the App'),
_buildSectionContent( _buildSectionContent(
'• Orders are confirmed only upon payment.\n' 'You agree to use the App for personal, non-commercial purposes only and in accordance with applicable laws. Prohibited activities include:\n• Uploading or transmitting malicious software\n• Violating intellectual property rights\n• Impersonating others or misrepresenting your identity\n• Interfering with app functionality or server operations',
'• Prices, discounts, and offers are subject to change without notice.',
), ),
_buildSectionTitle('3. Vendor Terms'), _buildSectionTitle('4. Product Descriptions and Pricing'),
_buildSubSectionTitle('Registration and Eligibility'),
_buildSectionContent( _buildSectionContent(
'• Vendors must provide valid business details and adhere to local commerce regulations.\n' 'We make every effort to display accurate product details. However, we do not guarantee that product descriptions, pricing, or availability are error-free. We reserve the right to correct any errors and to change or update information at any time without prior notice.',
'• Vendors must be legally registered businesses and provide necessary documentation (e.g., business '
'licenses, tax identification). The Company reserves the right to approve or deny vendor applications.\n'
'• Both parties agree to keep proprietary information confidential. Vendor information will not be shared '
'without consent, except as required by law.',
), ),
_buildSubSectionTitle('Vendor Responsibilities'), _buildSectionTitle('5. Orders and Payments'),
_buildSectionContent( _buildSectionContent(
'• Maintain accurate product descriptions, prices, and inventory levels.\n' 'All orders placed through the App are subject to acceptance and availability. Prices are listed in Indian Rupees (INR) and are inclusive of applicable taxes unless otherwise stated. We reserve the right to refuse or cancel any order at our discretion.',
'• Ensure timely dispatch and delivery of products. Resolve user complaints promptly.\n'
'• Vendors must ensure that all products meet quality and safety standards.',
), ),
_buildSectionTitle('4. Delivery Partner Terms'), _buildSectionTitle('6. Intellectual Property'),
_buildSubSectionTitle('Eligibility'),
_buildSectionContent( _buildSectionContent(
'• Delivery Partners must provide valid identification. Delivery Partners must be legally registered entities ' 'All content on the App—including text, images, logos, design, software, and trademarks—is the property of Frontshop Emporium or its licensors. You may not reproduce, distribute, or use any content without prior written permission.',
'or individuals with appropriate licenses and follow all traffic rules and regulations.',
), ),
_buildSectionTitle('5. Privacy Policy'), _buildSectionTitle('7. Termination'),
_buildSectionContent( _buildSectionContent(
'Frontshop Emporium is committed to protecting your privacy.\n' 'We reserve the right to suspend or terminate your access to the App at any time, without notice, if you violate these Terms or engage in any unlawful or abusive behavior.',
'• We do not sell your data to third parties.\n'
'• Data may be shared with service providers, delivery partners, and legal authorities as necessary.',
), ),
_buildSectionTitle('6. Refund Policy'), _buildSectionTitle('8. Limitation of Liability'),
_buildSectionContent( _buildSectionContent(
'• Products are eligible for a refund if they are defective, damaged during delivery, or not as described.\n' 'To the fullest extent permitted by law, Frontshop Emporium shall not be liable for any indirect, incidental, special, consequential, or punitive damages, or any loss of profits or revenues, whether incurred directly or indirectly.',
'• Requests must be initiated within 7 days of receiving the product.',
), ),
_buildSectionTitle('7. Support Policy'), _buildSectionTitle('9. Governing Law'),
_buildSectionContent( _buildSectionContent(
'• For assistance, contact our support team via email or live chat available on the platform.\n' 'These Terms are governed by the laws of India. Any disputes shall be subject to the exclusive jurisdiction of the courts located in Bilaspur, Chhattisgarh.',
'• Support hours: Monday to Friday, 9 AM 6 PM (local time).',
), ),
SizedBox(height: 20), _buildSectionTitle('10. Changes to the Terms'),
_buildSectionContent(
Gap(20.h), 'We reserve the right to modify these Terms at any time. Any changes will be effective immediately upon posting in the App. Continued use of the App constitutes your acceptance of the revised Terms.',
),
// Continue Button _buildSectionTitle('Shipping Policy'),
_buildSubSectionTitle('1. Service Areas'),
_buildSectionContent(
'We ship across India. For any special delivery requests, please contact our support team.',
),
_buildSubSectionTitle('2. Order Processing Time'),
_buildSectionContent(
'Orders are typically processed within 2-3 business days. A confirmation message with tracking details will be shared once your order is dispatched.',
),
_buildSubSectionTitle('3. Delivery Timeline'),
_buildSectionContent(
'Standard delivery time is 5-7 business days depending on your location. Delays due to courier issues or high demand may occasionally occur.',
),
_buildSubSectionTitle('4. Shipping Charges'),
_buildSectionContent(
'Shipping fees are calculated during checkout based on the weight and delivery address of your order.',
),
_buildSubSectionTitle('5. Responsibility'),
_buildSectionContent(
'While we take utmost care in packing and shipping, Frontshop Emporium is not liable for delays or damage during transit. However, we will assist you in coordinating with the delivery partner if needed.',
),
_buildSectionTitle('Return and Refund Policy'),
_buildSubSectionTitle('1. Return Eligibility'),
_buildSectionContent(
'Returns are accepted within 7 days of delivery. Items must be unused, in original packaging, and in the same condition as received.',
),
_buildSubSectionTitle('2. Returnable Items'),
_buildSectionContent(
'Returns are accepted only for defective or damaged items.',
),
_buildSubSectionTitle('3. Return Process'),
_buildSectionContent(
'To initiate a return, contact us at support@frontshopemporium.com with your order details and reason for return. Once approved, return instructions will be provided.',
),
_buildSubSectionTitle('4. Refunds'),
_buildSectionContent(
'Once we receive and inspect the returned item, your refund will be credited to the original payment method within 7 business days.',
),
_buildSectionTitle('Contact us :'),
_buildcontact("Phone :", "9406348489"),
_buildcontact("Email :", "support@frontshopemporium.com"),
Gap(20.h), Gap(20.h),
], ],
), ),
@@ -135,3 +152,21 @@ Widget _buildSectionContent(String content) {
), ),
); );
} }
Widget _buildcontact(String title, String description) {
return Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Row(
children: [
Text(
title,
style: TextStyle(fontSize: 18, height: 1.5),
),
Text(
description,
style: TextStyle(fontSize: 17, height: 1.5, color: Colors.blue),
),
],
),
);
}

View File

@@ -7,12 +7,16 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <file_selector_linux/file_selector_plugin.h> #include <file_selector_linux/file_selector_plugin.h>
#include <gtk/gtk_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h> #include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) { void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) file_selector_linux_registrar = g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
file_selector_plugin_register_with_registrar(file_selector_linux_registrar); file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
g_autoptr(FlPluginRegistrar) gtk_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "GtkPlugin");
gtk_plugin_register_with_registrar(gtk_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar = g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin"); fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar); url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);

View File

@@ -4,6 +4,7 @@
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
file_selector_linux file_selector_linux
gtk
url_launcher_linux url_launcher_linux
) )

View File

@@ -5,6 +5,7 @@
import FlutterMacOS import FlutterMacOS
import Foundation import Foundation
import app_links
import connectivity_plus import connectivity_plus
import file_selector_macos import file_selector_macos
import firebase_core import firebase_core
@@ -15,10 +16,11 @@ import geolocator_apple
import package_info_plus import package_info_plus
import path_provider_foundation import path_provider_foundation
import shared_preferences_foundation import shared_preferences_foundation
import sqflite import sqflite_darwin
import url_launcher_macos import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
AppLinksMacosPlugin.register(with: registry.registrar(forPlugin: "AppLinksMacosPlugin"))
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin")) ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin")) FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@ name: grocery_app
description: "CustomerApp" description: "CustomerApp"
publish_to: 'none' publish_to: 'none'
version: 1.0.0+1 version: 1.0.3+25
environment: environment:
sdk: '>=3.4.0 <4.0.0' sdk: '>=3.4.0 <4.0.0'
@@ -24,20 +24,25 @@ dependencies:
flutter_toggle_tab: ^1.4.1 flutter_toggle_tab: ^1.4.1
dotted_border: ^2.1.0 dotted_border: ^2.1.0
go_router: ^14.2.0 go_router: ^14.2.0
uuid: ^4.0.0
phonepe_payment_sdk: ^3.0.0
google_maps_flutter: google_maps_flutter:
geolocator: geolocator:
geocoding: geocoding:
flutter_google_places: app_links: ^3.0.0
google_api_headers: google_places_flutter: ^2.1.0
google_api_headers: ^4.4.1
fluttertoast: fluttertoast:
flutter_rating_stars: ^1.1.0 flutter_rating_stars: ^1.1.0
url_launcher: ^6.3.1 url_launcher: ^6.3.1
skeletonizer: ^1.4.3 skeletonizer: ^1.4.3
art_sweetalert: ^0.0.5 art_sweetalert: ^0.0.5
blur: blur:
flutter_rating_bar: flutter_rating_bar:
change_app_package_name: ^1.5.0 change_app_package_name: ^1.5.0
permission_handler: ^11.3.1 permission_handler: ^11.3.1
flutter_local_notifications: ^18.0.1 flutter_local_notifications: ^18.0.1
firebase_core: firebase_core:
firebase_messaging: firebase_messaging:
@@ -75,6 +80,10 @@ dependencies:
image_picker: any image_picker: any
shimmer: ^3.0.0 shimmer: ^3.0.0
flutter_inappwebview: ^6.0.0 flutter_inappwebview: ^6.0.0
razorpay_flutter: ^1.3.7
http: ^1.1.0
dev_dependencies: dev_dependencies:

View File

@@ -1,30 +0,0 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility in the flutter_test package. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:grocery_app/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const MyApplication());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}

View File

@@ -6,20 +6,26 @@
#include "generated_plugin_registrant.h" #include "generated_plugin_registrant.h"
#include <app_links/app_links_plugin_c_api.h>
#include <connectivity_plus/connectivity_plus_windows_plugin.h> #include <connectivity_plus/connectivity_plus_windows_plugin.h>
#include <file_selector_windows/file_selector_windows.h> #include <file_selector_windows/file_selector_windows.h>
#include <firebase_core/firebase_core_plugin_c_api.h> #include <firebase_core/firebase_core_plugin_c_api.h>
#include <flutter_inappwebview_windows/flutter_inappwebview_windows_plugin_c_api.h>
#include <geolocator_windows/geolocator_windows.h> #include <geolocator_windows/geolocator_windows.h>
#include <permission_handler_windows/permission_handler_windows_plugin.h> #include <permission_handler_windows/permission_handler_windows_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h> #include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) { void RegisterPlugins(flutter::PluginRegistry* registry) {
AppLinksPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("AppLinksPluginCApi"));
ConnectivityPlusWindowsPluginRegisterWithRegistrar( ConnectivityPlusWindowsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
FileSelectorWindowsRegisterWithRegistrar( FileSelectorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FileSelectorWindows")); registry->GetRegistrarForPlugin("FileSelectorWindows"));
FirebaseCorePluginCApiRegisterWithRegistrar( FirebaseCorePluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
FlutterInappwebviewWindowsPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("FlutterInappwebviewWindowsPluginCApi"));
GeolocatorWindowsRegisterWithRegistrar( GeolocatorWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("GeolocatorWindows")); registry->GetRegistrarForPlugin("GeolocatorWindows"));
PermissionHandlerWindowsPluginRegisterWithRegistrar( PermissionHandlerWindowsPluginRegisterWithRegistrar(

View File

@@ -3,9 +3,11 @@
# #
list(APPEND FLUTTER_PLUGIN_LIST list(APPEND FLUTTER_PLUGIN_LIST
app_links
connectivity_plus connectivity_plus
file_selector_windows file_selector_windows
firebase_core firebase_core
flutter_inappwebview_windows
geolocator_windows geolocator_windows
permission_handler_windows permission_handler_windows
url_launcher_windows url_launcher_windows