├── LabelStoreMax ├── public │ └── assets │ │ ├── fonts │ │ └── .gitkeep │ │ ├── images │ │ ├── camion.gif │ │ ├── facebook.png │ │ ├── instagram.png │ │ ├── razorpay.png │ │ ├── twitter.png │ │ ├── youtube.png │ │ ├── paypal_logo.png │ │ ├── credit_cards.png │ │ ├── shipping_icon.png │ │ ├── cash_on_delivery.jpeg │ │ └── dark_powered_by_stripe.png │ │ └── app_icon │ │ └── appicon.png ├── ios │ ├── Runner │ │ ├── Runner-Bridging-Header.h │ │ ├── Assets.xcassets │ │ │ ├── LaunchImage.imageset │ │ │ │ ├── LaunchImage.png │ │ │ │ ├── LaunchImage@2x.png │ │ │ │ ├── LaunchImage@3x.png │ │ │ │ ├── README.md │ │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ │ ├── Icon-App-20x20@1x.png │ │ │ │ ├── Icon-App-20x20@2x.png │ │ │ │ ├── Icon-App-20x20@3x.png │ │ │ │ ├── Icon-App-29x29@1x.png │ │ │ │ ├── Icon-App-29x29@2x.png │ │ │ │ ├── Icon-App-29x29@3x.png │ │ │ │ ├── Icon-App-40x40@1x.png │ │ │ │ ├── Icon-App-40x40@2x.png │ │ │ │ ├── Icon-App-40x40@3x.png │ │ │ │ ├── Icon-App-50x50@1x.png │ │ │ │ ├── Icon-App-50x50@2x.png │ │ │ │ ├── Icon-App-57x57@1x.png │ │ │ │ ├── Icon-App-57x57@2x.png │ │ │ │ ├── Icon-App-60x60@2x.png │ │ │ │ ├── Icon-App-60x60@3x.png │ │ │ │ ├── Icon-App-72x72@1x.png │ │ │ │ ├── Icon-App-72x72@2x.png │ │ │ │ ├── Icon-App-76x76@1x.png │ │ │ │ ├── Icon-App-76x76@2x.png │ │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ │ └── Contents.json │ │ ├── AppDelegate.swift │ │ ├── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ │ └── Info.plist │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── AppFrameworkInfo.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── RunnerTests │ │ └── RunnerTests.swift │ └── .gitignore ├── android │ ├── gradle.properties │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── launcher_icon.png │ │ │ │ │ ├── drawable │ │ │ │ │ │ └── launch_background.xml │ │ │ │ │ └── values │ │ │ │ │ │ └── styles.xml │ │ │ │ ├── kotlin │ │ │ │ │ └── com │ │ │ │ │ │ └── woosignal │ │ │ │ │ │ └── android │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── settings.gradle │ └── build.gradle ├── lib │ ├── bootstrap │ │ ├── boot.dart │ │ ├── enums │ │ │ ├── wishlist_action_enums.dart │ │ │ ├── symbol_position_enums.dart │ │ │ └── sort_enums.dart │ │ ├── app_helper.dart │ │ ├── shared_pref │ │ │ ├── shared_key.dart │ │ │ └── sp_auth.dart │ │ └── extensions.dart │ ├── app │ │ ├── events │ │ │ ├── logout_event.dart │ │ │ └── login_event.dart │ │ ├── providers │ │ │ ├── event_provider.dart │ │ │ ├── route_provider.dart │ │ │ ├── firebase_provider.dart │ │ │ └── payments │ │ │ │ ├── cash_on_delivery.dart │ │ │ │ ├── example_pay.dart │ │ │ │ ├── paypal_pay.dart │ │ │ │ └── razorpay_pay.dart │ │ ├── controllers │ │ │ ├── controller.dart │ │ │ ├── browse_search_controller.dart │ │ │ ├── leave_review_controller.dart │ │ │ ├── browse_category_controller.dart │ │ │ ├── checkout_status_controller.dart │ │ │ ├── product_reviews_controller.dart │ │ │ ├── account_order_detail_controller.dart │ │ │ ├── product_image_viewer_controller.dart │ │ │ ├── customer_orders_loader_controller.dart │ │ │ ├── product_loader_controller.dart │ │ │ ├── product_search_loader_controller.dart │ │ │ ├── product_reviews_loader_controller.dart │ │ │ ├── product_category_search_loader_controller.dart │ │ │ └── woosignal_api_loader_controller.dart │ │ ├── models │ │ │ ├── payment_type.dart │ │ │ ├── bottom_nav_item.dart │ │ │ ├── user.dart │ │ │ ├── default_shipping.dart │ │ │ ├── customer_country.dart │ │ │ ├── billing_details.dart │ │ │ └── shipping_type.dart │ │ └── networking │ │ │ ├── dio │ │ │ └── interceptors │ │ │ │ ├── bearer_auth_interceptor.dart │ │ │ │ └── logging_interceptor.dart │ │ │ └── api_service.dart │ ├── main.dart │ ├── config │ │ ├── events.dart │ │ ├── storage_keys.dart │ │ ├── font.dart │ │ ├── providers.dart │ │ ├── currency.dart │ │ ├── toast_notification.dart │ │ ├── theme.dart │ │ ├── design.dart │ │ ├── validation_rules.dart │ │ ├── payment_gateways.dart │ │ ├── localization.dart │ │ └── decoders.dart │ ├── resources │ │ ├── widgets │ │ │ ├── safearea_widget.dart │ │ │ ├── app_loader_widget.dart │ │ │ ├── category_subcategory_scroll_widget.dart │ │ │ ├── no_results_for_products_widget.dart │ │ │ ├── checkout_store_heading_widget.dart │ │ │ ├── product_quantity_widget.dart │ │ │ ├── app_version_widget.dart │ │ │ ├── text_row_widget.dart │ │ │ ├── cached_image_widget.dart │ │ │ ├── checkout_coupon_amount_widget.dart │ │ │ ├── cart_icon_widget.dart │ │ │ ├── product_detail_image_swiper_widget.dart │ │ │ ├── switch_address_tab.dart │ │ │ ├── checkout_payment_type_widget.dart │ │ │ ├── cart_quantity_widget.dart │ │ │ ├── checkout_user_details_widget.dart │ │ │ ├── account_detail_settings_widget.dart │ │ │ ├── top_nav_widget.dart │ │ │ ├── product_review_item_container_widget.dart │ │ │ ├── checkout_shipping_type_widget.dart │ │ │ ├── product_detail_header_widget.dart │ │ │ ├── product_detail_body_widget.dart │ │ │ ├── checkout_select_coupon_widget.dart │ │ │ ├── product_detail_related_products_widget.dart │ │ │ ├── product_detail_review_tile_widget.dart │ │ │ ├── product_detail_description_widget.dart │ │ │ └── product_detail_upsell_widget.dart │ │ ├── themes │ │ │ ├── styles │ │ │ │ ├── color_styles.dart │ │ │ │ ├── light_theme_colors.dart │ │ │ │ └── dark_theme_colors.dart │ │ │ ├── text_theme │ │ │ │ └── default_text_theme.dart │ │ │ ├── light_theme.dart │ │ │ └── dark_theme.dart │ │ └── pages │ │ │ ├── home_page.dart │ │ │ ├── product_image_viewer_page.dart │ │ │ ├── home_search_page.dart │ │ │ ├── no_connection_page.dart │ │ │ └── account_delete_page.dart │ └── firebase_options.dart ├── .metadata ├── test │ └── widget_test.dart ├── analysis_options.yaml ├── LICENSE ├── .env ├── .gitignore ├── README.md └── pubspec.yaml ├── package.json ├── LICENSE └── README.md /LabelStoreMax/public/assets/fonts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /LabelStoreMax/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /LabelStoreMax/public/assets/images/camion.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/public/assets/images/camion.gif -------------------------------------------------------------------------------- /LabelStoreMax/public/assets/app_icon/appicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/public/assets/app_icon/appicon.png -------------------------------------------------------------------------------- /LabelStoreMax/public/assets/images/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/public/assets/images/facebook.png -------------------------------------------------------------------------------- /LabelStoreMax/public/assets/images/instagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/public/assets/images/instagram.png -------------------------------------------------------------------------------- /LabelStoreMax/public/assets/images/razorpay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/public/assets/images/razorpay.png -------------------------------------------------------------------------------- /LabelStoreMax/public/assets/images/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/public/assets/images/twitter.png -------------------------------------------------------------------------------- /LabelStoreMax/public/assets/images/youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/public/assets/images/youtube.png -------------------------------------------------------------------------------- /LabelStoreMax/public/assets/images/paypal_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/public/assets/images/paypal_logo.png -------------------------------------------------------------------------------- /LabelStoreMax/public/assets/images/credit_cards.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/public/assets/images/credit_cards.png -------------------------------------------------------------------------------- /LabelStoreMax/public/assets/images/shipping_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/public/assets/images/shipping_icon.png -------------------------------------------------------------------------------- /LabelStoreMax/public/assets/images/cash_on_delivery.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/public/assets/images/cash_on_delivery.jpeg -------------------------------------------------------------------------------- /LabelStoreMax/public/assets/images/dark_powered_by_stripe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/public/assets/images/dark_powered_by_stripe.png -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/res/mipmap-hdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/android/app/src/main/res/mipmap-hdpi/launcher_icon.png -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/res/mipmap-mdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/android/app/src/main/res/mipmap-mdpi/launcher_icon.png -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HiWebDev0026/Woocommerce-Flutter-App/HEAD/LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/kotlin/com/woosignal/android/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.woosignal.android 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | import io.flutter.embedding.android.FlutterFragmentActivity 5 | 6 | class MainActivity: FlutterFragmentActivity() { 7 | } 8 | -------------------------------------------------------------------------------- /LabelStoreMax/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 7 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /LabelStoreMax/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/bootstrap/boot.dart: -------------------------------------------------------------------------------- 1 | /// boot application 2 | import 'package:flutter_app/config/providers.dart'; 3 | import 'package:nylo_framework/nylo_framework.dart'; 4 | 5 | class Boot { 6 | static Future nylo() async => await bootApplication(providers); 7 | static Future finished(Nylo nylo) async => await bootFinished(nylo, providers); 8 | } 9 | -------------------------------------------------------------------------------- /LabelStoreMax/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 2d2a1ffec95cc70a3218872a2cd3f8de4933c42f 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/events/logout_event.dart: -------------------------------------------------------------------------------- 1 | import 'package:nylo_framework/nylo_framework.dart'; 2 | 3 | class LogoutEvent implements NyEvent { 4 | @override 5 | final listeners = {DefaultListener: DefaultListener()}; 6 | } 7 | 8 | class DefaultListener extends NyListener { 9 | @override 10 | handle(dynamic event) async { 11 | // handle the payload from event 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/events/login_event.dart: -------------------------------------------------------------------------------- 1 | import 'package:nylo_framework/nylo_framework.dart'; 2 | 3 | class LoginEvent implements NyEvent { 4 | @override 5 | final listeners = { 6 | DefaultListener: DefaultListener(), 7 | }; 8 | } 9 | 10 | class DefaultListener extends NyListener { 11 | @override 12 | handle(dynamic event) async { 13 | // handle the payload from event 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /LabelStoreMax/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | void main() {} 9 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/providers/event_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_app/config/events.dart'; 2 | import 'package:nylo_framework/nylo_framework.dart'; 3 | 4 | class EventProvider implements NyProvider { 5 | @override 6 | boot(Nylo nylo) async { 7 | nylo.addEvents(events); 8 | nylo.addEventBus(); 9 | 10 | return nylo; 11 | } 12 | 13 | @override 14 | afterBoot(Nylo nylo) async { 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/bootstrap/enums/wishlist_action_enums.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | enum WishlistAction { add, remove } 12 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/bootstrap/enums/symbol_position_enums.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | enum SymbolPositionType { left, right } 12 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/bootstrap/enums/sort_enums.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | enum SortByType { 12 | lowToHigh, 13 | highToLow, 14 | nameAZ, 15 | nameZA, 16 | } 17 | -------------------------------------------------------------------------------- /LabelStoreMax/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "server", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "start": "node index.js" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "bcryptjs": "^2.4.3", 15 | "cors": "^2.8.5", 16 | "express": "^4.17.1", 17 | "fs": "0.0.1-security", 18 | "jsonwebtoken": "^8.5.1", 19 | "mysql": "^2.18.1", 20 | "path": "^0.12.7" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/providers/route_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_app/bootstrap/app_helper.dart'; 2 | import 'package:flutter_app/routes/router.dart'; 3 | import 'package:nylo_framework/nylo_framework.dart'; 4 | 5 | class RouteProvider implements NyProvider { 6 | @override 7 | boot(Nylo nylo) async { 8 | nylo.addRouter(appRouter()); 9 | 10 | return nylo; 11 | } 12 | 13 | @override 14 | afterBoot(Nylo nylo) async { 15 | String initialRoute = AppHelper.instance.appConfig!.appStatus != null 16 | ? '/home' 17 | : '/no-connection'; 18 | nylo.setInitialRoute(initialRoute); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:nylo_framework/nylo_framework.dart'; 12 | 13 | /// Base Controller for the Nylo 14 | /// See more on controllers here - https://nylo.dev/docs/2.x/controllers 15 | class Controller extends NyController { 16 | Controller(); 17 | } 18 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/browse_search_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'controller.dart'; 12 | import 'package:flutter/widgets.dart'; 13 | 14 | class BrowseSearchController extends Controller { 15 | @override 16 | construct(BuildContext context) { 17 | super.construct(context); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/leave_review_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'controller.dart'; 12 | import 'package:flutter/widgets.dart'; 13 | 14 | class LeaveReviewController extends Controller { 15 | @override 16 | construct(BuildContext context) { 17 | super.construct(context); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/bootstrap/app_helper.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:woosignal/models/response/woosignal_app.dart'; 12 | 13 | class AppHelper { 14 | AppHelper._privateConstructor(); 15 | 16 | static final AppHelper instance = AppHelper._privateConstructor(); 17 | 18 | WooSignalApp? appConfig; 19 | } 20 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/browse_category_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'controller.dart'; 12 | import 'package:flutter/widgets.dart'; 13 | 14 | class BrowseCategoryController extends Controller { 15 | @override 16 | construct(BuildContext context) { 17 | super.construct(context); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/checkout_status_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'controller.dart'; 12 | import 'package:flutter/widgets.dart'; 13 | 14 | class CheckoutStatusController extends Controller { 15 | @override 16 | construct(BuildContext context) { 17 | super.construct(context); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/product_reviews_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'controller.dart'; 12 | import 'package:flutter/widgets.dart'; 13 | 14 | class ProductReviewsController extends Controller { 15 | @override 16 | construct(BuildContext context) { 17 | super.construct(context); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_app/bootstrap/app.dart'; 3 | import 'package:flutter_app/bootstrap/boot.dart'; 4 | import 'package:nylo_framework/nylo_framework.dart'; 5 | 6 | void main() async { 7 | WidgetsFlutterBinding.ensureInitialized(); 8 | Nylo nylo = await Nylo.init(setup: Boot.nylo, setupFinished: Boot.finished); 9 | 10 | runApp( 11 | AppBuild( 12 | navigatorKey: NyNavigator.instance.router.navigatorKey, 13 | onGenerateRoute: nylo.router!.generator(), 14 | initialRoute: nylo.getInitialRoute(), 15 | debugShowCheckedModeBanner: false, 16 | ), 17 | ); 18 | } -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/account_order_detail_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'controller.dart'; 12 | import 'package:flutter/widgets.dart'; 13 | 14 | class AccountOrderDetailController extends Controller { 15 | @override 16 | construct(BuildContext context) { 17 | super.construct(context); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/product_image_viewer_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'controller.dart'; 12 | import 'package:flutter/widgets.dart'; 13 | 14 | class ProductImageViewerController extends Controller { 15 | @override 16 | construct(BuildContext context) { 17 | super.construct(context); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/config/events.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_app/app/events/login_event.dart'; 2 | import 'package:flutter_app/app/events/logout_event.dart'; 3 | import 'package:nylo_framework/nylo_framework.dart'; 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Events 8 | | Add your "app/events" here. 9 | | Events can be fired using: event(); 10 | | 11 | | Learn more: https://nylo.dev/docs/5.x/events 12 | |-------------------------------------------------------------------------- 13 | */ 14 | 15 | final Map events = { 16 | LoginEvent: LoginEvent(), 17 | LogoutEvent: LogoutEvent(), 18 | AuthUserEvent: AuthUserEvent(), 19 | }; 20 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/models/payment_type.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | class PaymentType { 12 | int id; 13 | String name; 14 | String desc; 15 | String assetImage; 16 | Function pay; 17 | 18 | PaymentType( 19 | {required this.id, 20 | required this.name, 21 | required this.desc, 22 | required this.assetImage, 23 | required this.pay}); 24 | } 25 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/models/bottom_nav_item.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | 13 | class BottomNavItem { 14 | int id; 15 | BottomNavigationBarItem bottomNavigationBarItem; 16 | Widget tabWidget; 17 | 18 | BottomNavItem( 19 | {required this.id, 20 | required this.bottomNavigationBarItem, 21 | required this.tabWidget}); 22 | } 23 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /LabelStoreMax/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/config/storage_keys.dart: -------------------------------------------------------------------------------- 1 | /* 2 | |-------------------------------------------------------------------------- 3 | | Storage Keys 4 | | Add your storage keys here and then use them later to retrieve data. 5 | | E.g. static String userCoins = "USER_COINS"; 6 | | String coins = NyStorage.read( StorageKey.userCoins ); 7 | | 8 | | Learn more: https://nylo.dev/docs/5.x/storage#storage-keys 9 | |-------------------------------------------------------------------------- 10 | */ 11 | 12 | import 'package:nylo_framework/nylo_framework.dart'; 13 | 14 | class StorageKey { 15 | static String userToken = "USER_TOKEN"; 16 | static String authUser = getEnv('AUTH_USER_KEY', defaultValue: 'AUTH_USER'); 17 | 18 | /// Add your storage keys here... 19 | } 20 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/bootstrap/shared_pref/shared_key.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | class SharedKey { 12 | static const String authUser = "DEFAULT_SP_USER"; 13 | static const String cart = "CART_SESSION"; 14 | static const String customerBillingDetails = "CS_BILLING_DETAILS"; 15 | static const String customerShippingDetails = "CS_SHIPPING_DETAILS"; 16 | static const String wishlistProducts = "CS_WISHLIST_PRODUCTS"; 17 | } 18 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/models/user.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:nylo_framework/nylo_framework.dart'; 12 | 13 | class User extends Model { 14 | String? userId; 15 | String? token; 16 | 17 | User(); 18 | User.fromUserAuthResponse({this.userId, this.token}); 19 | 20 | toJson() => {"token": token, "user_id": userId}; 21 | 22 | User.fromJson(dynamic data) { 23 | token = data['token']; 24 | userId = data['user_id']; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/networking/dio/interceptors/bearer_auth_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:nylo_framework/nylo_framework.dart'; 2 | 3 | class BearerAuthInterceptor extends Interceptor { 4 | @override 5 | void onRequest(RequestOptions options, RequestInterceptorHandler handler) { 6 | String? userToken = Backpack.instance.read('user_token'); 7 | if (userToken != null) { 8 | options.headers.addAll({"Authorization": "Bearer $userToken"}); 9 | } 10 | return super.onRequest(options, handler); 11 | } 12 | 13 | @override 14 | void onResponse(Response response, ResponseInterceptorHandler handler) { 15 | handler.next(response); 16 | } 17 | 18 | @override 19 | void onError(DioException err, ErrorInterceptorHandler handler) { 20 | handler.next(err); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/config/font.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | 4 | /* 5 | |-------------------------------------------------------------------------- 6 | | Font 7 | | 8 | | Uses Google Fonts - https://pub.dev/packages/google_fonts 9 | | 10 | | e.g. updating the font from "montserrat" to "lato" 11 | | before: final TextStyle appThemeFont = GoogleFonts.montserrat(); 12 | | after: final TextStyle appThemeFont = GoogleFonts.lato(); 13 | |-------------------------------------------------------------------------- 14 | */ 15 | 16 | TextStyle appFont = GoogleFonts.poppins(); 17 | 18 | // e.g. custom font in pubspec.yaml - https://flutter.dev/docs/cookbook/design/fonts 19 | // final TextStyle appThemeFont = TextStyle(fontFamily: "ZenTokyoZoo"); 20 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/safearea_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | 13 | class SafeAreaWidget extends StatelessWidget { 14 | final Widget? child; 15 | const SafeAreaWidget({Key? key, this.child}) : super(key: key); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return SafeArea( 20 | minimum: EdgeInsets.only(left: 16, right: 16, bottom: 8), 21 | child: child!, 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/app_loader_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_spinkit/flutter_spinkit.dart'; 13 | 14 | class AppLoaderWidget extends StatelessWidget { 15 | const AppLoaderWidget({Key? key}) : super(key: key); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | bool isDark = (Theme.of(context).brightness == Brightness.dark); 20 | return SpinKitDoubleBounce( 21 | color: Color(!isDark ? 0xFF424242 : 0xFFC7C7C7), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/category_subcategory_scroll_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | 13 | class CategorySubcategoryScrollWidget extends StatefulWidget { 14 | @override 15 | _CategorySubcategoryScrollWidgetState createState() => 16 | _CategorySubcategoryScrollWidgetState(); 17 | } 18 | 19 | class _CategorySubcategoryScrollWidgetState 20 | extends State { 21 | @override 22 | Widget build(BuildContext context) { 23 | return Container(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/config/providers.dart: -------------------------------------------------------------------------------- 1 | import '/app/providers/firebase_provider.dart'; 2 | import 'package:flutter_app/app/providers/app_provider.dart'; 3 | import 'package:flutter_app/app/providers/event_provider.dart'; 4 | import 'package:flutter_app/app/providers/route_provider.dart'; 5 | import 'package:nylo_framework/nylo_framework.dart'; 6 | 7 | /* 8 | |-------------------------------------------------------------------------- 9 | | Providers 10 | | Add your "app/providers" here. 11 | | Providers are booted when your application start. 12 | | 13 | | Learn more: https://nylo.dev/docs/5.x/providers 14 | |-------------------------------------------------------------------------- 15 | */ 16 | 17 | final Map providers = { 18 | AppProvider: AppProvider(), 19 | RouteProvider: RouteProvider(), 20 | EventProvider: EventProvider(), 21 | FirebaseProvider: FirebaseProvider(), 22 | 23 | }; 24 | 25 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/config/currency.dart: -------------------------------------------------------------------------------- 1 | /* 2 | |-------------------------------------------------------------------------- 3 | | CURRENCY 4 | | 5 | | Configure which currency you want to use. 6 | | Docs here: https://woosignal.com/docs/app/label-storemax 7 | |-------------------------------------------------------------------------- 8 | */ 9 | 10 | import 'package:flutter_app/bootstrap/enums/symbol_position_enums.dart'; 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | APP CURRENCY 15 | | 16 | | Configure the currency settings. To change the currency used (e.g. "USD"), 17 | | update the "currency" value in the WooSignal dashboard. 18 | |-------------------------------------------------------------------------- 19 | */ 20 | 21 | const SymbolPositionType appCurrencySymbolPosition = SymbolPositionType.left; 22 | // currency_symbol_position example. 23 | // left: $15 24 | // right: 15€ 25 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/no_results_for_products_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:nylo_framework/nylo_framework.dart'; 13 | 14 | class NoResultsForProductsWidget extends StatelessWidget { 15 | const NoResultsForProductsWidget({Key? key}) : super(key: key); 16 | 17 | @override 18 | Widget build(BuildContext context) => Column( 19 | children: [ 20 | Text( 21 | trans("No results"), 22 | style: Theme.of(context).textTheme.bodyMedium, 23 | ), 24 | ], 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/config/toast_notification.dart: -------------------------------------------------------------------------------- 1 | import 'package:nylo_framework/nylo_framework.dart'; 2 | 3 | /// ToastNotificationStyleMetaHelper is used to return 4 | /// the correct value for the [ToastNotificationStyleType] toast style. 5 | class NyToastNotificationStyleMetaHelper extends ToastNotificationStyleMetaHelper { 6 | 7 | NyToastNotificationStyleMetaHelper(ToastNotificationStyleType? style) : super(style); 8 | 9 | onSuccess() { 10 | return ToastMeta.success(); 11 | } 12 | 13 | onWarning() { 14 | return ToastMeta.warning(); 15 | } 16 | 17 | onInfo() { 18 | return ToastMeta.info(); 19 | } 20 | 21 | onDanger() { 22 | return ToastMeta.danger(); 23 | } 24 | 25 | // Example customizing a notification 26 | // onSuccess() { 27 | // return ToastMeta.success( 28 | // title: "Hello", 29 | // description: "World", 30 | // action: () {}, 31 | // backgroundColor: Colors.Yellow 32 | // ); 33 | // } 34 | } -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/networking/dio/interceptors/logging_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'dart:developer'; 2 | import 'package:nylo_framework/nylo_framework.dart'; 3 | 4 | class LoggingInterceptor extends Interceptor { 5 | @override 6 | void onRequest(RequestOptions options, RequestInterceptorHandler handler) { 7 | print('REQUEST[${options.method}] => PATH: ${options.path}'); 8 | return super.onRequest(options, handler); 9 | } 10 | 11 | @override 12 | void onResponse(Response response, ResponseInterceptorHandler handler) { 13 | print( 14 | 'RESPONSE[${response.statusCode}] => PATH: ${response.requestOptions.path}'); 15 | print('DATA: ${response.requestOptions.path}'); 16 | log(response.data.toString()); 17 | handler.next(response); 18 | } 19 | 20 | @override 21 | void onError(DioException err, ErrorInterceptorHandler handler) { 22 | print( 23 | 'ERROR[${err.response?.statusCode}] => PATH: ${err.requestOptions.path}'); 24 | handler.next(err); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/networking/api_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_app/app/networking/dio/interceptors/logging_interceptor.dart'; 3 | import 'package:nylo_framework/nylo_framework.dart'; 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | ApiService 8 | | ------------------------------------------------------------------------- 9 | | Define your API endpoints 10 | | Learn more https://nylo.dev/docs/5.x/networking 11 | |-------------------------------------------------------------------------- 12 | */ 13 | 14 | class ApiService extends NyApiService { 15 | ApiService({BuildContext? buildContext}) : super(buildContext); 16 | 17 | @override 18 | String get baseUrl => getEnv('API_BASE_URL'); 19 | 20 | @override 21 | final interceptors = {LoggingInterceptor: LoggingInterceptor()}; 22 | 23 | Future fetchTestData() async { 24 | return await network( 25 | request: (request) => request.get("/endpoint-path"), 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/checkout_store_heading_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/resources/widgets/woosignal_ui.dart'; 13 | 14 | class CheckoutStoreHeadingWidget extends StatelessWidget { 15 | const CheckoutStoreHeadingWidget({Key? key}) : super(key: key); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Container( 20 | decoration: BoxDecoration( 21 | color: Colors.transparent, 22 | ), 23 | padding: EdgeInsets.all(2), 24 | margin: EdgeInsets.only(top: 16), 25 | child: ClipRRect( 26 | child: StoreLogo(height: 65), 27 | borderRadius: BorderRadius.circular(8), 28 | ), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/models/default_shipping.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | class DefaultShipping { 11 | String code; 12 | String? country; 13 | List states; 14 | DefaultShipping( 15 | {required this.code, required this.country, required this.states}); 16 | } 17 | 18 | class DefaultShippingState { 19 | String? code; 20 | String? name; 21 | 22 | DefaultShippingState({required this.code, required this.name}); 23 | 24 | Map toJson() { 25 | final Map data = {}; 26 | data['code'] = code; 27 | data['name'] = name; 28 | return data; 29 | } 30 | 31 | DefaultShippingState.fromJson(Map json) { 32 | code = json['code']; 33 | name = json['name']; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/customer_orders_loader_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | import 'package:flutter_app/app/controllers/woosignal_api_loader_controller.dart'; 11 | import 'package:woosignal/models/response/order.dart'; 12 | 13 | class CustomerOrdersLoaderController 14 | extends WooSignalApiLoaderController { 15 | CustomerOrdersLoaderController(); 16 | 17 | Future loadOrders( 18 | {required bool Function(bool hasProducts) hasResults, 19 | required void Function() didFinish, 20 | required String userId}) async { 21 | await load( 22 | hasResults: hasResults, 23 | didFinish: didFinish, 24 | apiQuery: (api) => api.getOrders( 25 | customer: int.parse(userId), page: page, perPage: 50)); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/bootstrap/shared_pref/sp_auth.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/cupertino.dart'; 12 | import 'package:flutter_app/app/models/cart.dart'; 13 | import 'package:flutter_app/bootstrap/helpers.dart'; 14 | import 'package:flutter_app/bootstrap/shared_pref/shared_key.dart'; 15 | import 'package:nylo_framework/nylo_framework.dart'; 16 | 17 | Future authCheck() async => ((await getUser()) != null); 18 | 19 | Future readAuthToken() async => (await getUser())!.token; 20 | 21 | Future readUserId() async => (await getUser())!.userId; 22 | 23 | authLogout(BuildContext context) async { 24 | await NyStorage.delete(SharedKey.authUser); 25 | Cart.getInstance.clear(); 26 | navigatorPush(context, routeName: "/home", forgetAll: true); 27 | } 28 | -------------------------------------------------------------------------------- /LabelStoreMax/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the static analysis results for your project (errors, 2 | # warnings, and lints). 3 | # 4 | # This enables the 'recommended' set of lints from `package:lints`. 5 | # This set helps identify many issues that may lead to problems when running 6 | # or consuming Dart code, and enforces writing Dart using a single, idiomatic 7 | # style and format. 8 | # 9 | # If you want a smaller set of lints you can change this to specify 10 | # 'package:lints/core.yaml'. These are just the most critical lints 11 | # (the recommended set includes the core lints). 12 | # The core lints are also what is used by pub.dev for scoring packages. 13 | 14 | include: package:lints/recommended.yaml 15 | 16 | # Uncomment the following section to specify additional rules. 17 | 18 | # linter: 19 | # rules: 20 | # - camel_case_types 21 | 22 | # analyzer: 23 | # exclude: 24 | # - path/to/excluded/files/** 25 | 26 | # For more information about the core and recommended set of lints, see 27 | # https://dart.dev/go/core-lints 28 | 29 | # For additional information about configuring this file, see 30 | # https://dart.dev/guides/language/analysis-options 31 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/config/theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:nylo_framework/nylo_framework.dart'; 2 | 3 | import '/resources/themes/dark_theme.dart'; 4 | import '/resources/themes/light_theme.dart'; 5 | import '/resources/themes/styles/color_styles.dart'; 6 | import '/resources/themes/styles/dark_theme_colors.dart'; 7 | import '/resources/themes/styles/light_theme_colors.dart'; 8 | 9 | /* 10 | |-------------------------------------------------------------------------- 11 | | Flutter Themes 12 | | Run the below in the terminal to add a new theme. 13 | | "dart run nylo_framework:main make:theme bright_theme" 14 | | 15 | | Learn more: https://nylo.dev/docs/5.x/themes-and-styling 16 | |-------------------------------------------------------------------------- 17 | */ 18 | 19 | // App Themes 20 | final List> appThemes = [ 21 | BaseThemeConfig( 22 | id: getEnv('LIGHT_THEME_ID'), 23 | description: "Light theme", 24 | theme: lightTheme, 25 | colors: LightThemeColors(), 26 | ), 27 | BaseThemeConfig( 28 | id: getEnv('DARK_THEME_ID'), 29 | description: "Dark theme", 30 | theme: darkTheme, 31 | colors: DarkThemeColors(), 32 | ), 33 | ]; -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/product_quantity_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:nylo_framework/nylo_framework.dart'; 3 | 4 | class ProductQuantity extends StatefulWidget { 5 | 6 | ProductQuantity({Key? key, required this.productId}) : super(key: key); 7 | 8 | final int productId; 9 | 10 | static String state = "product_quantity"; 11 | 12 | @override 13 | _ProductQuantityState createState() => _ProductQuantityState(productId); 14 | } 15 | 16 | class _ProductQuantityState extends NyState { 17 | 18 | int quantity = 1; 19 | late int productId; 20 | 21 | _ProductQuantityState(this.productId) { 22 | stateName = ProductQuantity.state; 23 | } 24 | 25 | @override 26 | init() async { 27 | super.init(); 28 | } 29 | 30 | @override 31 | stateUpdated(dynamic data) async { 32 | if (productId != data['product_id']) return; 33 | setState(() { 34 | quantity = data['quantity']; 35 | }); 36 | } 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | return Text( 41 | quantity.toString(), 42 | style: Theme.of(context).textTheme.bodyLarge, 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/product_loader_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter_app/app/controllers/woosignal_api_loader_controller.dart'; 12 | import 'package:woosignal/models/response/product.dart'; 13 | 14 | class ProductLoaderController extends WooSignalApiLoaderController { 15 | ProductLoaderController(); 16 | 17 | Future loadProducts( 18 | {required bool Function(bool hasProducts) hasResults, 19 | required void Function() didFinish, 20 | List? productIds = const []}) async { 21 | await load( 22 | hasResults: hasResults, 23 | didFinish: didFinish, 24 | apiQuery: (api) => api.getProducts( 25 | perPage: 50, 26 | page: page, 27 | include: productIds, 28 | status: "publish", 29 | stockStatus: "instock", 30 | )); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/product_search_loader_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter_app/app/controllers/woosignal_api_loader_controller.dart'; 12 | import 'package:woosignal/models/response/product.dart'; 13 | 14 | class ProductSearchLoaderController 15 | extends WooSignalApiLoaderController { 16 | ProductSearchLoaderController(); 17 | 18 | Future loadProducts( 19 | {required bool Function(bool hasProducts) hasResults, 20 | required void Function() didFinish, 21 | required String? search}) async { 22 | await load( 23 | hasResults: hasResults, 24 | didFinish: didFinish, 25 | apiQuery: (api) => api.getProducts( 26 | perPage: 100, 27 | search: search, 28 | page: page, 29 | status: "publish", 30 | stockStatus: "instock", 31 | )); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/app_version_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:nylo_framework/nylo_framework.dart'; 13 | import 'package:package_info_plus/package_info_plus.dart'; 14 | 15 | class AppVersionWidget extends StatelessWidget { 16 | const AppVersionWidget({Key? key}) : super(key: key); 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return NyFutureBuilder( 21 | future: PackageInfo.fromPlatform(), 22 | child: (BuildContext context, data) => Padding( 23 | child: Text("${trans("Version")}: ${data?.version}", 24 | style: Theme.of(context) 25 | .textTheme 26 | .bodyMedium! 27 | .copyWith(fontWeight: FontWeight.w300)), 28 | padding: EdgeInsets.only(top: 15, bottom: 15), 29 | ), 30 | loading: SizedBox.shrink(), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/product_reviews_loader_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter_app/app/controllers/woosignal_api_loader_controller.dart'; 12 | import 'package:woosignal/models/response/product_review.dart'; 13 | import 'package:woosignal/models/response/product.dart'; 14 | 15 | class ProductReviewsLoaderController 16 | extends WooSignalApiLoaderController { 17 | ProductReviewsLoaderController(); 18 | 19 | Future loadProductReviews({ 20 | required Product? product, 21 | required bool Function(bool hasProducts) hasResults, 22 | required void Function() didFinish, 23 | }) async { 24 | await load( 25 | hasResults: hasResults, 26 | didFinish: didFinish, 27 | apiQuery: (api) => api.getProductReviews( 28 | product: [product!.id!], 29 | perPage: 50, 30 | page: page, 31 | status: "approved", 32 | )); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/product_category_search_loader_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter_app/app/controllers/woosignal_api_loader_controller.dart'; 12 | import 'package:woosignal/models/response/product_category.dart'; 13 | import 'package:woosignal/models/response/product.dart'; 14 | 15 | class ProductCategorySearchLoaderController 16 | extends WooSignalApiLoaderController { 17 | ProductCategorySearchLoaderController(); 18 | 19 | Future loadProducts( 20 | {required bool Function(bool hasProducts) hasResults, 21 | required void Function() didFinish, 22 | required ProductCategory? productCategory}) async { 23 | await load( 24 | hasResults: hasResults, 25 | didFinish: didFinish, 26 | apiQuery: (api) => api.getProducts( 27 | perPage: 50, 28 | category: productCategory!.id.toString(), 29 | page: page, 30 | status: "publish", 31 | stockStatus: "instock", 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/themes/styles/color_styles.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:nylo_framework/nylo_framework.dart'; 3 | 4 | /// Interface for your base styles. 5 | /// Add more styles here and then implement in 6 | /// light_theme_colors.dart and dark_theme_colors.dart. 7 | abstract class ColorStyles extends BaseColorStyles { 8 | // general 9 | @override 10 | Color get background; 11 | Color get backgroundContainer; 12 | @override 13 | Color get primaryContent; 14 | @override 15 | Color get primaryAccent; 16 | 17 | @override 18 | Color get surfaceBackground; 19 | @override 20 | Color get surfaceContent; 21 | 22 | // app bar 23 | @override 24 | Color get appBarBackground; 25 | @override 26 | Color get appBarPrimaryContent; 27 | 28 | // buttons 29 | @override 30 | Color get buttonBackground; 31 | @override 32 | Color get buttonPrimaryContent; 33 | 34 | // bottom tab bar 35 | @override 36 | Color get bottomTabBarBackground; 37 | 38 | // bottom tab bar - icons 39 | @override 40 | Color get bottomTabBarIconSelected; 41 | @override 42 | Color get bottomTabBarIconUnselected; 43 | 44 | // bottom tab bar - label 45 | @override 46 | Color get bottomTabBarLabelUnselected; 47 | @override 48 | Color get bottomTabBarLabelSelected; 49 | 50 | Color get inputPrimaryContent; 51 | } 52 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/config/design.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter_app/config/toast_notification.dart'; 3 | import 'package:flutter_app/resources/widgets/app_loader_widget.dart'; 4 | import 'package:flutter_app/resources/widgets/toast_notification_widget.dart'; 5 | import 'package:flutter_app/resources/widgets/woosignal_ui.dart'; 6 | import 'package:nylo_framework/nylo_framework.dart'; 7 | 8 | /* 9 | |-------------------------------------------------------------------------- 10 | | Design 11 | | Contains widgets used in the Nylo framework. 12 | | 13 | | Learn more: https://nylo.dev/docs/5.x/themes 14 | |-------------------------------------------------------------------------- 15 | */ 16 | 17 | Widget logo = StoreLogo(); 18 | // resources/widgets/woosignal_ui.dart 19 | 20 | Widget loader = AppLoaderWidget(); 21 | // resources/widgets/app_loader_widget.dart 22 | 23 | Widget getToastNotificationWidget({ 24 | required ToastNotificationStyleType style, 25 | Function(ToastNotificationStyleMetaHelper helper)? toastNotificationStyleMeta, Function? onDismiss}) { 26 | if (toastNotificationStyleMeta == null) return SizedBox.shrink(); 27 | 28 | ToastMeta toastMeta = toastNotificationStyleMeta(NyToastNotificationStyleMetaHelper(style)); 29 | 30 | return ToastNotification(toastMeta, onDismiss: onDismiss); 31 | // resources/widgets/toast_notification.dart 32 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2022, Woosignal 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/text_row_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | 13 | class TextRowWidget extends StatelessWidget { 14 | const TextRowWidget({Key? key, required this.title, required this.text}) 15 | : super(key: key); 16 | 17 | final String? title, text; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Row( 22 | crossAxisAlignment: CrossAxisAlignment.start, 23 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 24 | children: [ 25 | Flexible( 26 | child: Container( 27 | child: Text(title!, style: Theme.of(context).textTheme.titleLarge), 28 | ), 29 | flex: 3, 30 | ), 31 | Flexible( 32 | child: Container( 33 | child: Text( 34 | text!, 35 | style: 36 | Theme.of(context).textTheme.bodyLarge!.copyWith(fontSize: 16), 37 | ), 38 | ), 39 | flex: 3, 40 | ) 41 | ], 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /LabelStoreMax/LICENSE: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2023, WooSignal Ltd 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/themes/text_theme/default_text_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | Default text theme 6 | |-------------------------------------------------------------------------- 7 | */ 8 | 9 | const TextTheme defaultTextTheme = TextTheme( 10 | titleLarge: TextStyle( 11 | fontSize: 18.0, 12 | fontWeight: FontWeight.w600, 13 | ), 14 | headlineSmall: TextStyle( 15 | fontSize: 22.0, 16 | ), 17 | headlineMedium: TextStyle( 18 | fontSize: 24.0, 19 | fontWeight: FontWeight.w600, 20 | ), 21 | displaySmall: TextStyle( 22 | fontSize: 26.0, 23 | fontWeight: FontWeight.w700, 24 | ), 25 | displayMedium: TextStyle( 26 | fontSize: 28.0, 27 | fontWeight: FontWeight.w600, 28 | ), 29 | displayLarge: TextStyle( 30 | fontSize: 36.0, 31 | fontWeight: FontWeight.w300, 32 | ), 33 | titleSmall: TextStyle( 34 | fontSize: 14.0, 35 | fontWeight: FontWeight.w500, 36 | ), 37 | titleMedium: TextStyle( 38 | fontSize: 16.0, 39 | fontWeight: FontWeight.w500, 40 | ), 41 | labelSmall: TextStyle( 42 | fontSize: 10.0, 43 | fontWeight: FontWeight.w400, 44 | ), 45 | labelLarge: TextStyle(), 46 | bodyMedium: TextStyle( 47 | fontSize: 14.0, 48 | ), 49 | bodyLarge: TextStyle( 50 | fontSize: 16.0, 51 | ), 52 | bodySmall: TextStyle( 53 | fontSize: 16.0, 54 | ), 55 | ); 56 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/controllers/woosignal_api_loader_controller.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter_app/bootstrap/helpers.dart'; 12 | import 'package:woosignal/woosignal.dart'; 13 | 14 | class WooSignalApiLoaderController { 15 | List _results = []; 16 | int page = 1; 17 | bool _waitForNextRequest = false; 18 | 19 | WooSignalApiLoaderController(); 20 | 21 | Future load( 22 | {required bool Function(bool hasProducts) hasResults, 23 | required void Function() didFinish, 24 | required Future> Function(WooSignal query) apiQuery}) async { 25 | if (_waitForNextRequest) { 26 | return; 27 | } 28 | _waitForNextRequest = true; 29 | 30 | List apiResults = await (appWooSignal((api) => apiQuery(api))); 31 | 32 | if (!hasResults(apiResults.isNotEmpty)) { 33 | return; 34 | } 35 | 36 | _results.addAll(apiResults); 37 | 38 | page = page + 1; 39 | _waitForNextRequest = false; 40 | didFinish(); 41 | } 42 | 43 | List getResults() => _results; 44 | 45 | void clear() { 46 | _results = []; 47 | _waitForNextRequest = false; 48 | page = 1; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/cached_image_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:cached_network_image/cached_network_image.dart'; 12 | import 'package:flutter/material.dart'; 13 | 14 | class CachedImageWidget extends StatelessWidget { 15 | const CachedImageWidget({ 16 | Key? key, 17 | this.image, 18 | this.height = 70, 19 | this.width = 70, 20 | this.placeholder = const Center( 21 | child: CircularProgressIndicator( 22 | strokeWidth: 2, 23 | backgroundColor: Colors.black12, 24 | color: Colors.black54), 25 | ), 26 | this.fit = BoxFit.contain, 27 | }) : super(key: key); 28 | 29 | final String? image; 30 | final double height; 31 | final double width; 32 | final Widget placeholder; 33 | final BoxFit fit; 34 | 35 | @override 36 | Widget build(BuildContext context) => CachedNetworkImage( 37 | imageUrl: image!, 38 | placeholder: (context, url) => placeholder, 39 | errorWidget: (context, url, error) => Icon(Icons.error), 40 | height: height, 41 | width: width, 42 | alignment: Alignment.center, 43 | fit: fit, 44 | ); 45 | } 46 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/providers/firebase_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_core/firebase_core.dart'; 2 | import 'package:firebase_messaging/firebase_messaging.dart'; 3 | import 'package:flutter_app/bootstrap/app_helper.dart'; 4 | import 'package:flutter_app/firebase_options.dart'; 5 | import 'package:nylo_framework/nylo_framework.dart'; 6 | import 'package:woosignal/woosignal.dart'; 7 | 8 | class FirebaseProvider implements NyProvider { 9 | 10 | @override 11 | boot(Nylo nylo) async { 12 | 13 | return null; 14 | } 15 | 16 | @override 17 | afterBoot(Nylo nylo) async { 18 | bool? firebaseFcmIsEnabled = AppHelper.instance.appConfig?.firebaseFcmIsEnabled; 19 | if (firebaseFcmIsEnabled == null) { 20 | firebaseFcmIsEnabled = getEnv('FCM_ENABLED', defaultValue: false); 21 | } 22 | 23 | if (firebaseFcmIsEnabled != true) return; 24 | 25 | await Firebase.initializeApp( 26 | options: DefaultFirebaseOptions.currentPlatform, 27 | ); 28 | 29 | FirebaseMessaging messaging = FirebaseMessaging.instance; 30 | NotificationSettings settings = await messaging.requestPermission( 31 | alert: true, 32 | announcement: false, 33 | badge: true, 34 | carPlay: false, 35 | criticalAlert: false, 36 | provisional: false, 37 | sound: true, 38 | ); 39 | 40 | if (settings.authorizationStatus != AuthorizationStatus.authorized) { 41 | return; 42 | } 43 | 44 | String? token = await messaging.getToken(); 45 | if (token != null) { 46 | WooSignal.instance.setFcmToken(token); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/checkout_coupon_amount_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/app/models/cart.dart'; 13 | import 'package:flutter_app/app/models/checkout_session.dart'; 14 | import 'package:flutter_app/bootstrap/helpers.dart'; 15 | import 'package:flutter_app/resources/widgets/woosignal_ui.dart'; 16 | import 'package:nylo_framework/nylo_framework.dart'; 17 | 18 | class CheckoutCouponAmountWidget extends StatelessWidget { 19 | const CheckoutCouponAmountWidget({Key? key, required this.checkoutSession}) 20 | : super(key: key); 21 | 22 | final CheckoutSession checkoutSession; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | if (checkoutSession.coupon == null) { 27 | return SizedBox.shrink(); 28 | } 29 | return NyFutureBuilder( 30 | future: Cart.getInstance.couponDiscountAmount(), 31 | child: (BuildContext context, data) => Padding( 32 | child: CheckoutMetaLine( 33 | title: "${trans('Coupon')}: ${checkoutSession.coupon?.code}", 34 | amount: "-" + formatStringCurrency(total: data), 35 | ), 36 | padding: EdgeInsets.only(bottom: 0, top: 0), 37 | ), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/config/validation_rules.dart: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | |-------------------------------------------------------------------------- 4 | | Validation Rules 5 | | ------------------------------------------------------------------------- 6 | | Add custom validation rules for your project in this file. 7 | | Learn more https://nylo.dev/docs/5.x/validation#custom-validation-rules 8 | |-------------------------------------------------------------------------- 9 | */ 10 | 11 | final Map validationRules = { 12 | /// Example 13 | // "simple_password": (attribute) => SimplePassword(attribute) 14 | }; 15 | 16 | /// Example validation class 17 | // class SimplePassword extends ValidationRule { 18 | // SimplePassword(String attribute) 19 | // : super( 20 | // attribute: attribute, 21 | // signature: "simple_password", // Use this signature for the validator 22 | // description: "The $attribute field must be between 4 and 8 digits long and include at least one numeric digit", // Toast description when an error occurs 23 | // textFieldMessage: "Must be between 4 and 8 digits long with one numeric digit"); // TextField description when an error occurs 24 | // 25 | // @override 26 | // handle(Map info) { 27 | // super.handle(info); 28 | // 29 | // /// info['rule'] = Validation rule i.e "min". 30 | // /// info['data'] = Data the user has passed into the validation. 31 | // /// info['message'] = Overriding message to be displayed for validation (optional). 32 | // 33 | // RegExp regExp = RegExp(r'^(?=.*\d).{4,8}$'); 34 | // return regExp.hasMatch(info['data']); 35 | // } 36 | // } -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/pages/home_page.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/bootstrap/app_helper.dart'; 13 | import 'package:flutter_app/resources/widgets/compo_theme_widget.dart'; 14 | import 'package:flutter_app/resources/widgets/mello_theme_widget.dart'; 15 | import 'package:flutter_app/resources/widgets/notic_theme_widget.dart'; 16 | import 'package:woosignal/models/response/woosignal_app.dart'; 17 | 18 | class HomePage extends StatefulWidget { 19 | HomePage(); 20 | 21 | @override 22 | _HomePageState createState() => _HomePageState(); 23 | } 24 | 25 | class _HomePageState extends State { 26 | _HomePageState(); 27 | 28 | final GlobalKey _key = GlobalKey(); 29 | final WooSignalApp? _wooSignalApp = AppHelper.instance.appConfig; 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | Widget theme = 34 | MelloThemeWidget(globalKey: _key, wooSignalApp: _wooSignalApp); 35 | if (AppHelper.instance.appConfig!.theme == "notic") { 36 | theme = NoticThemeWidget(globalKey: _key, wooSignalApp: _wooSignalApp); 37 | } 38 | if (AppHelper.instance.appConfig!.theme == "compo") { 39 | theme = CompoThemeWidget(globalKey: _key, wooSignalApp: _wooSignalApp); 40 | } 41 | return theme; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/bootstrap/extensions.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_app/bootstrap/helpers.dart'; 3 | import 'package:flutter_app/resources/themes/styles/color_styles.dart'; 4 | import 'package:nylo_framework/nylo_framework.dart'; 5 | 6 | extension NyText on Text { 7 | /// Sets the color from your [ColorStyles] or [Color]. 8 | Text setColor( 9 | BuildContext context, Color Function(ColorStyles color) newColor, 10 | {String? themeId}) { 11 | return copyWith( 12 | style: TextStyle( 13 | color: newColor(ThemeColor.get(context, themeId: themeId)))); 14 | } 15 | } 16 | 17 | /// Check if the [Product] is new. 18 | extension DateTimeExtension on DateTime? { 19 | bool? isAfterOrEqualTo(DateTime dateTime) { 20 | final date = this; 21 | if (date != null) { 22 | final isAtSameMomentAs = dateTime.isAtSameMomentAs(date); 23 | return isAtSameMomentAs | date.isAfter(dateTime); 24 | } 25 | return null; 26 | } 27 | 28 | bool? isBeforeOrEqualTo(DateTime dateTime) { 29 | final date = this; 30 | if (date != null) { 31 | final isAtSameMomentAs = dateTime.isAtSameMomentAs(date); 32 | return isAtSameMomentAs | date.isBefore(dateTime); 33 | } 34 | return null; 35 | } 36 | 37 | bool? isBetween( 38 | DateTime fromDateTime, 39 | DateTime toDateTime, 40 | ) { 41 | final date = this; 42 | if (date != null) { 43 | final isAfter = date.isAfterOrEqualTo(fromDateTime) ?? false; 44 | final isBefore = date.isBeforeOrEqualTo(toDateTime) ?? false; 45 | return isAfter && isBefore; 46 | } 47 | return null; 48 | } 49 | } -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/cart_icon_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/resources/widgets/cart_quantity_widget.dart'; 13 | 14 | class CartIconWidget extends StatefulWidget { 15 | CartIconWidget({Key? key}) : super(key: key); 16 | 17 | @override 18 | _CartIconWidgetState createState() => _CartIconWidgetState(); 19 | } 20 | 21 | class _CartIconWidgetState extends State { 22 | @override 23 | Widget build(BuildContext context) { 24 | return Container( 25 | width: 70, 26 | child: IconButton( 27 | icon: Stack( 28 | children: [ 29 | Positioned.fill( 30 | child: Align( 31 | child: Icon(Icons.shopping_cart, size: 20), 32 | alignment: Alignment.bottomCenter, 33 | ), 34 | bottom: 0, 35 | ), 36 | Positioned.fill( 37 | child: Align( 38 | child: CartQuantity(), 39 | alignment: Alignment.topCenter, 40 | ), 41 | top: 0, 42 | ) 43 | ], 44 | ), 45 | onPressed: () => Navigator.pushNamed(context, "/cart") 46 | .then((value) => setState(() {})), 47 | ), 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/product_detail_image_swiper_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/resources/widgets/cached_image_widget.dart'; 13 | import 'package:flutter_swiper_view/flutter_swiper_view.dart'; 14 | import 'package:nylo_framework/nylo_framework.dart'; 15 | import 'package:woosignal/models/response/product.dart'; 16 | 17 | class ProductDetailImageSwiperWidget extends StatelessWidget { 18 | const ProductDetailImageSwiperWidget( 19 | {Key? key, required this.product, required this.onTapImage}) 20 | : super(key: key); 21 | 22 | final Product? product; 23 | final void Function(int i) onTapImage; 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return SizedBox( 28 | height: MediaQuery.of(context).size.height * 0.40, 29 | child: SizedBox( 30 | child: Swiper( 31 | itemBuilder: (BuildContext context, int index) => CachedImageWidget( 32 | image: product!.images.isNotEmpty 33 | ? product!.images[index].src 34 | : getEnv("PRODUCT_PLACEHOLDER_IMAGE"), 35 | ), 36 | itemCount: product!.images.isEmpty ? 1 : product!.images.length, 37 | viewportFraction: 0.85, 38 | scale: 0.9, 39 | onTap: onTapImage, 40 | ), 41 | ), 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CADisableMinimumFrameDurationOnPhone 6 | 7 | CFBundleDevelopmentRegion 8 | $(DEVELOPMENT_LANGUAGE) 9 | CFBundleDisplayName 10 | Label StoreMax 11 | CFBundleExecutable 12 | $(EXECUTABLE_NAME) 13 | CFBundleIdentifier 14 | $(PRODUCT_BUNDLE_IDENTIFIER) 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | Label StoreMax 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | $(MARKETING_VERSION) 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | $(CURRENT_PROJECT_VERSION) 27 | LSRequiresIPhoneOS 28 | 29 | UIApplicationSupportsIndirectInputEvents 30 | 31 | UILaunchStoryboardName 32 | LaunchScreen 33 | UIMainStoryboardFile 34 | Main 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /LabelStoreMax/.env: -------------------------------------------------------------------------------- 1 | # ** 2 | 3 | APP_NAME="MyApp" 4 | APP_ENV="local" 5 | APP_DEBUG="true" 6 | APP_URL="https://mywoocommercestore.com" 7 | 8 | ASSET_PATH_PUBLIC="public/assets/" 9 | ASSET_PATH_IMAGES="public/assets/images" 10 | TIMEZONE="UTC" 11 | 12 | LIGHT_THEME_ID="default_light_theme" 13 | DARK_THEME_ID="default_dark_theme" 14 | 15 | # ** 16 | 17 | DEFAULT_LOCALE=null 18 | # supports: "en" (English), "es" (Spanish), "fr" (French), "hi" (Hindi), "it" (Italian), "pt" (Portuguese) or "zh" (Simplified Chinese) 19 | 20 | # ** 21 | 22 | APP_KEY="your app key" 23 | # App key from WooSignal link: https://woosignal.com/dashboard 24 | 25 | # ** 26 | 27 | STRIPE_ACCOUNT=null 28 | # Stripe account key from WooSignal https://woosignal.com/dashboard 29 | 30 | STRIPE_COUNTRY_CODE=null 31 | # Alpha-2 country code list: https://www.iban.com/country-codes 32 | 33 | STRIPE_LIVE_MODE=null 34 | # Change to 'true' for live payments and update the "Environment for Stripe" here https://woosignal.com/dashboard 35 | 36 | # ** 37 | 38 | PAYPAL_ACCOUNT_EMAIL=null 39 | # Your PayPal account email e.g. mystore@business.com 40 | PAYPAL_LIVE_MODE=null 41 | # Change to 'true' for live payments 42 | PAYPAL_LOCALE=null 43 | # Use BCP-47 code from this link https://developer.paypal.com/docs/api/reference/locale-codes/ 44 | 45 | # ** 46 | 47 | RAZORPAY_API_KEY="" 48 | 49 | # ** 50 | 51 | PRODUCT_PLACEHOLDER_IMAGE="https://woosignal.com/images/woocommerce-placeholder.png" 52 | # Sets the default placeholder image for products with no image 53 | 54 | AUTH_USER_KEY="AUTH_USER" 55 | FCM_ENABLED=null 56 | 57 | ENCRYPT_KEY=null 58 | ENCRYPT_SECRET=null -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/providers/payments/cash_on_delivery.dart: -------------------------------------------------------------------------------- 1 | // 2 | // LabelCore 3 | // Label StoreMax 4 | // 5 | // Created by Anthony Gordon. 6 | // 2023, WooSignal Ltd. All rights reserved. 7 | // 8 | 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | 14 | import 'package:flutter/widgets.dart'; 15 | import 'package:flutter_app/bootstrap/data/order_wc.dart'; 16 | import 'package:flutter_app/bootstrap/helpers.dart'; 17 | import 'package:flutter_app/resources/pages/checkout_confirmation_page.dart'; 18 | import 'package:nylo_framework/nylo_framework.dart'; 19 | import 'package:woosignal/models/payload/order_wc.dart'; 20 | import 'package:woosignal/models/response/order.dart'; 21 | import 'package:woosignal/models/response/tax_rate.dart'; 22 | 23 | cashOnDeliveryPay(context, 24 | {required CheckoutConfirmationPageState state, TaxRate? taxRate}) async { 25 | try { 26 | OrderWC orderWC = await buildOrderWC(taxRate: taxRate, markPaid: false); 27 | 28 | Order? order = await (appWooSignal((api) => api.createOrder(orderWC))); 29 | 30 | if (order != null) { 31 | Navigator.pushNamed(context, "/checkout-status", arguments: order); 32 | } else { 33 | showToastNotification( 34 | context, 35 | title: trans("Error"), 36 | description: trans("Something went wrong, please contact our store"), 37 | ); 38 | state.reloadState(showLoader: false); 39 | } 40 | } catch (_) { 41 | showToastNotification( 42 | context, 43 | title: trans("Error"), 44 | description: trans("Something went wrong, please contact our store"), 45 | ); 46 | state.reloadState(showLoader: false); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/switch_address_tab.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | 13 | class SwitchAddressTab extends StatelessWidget { 14 | const SwitchAddressTab({ 15 | Key? key, 16 | required this.type, 17 | required this.title, 18 | required this.currentTabIndex, 19 | required this.onTapAction, 20 | }) : super(key: key); 21 | 22 | final String type; 23 | final String title; 24 | final int currentTabIndex; 25 | final Function() onTapAction; 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | bool isActive = false; 30 | if (type == "shipping" && currentTabIndex == 1) { 31 | isActive = true; 32 | } 33 | 34 | if (type == "billing" && currentTabIndex == 0) { 35 | isActive = true; 36 | } 37 | 38 | return Flexible( 39 | child: InkWell( 40 | child: Container( 41 | width: double.infinity, 42 | child: Text( 43 | title, 44 | style: Theme.of(context).textTheme.titleMedium!.copyWith( 45 | color: isActive ? Colors.white : Colors.black, 46 | ), 47 | textAlign: TextAlign.center, 48 | ), 49 | decoration: BoxDecoration( 50 | borderRadius: BorderRadius.circular(4), 51 | color: isActive ? Colors.black : Colors.white, 52 | ), 53 | padding: EdgeInsets.symmetric(horizontal: 4, vertical: 2), 54 | ), 55 | onTap: onTapAction, 56 | ), 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /LabelStoreMax/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | 41 | # iOS/XCode related 42 | **/ios/**/*.mode1v3 43 | **/ios/**/*.mode2v3 44 | **/ios/**/*.moved-aside 45 | **/ios/**/*.pbxuser 46 | **/ios/**/*.perspectivev3 47 | **/ios/**/*sync/ 48 | **/ios/**/.sconsign.dblite 49 | **/ios/**/.tags* 50 | **/ios/**/.vagrant/ 51 | **/ios/**/DerivedData/ 52 | **/ios/**/Icon? 53 | **/ios/**/Pods/ 54 | **/ios/**/.symlinks/ 55 | **/ios/**/profile 56 | **/ios/**/xcuserdata 57 | **/ios/.generated/ 58 | **/ios/Flutter/App.framework 59 | **/ios/Flutter/Flutter.framework 60 | **/ios/Flutter/Generated.xcconfig 61 | **/ios/Flutter/app.flx 62 | **/ios/Flutter/app.zip 63 | **/ios/Flutter/flutter_assets/ 64 | **/ios/Flutter/flutter_export_environment.sh 65 | **/ios/ServiceDefinitions.json 66 | **/ios/Runner/GeneratedPluginRegistrant.* 67 | 68 | # Exceptions to above rules. 69 | !**/ios/**/default.mode1v3 70 | !**/ios/**/default.mode2v3 71 | !**/ios/**/default.pbxuser 72 | !**/ios/**/default.perspectivev3 73 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 74 | 75 | /ios/Flutter/Flutter.podspec 76 | /ios/Podfile.lock 77 | /ios/Podfile 78 | 79 | .flutter-plugins-dependencies 80 | 81 | .env -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/checkout_payment_type_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/app/models/checkout_session.dart'; 13 | import 'package:flutter_app/resources/widgets/woosignal_ui.dart'; 14 | import 'package:nylo_framework/nylo_framework.dart'; 15 | 16 | class CheckoutPaymentTypeWidget extends StatelessWidget { 17 | const CheckoutPaymentTypeWidget( 18 | {Key? key, 19 | required this.context, 20 | required this.checkoutSession, 21 | this.resetState}) 22 | : super(key: key); 23 | final CheckoutSession checkoutSession; 24 | final BuildContext context; 25 | final Function? resetState; 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | bool hasPaymentType = checkoutSession.paymentType != null; 30 | return CheckoutRowLine( 31 | heading: trans(hasPaymentType ? "Payment method" : "Pay with"), 32 | leadImage: hasPaymentType 33 | ? Container( 34 | color: Colors.white, 35 | child: Image.asset( 36 | getImageAsset(checkoutSession.paymentType!.assetImage), 37 | width: 70, 38 | ), 39 | ) 40 | : Icon(Icons.payment), 41 | leadTitle: hasPaymentType 42 | ? checkoutSession.paymentType!.desc 43 | : trans("Select a payment method"), 44 | action: _actionPayWith, 45 | showBorderBottom: true, 46 | ); 47 | } 48 | 49 | _actionPayWith() { 50 | Navigator.pushNamed(context, "/checkout-payment-type") 51 | .then((value) => resetState!()); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/cart_quantity_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_app/app/models/cart.dart'; 3 | import 'package:flutter_app/app/models/cart_line_item.dart'; 4 | import 'package:nylo_framework/nylo_framework.dart'; 5 | 6 | class CartQuantity extends StatefulWidget { 7 | 8 | CartQuantity({Key? key, this.childOfNavBar = false}) : super(key: key); 9 | 10 | final bool childOfNavBar; 11 | 12 | static String state = "cart_quantity"; 13 | 14 | @override 15 | _CartQuantityState createState() => _CartQuantityState(childOfNavBar); 16 | } 17 | 18 | class _CartQuantityState extends NyState { 19 | 20 | bool _childOfNavBar = false; 21 | 22 | _CartQuantityState(childOfNavBar) { 23 | stateName = CartQuantity.state; 24 | _childOfNavBar = childOfNavBar; 25 | } 26 | 27 | @override 28 | init() async { 29 | super.init(); 30 | 31 | } 32 | 33 | @override 34 | stateUpdated(dynamic data) async { 35 | setState(() { }); 36 | } 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | return NyFutureBuilder>( 41 | future: Cart.getInstance.getCart(), 42 | child: (BuildContext context, data) { 43 | if (data == null) { 44 | return SizedBox.shrink(); 45 | } 46 | List cartItems = data.map((e) => e.quantity).toList(); 47 | String cartValue = "0"; 48 | if (cartItems.isNotEmpty) { 49 | cartValue = cartItems 50 | .reduce((value, element) => value! + element!) 51 | .toString(); 52 | } 53 | if (cartValue == "0" && _childOfNavBar == true) { 54 | return SizedBox.shrink(); 55 | } 56 | return Text( 57 | cartValue, 58 | style: Theme.of(context).textTheme.bodyMedium, 59 | textAlign: TextAlign.center, 60 | ); 61 | }, 62 | loading: SizedBox.shrink(), 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/checkout_user_details_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/app/models/checkout_session.dart'; 13 | import 'package:flutter_app/resources/widgets/woosignal_ui.dart'; 14 | import 'package:nylo_framework/nylo_framework.dart'; 15 | 16 | class CheckoutUserDetailsWidget extends StatelessWidget { 17 | const CheckoutUserDetailsWidget( 18 | {Key? key, 19 | required this.context, 20 | required this.checkoutSession, 21 | this.resetState}) 22 | : super(key: key); 23 | final CheckoutSession checkoutSession; 24 | final BuildContext context; 25 | final Function? resetState; 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | bool hasUserCheckoutInfo = (checkoutSession.billingDetails != null && 30 | checkoutSession.billingDetails!.billingAddress != null); 31 | return CheckoutRowLine( 32 | heading: trans("Billing/shipping details"), 33 | leadImage: Icon(Icons.home), 34 | leadTitle: hasUserCheckoutInfo 35 | ? (checkoutSession.billingDetails == null || 36 | (checkoutSession.billingDetails?.billingAddress 37 | ?.hasMissingFields() ?? 38 | true) 39 | ? trans("Billing address is incomplete") 40 | : checkoutSession.billingDetails!.billingAddress?.addressFull()) 41 | : trans("Add billing & shipping details"), 42 | action: _actionCheckoutDetails, 43 | showBorderBottom: true, 44 | ); 45 | } 46 | 47 | _actionCheckoutDetails() { 48 | Navigator.pushNamed(context, "/checkout-details").then((e) { 49 | resetState!(); 50 | }); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/account_detail_settings_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/bootstrap/shared_pref/sp_auth.dart'; 13 | import 'package:nylo_framework/nylo_framework.dart'; 14 | 15 | class AccountDetailSettingsWidget extends StatelessWidget { 16 | const AccountDetailSettingsWidget({Key? key, required this.refreshAccount}) 17 | : super(key: key); 18 | final Function refreshAccount; 19 | @override 20 | Widget build(BuildContext context) { 21 | return ListView( 22 | children: [ 23 | Card( 24 | child: ListTile( 25 | leading: Icon(Icons.account_circle), 26 | title: Text(trans("Update details")), 27 | onTap: () => 28 | Navigator.pushNamed(context, "/account-update").then((onValue) { 29 | refreshAccount(); 30 | }), 31 | ), 32 | ), 33 | Card( 34 | child: ListTile( 35 | leading: Icon(Icons.local_shipping), 36 | title: Text(trans("Billing/shipping details")), 37 | onTap: () => 38 | Navigator.pushNamed(context, "/account-shipping-details"), 39 | ), 40 | ), 41 | Card( 42 | child: ListTile( 43 | leading: Icon(Icons.no_accounts_rounded), 44 | title: Text(trans("Delete Account")), 45 | onTap: () => Navigator.pushNamed(context, "/account-delete"), 46 | ), 47 | ), 48 | Card( 49 | child: ListTile( 50 | leading: Icon(Icons.exit_to_app), 51 | title: Text(trans("Logout")), 52 | onTap: () => authLogout(context), 53 | ), 54 | ), 55 | ], 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/models/customer_country.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter_app/app/models/default_shipping.dart'; 12 | import 'package:flutter_app/bootstrap/helpers.dart'; 13 | 14 | class CustomerCountry { 15 | String? countryCode; 16 | String? name; 17 | DefaultShippingState? state; 18 | 19 | CustomerCountry({this.countryCode, this.name, this.state}); 20 | 21 | CustomerCountry.fromDefaultShipping( 22 | {required DefaultShipping defaultShipping}) { 23 | countryCode = defaultShipping.code; 24 | name = defaultShipping.country; 25 | if ((defaultShipping.states.length) == 1) { 26 | state = defaultShipping.states.first; 27 | } 28 | } 29 | 30 | CustomerCountry.fromWpMeta( 31 | Map json, DefaultShipping defaultShipping) { 32 | countryCode = json['country']; 33 | name = defaultShipping.country; 34 | state = findDefaultShippingStateByCode( 35 | defaultShipping, "${json['country']}:${json['state']}"); 36 | } 37 | 38 | CustomerCountry.fromJson(Map? json) { 39 | if (json == null) { 40 | return; 41 | } 42 | if (json['country_code'] != null) { 43 | countryCode = json['country_code']; 44 | } 45 | if (json['name'] != null) { 46 | name = json['name']; 47 | } 48 | if (json['state'] != null) { 49 | state = DefaultShippingState.fromJson(json['state']); 50 | } 51 | } 52 | 53 | bool hasState() => (state != null && state!.name != null ? true : false); 54 | 55 | Map toJson() { 56 | final Map data = {}; 57 | data['country_code'] = countryCode; 58 | data['name'] = name; 59 | data['state'] = null; 60 | if (state != null) { 61 | data['state'] = state!.toJson(); 62 | } 63 | return data; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/config/payment_gateways.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_app/app/models/payment_type.dart'; 2 | import 'package:flutter_app/app/providers/payments/cash_on_delivery.dart'; 3 | import 'package:flutter_app/app/providers/payments/paypal_pay.dart'; 4 | import 'package:flutter_app/app/providers/payments/razorpay_pay.dart'; 5 | import 'package:flutter_app/app/providers/payments/stripe_pay.dart'; 6 | import 'package:flutter_app/bootstrap/helpers.dart'; 7 | import 'package:nylo_framework/nylo_framework.dart'; 8 | 9 | /* 10 | |-------------------------------------------------------------------------- 11 | | PAYMENT GATEWAYS 12 | | 13 | | Configure which payment gateways you want to use. 14 | | Docs here: https://woosignal.com/docs/app/label-storemax 15 | |-------------------------------------------------------------------------- 16 | */ 17 | 18 | const appPaymentGateways = []; 19 | // Available: "Stripe", "CashOnDelivery", "PayPal", "RazorPay" 20 | // e.g. app_payment_gateways = ["Stripe", "CashOnDelivery"]; will only use Stripe and Cash on Delivery. 21 | 22 | List paymentTypeList = [ 23 | addPayment( 24 | id: 1, 25 | name: "Stripe", 26 | description: trans("Debit or Credit Card"), 27 | assetImage: "dark_powered_by_stripe.png", 28 | pay: stripePay, 29 | ), 30 | 31 | addPayment( 32 | id: 2, 33 | name: "CashOnDelivery", 34 | description: trans("Cash on delivery"), 35 | assetImage: "cash_on_delivery.jpeg", 36 | pay: cashOnDeliveryPay, 37 | ), 38 | 39 | addPayment( 40 | id: 4, 41 | name: "PayPal", 42 | description: trans("Debit or Credit Card"), 43 | assetImage: "paypal_logo.png", 44 | pay: payPalPay, 45 | ), 46 | 47 | addPayment( 48 | id: 5, 49 | name: "RazorPay", 50 | description: trans("Debit or Credit Card"), 51 | assetImage: "razorpay.png", 52 | pay: razorPay, 53 | ), 54 | 55 | // e.g. add more here 56 | 57 | // addPayment( 58 | // id: 6, 59 | // name: "MyNewPaymentMethod", 60 | // description: "Debit or Credit Card", 61 | // assetImage: "add icon image to public/assets/images/myimage.png", 62 | // pay: "myCustomPaymentFunction", 63 | // ), 64 | ]; 65 | -------------------------------------------------------------------------------- /LabelStoreMax/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | packagingOptions { 30 | exclude 'META-INF/DEPENDENCIES' 31 | } 32 | 33 | compileSdkVersion 33 34 | 35 | sourceSets { 36 | main.java.srcDirs += 'src/main/kotlin' 37 | } 38 | 39 | lintOptions { 40 | disable 'InvalidPackage' 41 | } 42 | 43 | defaultConfig { 44 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 45 | applicationId "com.woosignal.android" 46 | minSdkVersion 21 47 | targetSdkVersion 33 48 | versionCode flutterVersionCode.toInteger() 49 | versionName flutterVersionName 50 | multiDexEnabled true 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | implementation "androidx.multidex:multidex:2.0.1" 69 | } -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/top_nav_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:auto_size_text/auto_size_text.dart'; 12 | import 'package:flutter/material.dart'; 13 | import 'package:nylo_framework/nylo_framework.dart'; 14 | 15 | class TopNavWidget extends StatelessWidget { 16 | const TopNavWidget({Key? key, this.onPressBrowseCategories}) 17 | : super(key: key); 18 | final Function()? onPressBrowseCategories; 19 | 20 | @override 21 | Widget build(BuildContext context) => Row( 22 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 23 | children: [ 24 | Row( 25 | crossAxisAlignment: CrossAxisAlignment.center, 26 | mainAxisAlignment: MainAxisAlignment.start, 27 | children: [ 28 | Text( 29 | "${(trans("Shop").capitalize())} / ", 30 | style: Theme.of(context) 31 | .textTheme 32 | .titleMedium! 33 | .copyWith(fontWeight: FontWeight.bold), 34 | maxLines: 1, 35 | ), 36 | AutoSizeText( 37 | trans("Newest"), 38 | style: Theme.of(context) 39 | .textTheme 40 | .bodyMedium! 41 | .copyWith(fontWeight: FontWeight.bold), 42 | maxLines: 1, 43 | ), 44 | ], 45 | ), 46 | Flexible( 47 | child: MaterialButton( 48 | minWidth: 100, 49 | height: 60, 50 | child: AutoSizeText( 51 | trans("Browse categories"), 52 | style: Theme.of(context).textTheme.bodyLarge, 53 | maxLines: 1, 54 | textAlign: TextAlign.right, 55 | ), 56 | onPressed: onPressBrowseCategories, 57 | ), 58 | ) 59 | ], 60 | ); 61 | } 62 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/product_review_item_container_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/bootstrap/helpers.dart'; 13 | import 'package:flutter_rating_bar/flutter_rating_bar.dart'; 14 | import 'package:woosignal/models/response/product_review.dart'; 15 | 16 | class ProductReviewItemContainerWidget extends StatelessWidget { 17 | const ProductReviewItemContainerWidget( 18 | {Key? key, required this.productReview}) 19 | : super(key: key); 20 | 21 | final ProductReview productReview; 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Container( 26 | child: Column( 27 | crossAxisAlignment: CrossAxisAlignment.start, 28 | mainAxisAlignment: MainAxisAlignment.start, 29 | children: [ 30 | RatingBarIndicator( 31 | rating: productReview.rating!.toDouble(), 32 | itemBuilder: (context, index) => Icon( 33 | Icons.star, 34 | color: Colors.amber, 35 | ), 36 | itemCount: 5, 37 | itemSize: 20.0, 38 | direction: Axis.horizontal, 39 | ), 40 | Padding( 41 | padding: const EdgeInsets.only(top: 8), 42 | child: Text(parseHtmlString(productReview.review)), 43 | ), 44 | Row( 45 | children: [ 46 | Text(productReview.reviewer!), 47 | Padding( 48 | padding: EdgeInsets.symmetric(horizontal: 8), 49 | child: Icon( 50 | Icons.circle_rounded, 51 | size: 3, 52 | ), 53 | ), 54 | Text( 55 | formatDateTime("MMM d, yyyy").format( 56 | parseDateTime(productReview.dateCreated!), 57 | ), 58 | ), 59 | ], 60 | ) 61 | ], 62 | ), 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/config/localization.dart: -------------------------------------------------------------------------------- 1 | import 'package:nylo_framework/nylo_framework.dart'; 2 | 3 | /* 4 | |-------------------------------------------------------------------------- 5 | | localeType 6 | | ------------------------------------------------------------------------- 7 | | Define if you want the application to read the locale from the users 8 | | device settings or as you've defined in the [languageCode]. 9 | |-------------------------------------------------------------------------- 10 | */ 11 | final LocaleType localeType = LocaleType.asDefined; // device, asDefined 12 | 13 | /* 14 | |-------------------------------------------------------------------------- 15 | | languageCode 16 | | ------------------------------------------------------------------------- 17 | | Define the language code you want to use. E.g. en, es, ar. 18 | | The language code should match the name of the file i.e /lang/es.json 19 | |-------------------------------------------------------------------------- 20 | */ 21 | final String? languageCode = getEnv('DEFAULT_LOCALE', defaultValue: "en"); 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | languagesList 26 | | ------------------------------------------------------------------------- 27 | | Add a list of supported languages. 28 | |-------------------------------------------------------------------------- 29 | */ 30 | final List languagesList = const [ 31 | 'en', 32 | 'es', 33 | 'fr', 34 | 'hi', 35 | 'it', 36 | 'pt', 37 | 'zh' 38 | ]; 39 | 40 | /* 41 | |-------------------------------------------------------------------------- 42 | | assetsDirectory 43 | | ------------------------------------------------------------------------- 44 | | Asset directory for your languages. 45 | |-------------------------------------------------------------------------- 46 | */ 47 | final String assetsDirectory = 'lang/'; 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | valuesAsMap 52 | | ------------------------------------------------------------------------- 53 | | If you want to define your own language map in code rather than using 54 | | the asset json files. 55 | |-------------------------------------------------------------------------- 56 | */ 57 | final Map valuesAsMap = {}; 58 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/themes/styles/light_theme_colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_app/bootstrap/app_helper.dart'; 3 | import 'package:flutter_app/resources/themes/styles/color_styles.dart'; 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Light Theme Colors 8 | |-------------------------------------------------------------------------- 9 | */ 10 | 11 | class LightThemeColors implements ColorStyles { 12 | // general 13 | 14 | @override 15 | Color get background => Color(int.parse( 16 | AppHelper.instance.appConfig!.themeColors!['light']['background'])); 17 | @override 18 | Color get backgroundContainer => Colors.white; 19 | @override 20 | Color get primaryContent => Color(int.parse( 21 | AppHelper.instance.appConfig!.themeColors!['light']['primary_text'])); 22 | @override 23 | Color get primaryAccent => const Color(0xFF87c694); 24 | 25 | @override 26 | Color get surfaceBackground => Colors.white; 27 | @override 28 | Color get surfaceContent => Colors.black; 29 | 30 | // app bar 31 | @override 32 | Color get appBarBackground => 33 | Color(int.parse(AppHelper.instance.appConfig!.themeColors!['light'] 34 | ['app_bar_background'])); 35 | @override 36 | Color get appBarPrimaryContent => Color(int.parse( 37 | AppHelper.instance.appConfig!.themeColors!['light']['app_bar_text'])); 38 | 39 | @override 40 | Color get inputPrimaryContent => Colors.black; 41 | 42 | // buttons 43 | @override 44 | Color get buttonBackground => 45 | Color(int.parse(AppHelper.instance.appConfig!.themeColors!['light'] 46 | ['button_background'])); 47 | @override 48 | Color get buttonPrimaryContent => Color(int.parse( 49 | AppHelper.instance.appConfig!.themeColors!['light']['button_text'])); 50 | 51 | // bottom tab bar 52 | @override 53 | Color get bottomTabBarBackground => Colors.white; 54 | 55 | // bottom tab bar - icons 56 | @override 57 | Color get bottomTabBarIconSelected => Colors.blue; 58 | @override 59 | Color get bottomTabBarIconUnselected => Colors.black54; 60 | 61 | // bottom tab bar - label 62 | @override 63 | Color get bottomTabBarLabelUnselected => Colors.black45; 64 | @override 65 | Color get bottomTabBarLabelSelected => Colors.black; 66 | } 67 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/themes/styles/dark_theme_colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_app/bootstrap/app_helper.dart'; 3 | import 'package:flutter_app/resources/themes/styles/color_styles.dart'; 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Dark Theme Colors 8 | |-------------------------------------------------------------------------- 9 | */ 10 | 11 | class DarkThemeColors implements ColorStyles { 12 | // general 13 | @override 14 | Color get background => Color(int.parse( 15 | AppHelper.instance.appConfig!.themeColors!['dark']['background'])); 16 | @override 17 | Color get backgroundContainer => const Color(0xFF4a4a4a); 18 | 19 | @override 20 | Color get primaryContent => Color(int.parse( 21 | AppHelper.instance.appConfig!.themeColors!['dark']['primary_text'])); 22 | @override 23 | Color get primaryAccent => const Color(0xFF818181); 24 | 25 | @override 26 | Color get surfaceBackground => Color(0xFF818181); 27 | @override 28 | Color get surfaceContent => Colors.black; 29 | 30 | // app bar 31 | @override 32 | Color get appBarBackground => 33 | Color(int.parse(AppHelper.instance.appConfig!.themeColors!['dark'] 34 | ['app_bar_background'])); 35 | @override 36 | Color get appBarPrimaryContent => Color(int.parse( 37 | AppHelper.instance.appConfig!.themeColors!['dark']['app_bar_text'])); 38 | 39 | @override 40 | Color get inputPrimaryContent => Colors.white; 41 | 42 | // buttons 43 | @override 44 | Color get buttonBackground => Color(int.parse( 45 | AppHelper.instance.appConfig!.themeColors!['dark']['button_background'])); 46 | @override 47 | Color get buttonPrimaryContent => Color(int.parse( 48 | AppHelper.instance.appConfig!.themeColors!['dark']['button_text'])); 49 | 50 | // bottom tab bar 51 | @override 52 | Color get bottomTabBarBackground => const Color(0xFF232c33); 53 | 54 | // bottom tab bar - icons 55 | @override 56 | Color get bottomTabBarIconSelected => Colors.white70; 57 | @override 58 | Color get bottomTabBarIconUnselected => Colors.white60; 59 | 60 | // bottom tab bar - label 61 | @override 62 | Color get bottomTabBarLabelUnselected => Colors.white54; 63 | @override 64 | Color get bottomTabBarLabelSelected => Colors.white; 65 | } 66 | -------------------------------------------------------------------------------- /LabelStoreMax/README.md: -------------------------------------------------------------------------------- 1 |

2 | WooSignal logo 3 |

4 | 5 | # WooCommerce App: Label StoreMax 6 | 7 | ### Label StoreMax 8 | 9 | [Official WooSignal WooCommerce App](https://woosignal.com) 10 | 11 | ![alt text](https://woosignal.com/images/woocommerce_app_preview_2.png "WooCommerce app checkout experience") 12 | 13 | ![alt text](https://woosignal.com/images/woocommerce_app_preview_3.png "WooCommerce app Login/Register for customers via WordPress") 14 | 15 | ![alt text](https://woosignal.com/images/woocommerce_app_preview_1.png "Full integration with WooCommerce") 16 | 17 | ![alt text](https://woosignal.com/images/mock_dark_light_mode.png "Dark and light mode shopping") 18 | 19 | ### About Label StoreMax 20 | 21 | Label StoreMax is an App Template for WooCommerce stores. Your customers will be able to browse products, make orders and login via WordPress. You can also customise the look and feel of the app in the WooSignal dashboard. 22 | 23 | You can upload the app to the IOS app store and Google play store using Flutter. 24 | 25 | ### Requirements 26 | 27 | - WooCommerce Store 3.5+ 28 | - Android Studio/VSCode (for running the app) 29 | - Flutter installed 30 | 31 | ### Getting Started 32 | 33 | 1. Download/Clone this repository 34 | 2. Sign up for free on [WooSignal](https://woosignal.com) and link your WooCommerce store 35 | 3. Add your app key into the **.env** file and hit play (with Android Studio) to build the app 🥳 36 | 37 | Full documentation this available [here](https://woosignal.com/docs/app/label-storemax) 38 | 39 | ## Some features integrated 40 | 41 | - App Store Ready 42 | - Simple configuration 43 | - Browse products, make orders, customer login (via WordPress) 44 | - Change app name, logo, customize default language, currency + more 45 | - Light and dark mode 46 | - Stripe, Cash On Delivery, PayPal, RazorPay 47 | - Localized for en, es, pt, it, hi, fr, zh, tr, nl, de 48 | - Orders show as normal in WooCommerce 49 | 50 | ## Security Vulnerabilities 51 | If you discover a security vulnerability within WooSignal, please send an e-mail support@woosignal.com 52 | 53 | ## Uploading to the app stores 54 | 55 | - [IOS - Deployment](https://flutter.dev/docs/deployment/ios) 56 | - [Android - Deployment](https://flutter.dev/docs/deployment/android) 57 | 58 | ## Licence 59 | The Label StoreMax framework is open-sourced software licensed under the MIT license. 60 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/providers/payments/example_pay.dart: -------------------------------------------------------------------------------- 1 | // 2 | // LabelCore 3 | // Label StoreMax 4 | // 5 | // Created by Anthony Gordon. 6 | // 2023, WooSignal Ltd. All rights reserved. 7 | // 8 | 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | 14 | import 'package:flutter/widgets.dart'; 15 | import 'package:flutter_app/bootstrap/data/order_wc.dart'; 16 | import 'package:flutter_app/bootstrap/helpers.dart'; 17 | import 'package:flutter_app/resources/pages/checkout_confirmation_page.dart'; 18 | import 'package:nylo_framework/nylo_framework.dart'; 19 | import 'package:woosignal/models/payload/order_wc.dart'; 20 | import 'package:woosignal/models/response/order.dart'; 21 | import 'package:woosignal/models/response/tax_rate.dart'; 22 | 23 | // CALL THE BELOW METHOD TO SHOW AND HIDE LOADER 24 | // state.reloadState(showLoader: false); 25 | 26 | // CHECKOUT HELPER 27 | // IT WILL RETURN THE ORDER TOTAL, BILLING DETAILS AND CART 28 | // await checkout(taxRate, (total, billingDetails, cart) async { 29 | // 30 | // }); 31 | 32 | // TO USE A PAYMENT GATEWAY, FIRST OPEN /config/payment_gateways.dart. 33 | // THEN ADD A NEW PAYMENT LIKE IN THE BELOW EXAMPLE 34 | // 35 | // addPayment( 36 | // id: 6, 37 | // name: "My Payment", 38 | // description: trans("Debit or Credit Card"), 39 | // assetImage: "payment_logo.png", E.g. /public/assets/images/payment_logo.png 40 | // pay: examplePay, 41 | // ), 42 | 43 | examplePay(context, 44 | {required CheckoutConfirmationPageState state, TaxRate? taxRate}) async { 45 | // HANDLE YOUR PAYMENT INTEGRATION HERE 46 | // ... 47 | // ... 48 | // ... 49 | // THEN ON SUCCESS OF A PAYMENT YOU CAN DO SOMETHING SIMILAR BELOW 50 | 51 | // CREATES ORDER MODEL 52 | OrderWC orderWC = await buildOrderWC(taxRate: taxRate, markPaid: true); 53 | 54 | // CREATES ORDER IN WOOCOMMERCE 55 | Order? order = await (appWooSignal((api) => api.createOrder(orderWC))); 56 | 57 | // CHECK IF ORDER IS NULL 58 | if (order != null) { 59 | Navigator.pushNamed(context, "/checkout-status", arguments: order); 60 | } else { 61 | showToastNotification( 62 | context, 63 | title: trans("Error"), 64 | description: trans("Something went wrong, please contact our store"), 65 | ); 66 | state.reloadState(showLoader: false); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | WooSignal logo 3 |

4 | 5 | # WooCommerce App: Label StoreMax 6 | 7 | ### Label StoreMax 8 | 9 | 10 | [Official WooSignal WooCommerce App](https://woosignal.com) 11 | 12 | ![alt text](https://woosignal.com/images/woocommerce_app_preview_2.png "WooCommerce app checkout experience") 13 | 14 | ![alt text](https://woosignal.com/images/woocommerce_app_preview_3.png "WooCommerce app Login/Register for customers via WordPress") 15 | 16 | ![alt text](https://woosignal.com/images/woocommerce_app_preview_1.png "Full integration with WooCommerce") 17 | 18 | ![alt text](https://woosignal.com/images/mock_dark_light_mode.png "Dark and light mode shopping") 19 | 20 | ### About Label StoreMax 21 | 22 | Label StoreMax is an App Template for WooCommerce stores. Your customers will be able to browse products, make orders and login via WordPress. You can also customise the look and feel of the app in the WooSignal dashboard. 23 | 24 | You can also upload the app to the IOS app store and Google play store using Flutter. 25 | 26 | ### Requirements 27 | 28 | - WooCommerce Store 3.5+ 29 | - Android Studio/VSCode (for running the app) 30 | - Flutter installed 31 | 32 | ### Getting Started 33 | 34 | 1. Download/Clone this repository 35 | 2. Sign up for free on [WooSignal](https://woosignal.com) and link your WooCommerce store 36 | 3. Add your app key into the **.env** file and hit play (with Android Studio) to build the app 🥳 37 | 38 | Full documentation this available [here](https://woosignal.com/docs/app/ios/label-storemax) 39 | 40 | ## Some features integrated 41 | 42 | - App Store Ready 43 | - Simple configuration 44 | - Browse products, make orders, customer login (via WordPress) 45 | - Change app name, logo, customize default language, currency + more 46 | - Light and dark mode 47 | - Theme customization 48 | - Stripe, Cash On Delivery, PayPal, RazorPay 49 | - Localized for en, es, pt, it, hi, fr, zh, tr, nl 50 | - Orders show as normal in WooCommerce 51 | 52 | ## Security Vulnerabilities 53 | If you discover a security vulnerability within WooSignal, please send an e-mail support@woosignal.com 54 | 55 | ## Uploading to the app stores 56 | 57 | - [IOS - Deployment](https://flutter.dev/docs/deployment/ios) 58 | - [Android - Deployment](https://flutter.dev/docs/deployment/android) 59 | 60 | ## Licence 61 | The Label StoreMax framework is open-sourced software licensed under the MIT license. 62 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/checkout_shipping_type_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/app/models/checkout_session.dart'; 13 | import 'package:flutter_app/app/models/customer_address.dart'; 14 | import 'package:flutter_app/resources/widgets/woosignal_ui.dart'; 15 | import 'package:nylo_framework/nylo_framework.dart'; 16 | import 'package:woosignal/models/response/woosignal_app.dart'; 17 | 18 | class CheckoutShippingTypeWidget extends StatelessWidget { 19 | const CheckoutShippingTypeWidget( 20 | {Key? key, 21 | required this.context, 22 | required this.wooSignalApp, 23 | required this.checkoutSession, 24 | this.resetState}) 25 | : super(key: key); 26 | 27 | final CheckoutSession checkoutSession; 28 | final BuildContext context; 29 | final Function? resetState; 30 | final WooSignalApp? wooSignalApp; 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | bool hasDisableShipping = wooSignalApp!.disableShipping == 1; 35 | if (hasDisableShipping == true) { 36 | return SizedBox.shrink(); 37 | } 38 | bool hasSelectedShippingType = checkoutSession.shippingType != null; 39 | return CheckoutRowLine( 40 | heading: trans( 41 | hasSelectedShippingType ? "Shipping selected" : "Select shipping"), 42 | leadImage: Icon(Icons.local_shipping), 43 | leadTitle: hasSelectedShippingType 44 | ? checkoutSession.shippingType!.getTitle() 45 | : trans("Select a shipping option"), 46 | action: _actionSelectShipping, 47 | showBorderBottom: true, 48 | ); 49 | } 50 | 51 | _actionSelectShipping() { 52 | CustomerAddress? shippingAddress = 53 | checkoutSession.billingDetails!.shippingAddress; 54 | if (shippingAddress == null || shippingAddress.customerCountry == null) { 55 | showToastNotification( 56 | context, 57 | title: trans("Oops"), 58 | description: trans("Add your shipping details first"), 59 | icon: Icons.local_shipping, 60 | ); 61 | return; 62 | } 63 | Navigator.pushNamed(context, "/checkout-shipping-type") 64 | .then((value) => resetState!()); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /LabelStoreMax/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 9 | 10 | 11 | 12 | 13 | 17 | 26 | 30 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 42 | 45 | 46 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/product_detail_header_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/bootstrap/helpers.dart'; 13 | import 'package:woosignal/models/response/product.dart'; 14 | 15 | class ProductDetailHeaderWidget extends StatelessWidget { 16 | const ProductDetailHeaderWidget({Key? key, required this.product}) 17 | : super(key: key); 18 | 19 | final Product? product; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Container( 24 | padding: EdgeInsets.symmetric( 25 | vertical: 10, 26 | horizontal: 16, 27 | ), 28 | child: Row( 29 | crossAxisAlignment: CrossAxisAlignment.center, 30 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 31 | children: [ 32 | Flexible( 33 | child: Text( 34 | product!.name!, 35 | style: 36 | Theme.of(context).textTheme.bodyLarge!.copyWith(fontSize: 20), 37 | textAlign: TextAlign.left, 38 | overflow: TextOverflow.ellipsis, 39 | maxLines: 2, 40 | ), 41 | flex: 4, 42 | ), 43 | Flexible( 44 | child: Column( 45 | crossAxisAlignment: CrossAxisAlignment.end, 46 | mainAxisAlignment: MainAxisAlignment.center, 47 | children: [ 48 | Text( 49 | formatStringCurrency(total: product!.price), 50 | style: Theme.of(context).textTheme.headlineMedium!.copyWith( 51 | fontSize: 20, 52 | ), 53 | textAlign: TextAlign.right, 54 | ), 55 | if (product!.onSale == true && product!.type != "variable") 56 | Text( 57 | formatStringCurrency(total: product!.regularPrice), 58 | style: TextStyle( 59 | color: Colors.grey, 60 | decoration: TextDecoration.lineThrough, 61 | ), 62 | ) 63 | ], 64 | ), 65 | flex: 2, 66 | ) 67 | ], 68 | ), 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/pages/product_image_viewer_page.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/app/controllers/product_image_viewer_controller.dart'; 13 | import 'package:flutter_app/resources/widgets/cached_image_widget.dart'; 14 | import 'package:flutter_app/resources/widgets/safearea_widget.dart'; 15 | import 'package:flutter_swiper_view/flutter_swiper_view.dart'; 16 | import 'package:nylo_framework/nylo_framework.dart'; 17 | 18 | class ProductImageViewerPage extends NyStatefulWidget { 19 | static String path = "/product-images"; 20 | 21 | @override 22 | final ProductImageViewerController controller = 23 | ProductImageViewerController(); 24 | 25 | ProductImageViewerPage({Key? key}) 26 | : super(path, key: key, child: _ProductImageViewerPageState()); 27 | } 28 | 29 | class _ProductImageViewerPageState extends NyState { 30 | int? _initialIndex; 31 | List _arrImageSrc = []; 32 | 33 | @override 34 | void initState() { 35 | Map imageData = widget.controller.data(); 36 | _initialIndex = imageData['index']; 37 | _arrImageSrc = imageData['images']; 38 | super.initState(); 39 | } 40 | 41 | @override 42 | Widget build(BuildContext context) { 43 | return Scaffold( 44 | body: SafeAreaWidget( 45 | child: Column( 46 | children: [ 47 | Expanded( 48 | child: Swiper( 49 | index: _initialIndex!, 50 | itemBuilder: (BuildContext context, int index) => 51 | CachedImageWidget( 52 | image: (_arrImageSrc.isEmpty 53 | ? getEnv("PRODUCT_PLACEHOLDER_IMAGE") 54 | : _arrImageSrc[index]), 55 | ), 56 | itemCount: _arrImageSrc.isEmpty ? 1 : _arrImageSrc.length, 57 | viewportFraction: 0.9, 58 | scale: 0.95, 59 | ), 60 | ), 61 | Container( 62 | child: IconButton( 63 | icon: Icon(Icons.close), 64 | onPressed: () => Navigator.pop(context), 65 | ), 66 | ) 67 | ], 68 | ), 69 | ), 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/product_detail_body_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/resources/widgets/product_detail_description_widget.dart'; 13 | import 'package:flutter_app/resources/widgets/product_detail_header_widget.dart'; 14 | import 'package:flutter_app/resources/widgets/product_detail_image_swiper_widget.dart'; 15 | import 'package:flutter_app/resources/widgets/product_detail_related_products_widget.dart'; 16 | import 'package:flutter_app/resources/widgets/product_detail_reviews_widget.dart'; 17 | import 'package:flutter_app/resources/widgets/product_detail_upsell_widget.dart'; 18 | import 'package:woosignal/models/response/product.dart'; 19 | import 'package:woosignal/models/response/woosignal_app.dart'; 20 | 21 | class ProductDetailBodyWidget extends StatelessWidget { 22 | const ProductDetailBodyWidget( 23 | {Key? key, required this.product, required this.wooSignalApp}) 24 | : super(key: key); 25 | 26 | final Product? product; 27 | final WooSignalApp? wooSignalApp; 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | return ListView( 32 | shrinkWrap: true, 33 | children: [ 34 | ProductDetailImageSwiperWidget( 35 | product: product, 36 | onTapImage: (i) => _viewProductImages(context, i)), 37 | // 38 | 39 | ProductDetailHeaderWidget(product: product), 40 | // 41 | 42 | ProductDetailDescriptionWidget(product: product), 43 | // 44 | 45 | ProductDetailReviewsWidget( 46 | product: product, wooSignalApp: wooSignalApp), 47 | //
48 | 49 | if (product != null) 50 | ProductDetailUpsellWidget( 51 | productIds: product!.upsellIds, wooSignalApp: wooSignalApp), 52 | // 53 | 54 | ProductDetailRelatedProductsWidget( 55 | product: product, wooSignalApp: wooSignalApp) 56 | // 57 | ], 58 | ); 59 | } 60 | 61 | _viewProductImages(BuildContext context, int i) => 62 | Navigator.pushNamed(context, "/product-images", arguments: { 63 | "index": i, 64 | "images": product!.images.map((f) => f.src).toList() 65 | }); 66 | } 67 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/pages/home_search_page.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/bootstrap/app_helper.dart'; 13 | import 'package:flutter_app/resources/widgets/buttons.dart'; 14 | import 'package:flutter_app/resources/widgets/safearea_widget.dart'; 15 | import 'package:nylo_framework/nylo_framework.dart'; 16 | 17 | import '../widgets/woosignal_ui.dart'; 18 | 19 | class HomeSearchPage extends StatefulWidget { 20 | HomeSearchPage(); 21 | 22 | @override 23 | _HomeSearchPageState createState() => _HomeSearchPageState(); 24 | } 25 | 26 | class _HomeSearchPageState extends State { 27 | _HomeSearchPageState(); 28 | 29 | final TextEditingController _txtSearchController = TextEditingController(); 30 | 31 | @override 32 | void initState() { 33 | super.initState(); 34 | } 35 | 36 | _actionSearch() { 37 | Navigator.pushNamed(context, "/product-search", 38 | arguments: _txtSearchController.text) 39 | .then((search) { 40 | if (["notic", "compo"].contains(AppHelper.instance.appConfig!.theme) == 41 | false) { 42 | Navigator.pop(context); 43 | } 44 | }); 45 | } 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | return Scaffold( 50 | appBar: AppBar( 51 | title: StoreLogo(height: 55), 52 | centerTitle: true, 53 | ), 54 | body: SafeAreaWidget( 55 | child: Column( 56 | mainAxisAlignment: MainAxisAlignment.center, 57 | crossAxisAlignment: CrossAxisAlignment.start, 58 | children: [ 59 | TextField( 60 | decoration: InputDecoration(prefixIcon: Icon(Icons.search)), 61 | controller: _txtSearchController, 62 | style: Theme.of(context).textTheme.displaySmall, 63 | keyboardType: TextInputType.text, 64 | autocorrect: false, 65 | autofocus: true, 66 | textCapitalization: TextCapitalization.sentences, 67 | ), 68 | Container( 69 | margin: EdgeInsets.only(top: 10), 70 | child: PrimaryButton( 71 | title: trans("Search"), 72 | action: _actionSearch, 73 | ), 74 | ) 75 | ], 76 | ), 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/pages/no_connection_page.dart: -------------------------------------------------------------------------------- 1 | // StoreMob 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/bootstrap/app_helper.dart'; 13 | import 'package:flutter_app/bootstrap/helpers.dart'; 14 | import 'package:flutter_app/resources/widgets/buttons.dart'; 15 | import 'package:flutter_app/resources/widgets/safearea_widget.dart'; 16 | import 'package:nylo_framework/nylo_framework.dart'; 17 | import 'package:woosignal/models/response/woosignal_app.dart'; 18 | 19 | class NoConnectionPage extends StatefulWidget { 20 | NoConnectionPage(); 21 | 22 | @override 23 | _NoConnectionPageState createState() => _NoConnectionPageState(); 24 | } 25 | 26 | class _NoConnectionPageState extends State { 27 | _NoConnectionPageState(); 28 | 29 | @override 30 | void initState() { 31 | super.initState(); 32 | if (getEnv('APP_DEBUG') == true) { 33 | NyLogger.error('WooCommerce site is not connected'); 34 | } 35 | } 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | return Scaffold( 40 | body: SafeAreaWidget( 41 | child: Center( 42 | child: Column( 43 | mainAxisAlignment: MainAxisAlignment.center, 44 | crossAxisAlignment: CrossAxisAlignment.center, 45 | children: [ 46 | Icon( 47 | Icons.error_outline, 48 | size: 100, 49 | color: Colors.black54, 50 | ), 51 | Padding( 52 | padding: const EdgeInsets.all(16.0), 53 | child: Text( 54 | trans("Oops, something went wrong"), 55 | style: Theme.of(context).textTheme.bodyMedium, 56 | textAlign: TextAlign.center, 57 | ), 58 | ), 59 | LinkButton(title: trans("Retry"), action: _retry), 60 | ], 61 | ), 62 | ), 63 | ), 64 | ); 65 | } 66 | 67 | _retry() async { 68 | WooSignalApp? wooSignalApp = await (appWooSignal((api) => api.getApp())); 69 | 70 | if (wooSignalApp == null) { 71 | showToastNotification(context, 72 | title: trans("Oops"), description: trans("Retry later")); 73 | return; 74 | } 75 | 76 | AppHelper.instance.appConfig = wooSignalApp; 77 | Navigator.pushNamed(context, "/home"); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /LabelStoreMax/pubspec.yaml: -------------------------------------------------------------------------------- 1 | # Official WooSignal App Template for WooCommerce 2 | 3 | # Label StoreMax 4 | # Version: 6.12.2 5 | # Author: Anthony Gordon 6 | # Homepage: https://woosignal.com 7 | # Documentation: https://woosignal.com/docs/app/label-storemax 8 | 9 | ### Change App Icon 10 | # 1 Replace: public/assets/icon/appicon.png (1024px1024px icon size) 11 | # 2 Run this command from the terminal: "dart run flutter_launcher_icons:main" 12 | 13 | ### Uploading the IOS/Android app 14 | # IOS https://flutter.dev/docs/deployment/ios 15 | # Android https://flutter.dev/docs/deployment/android 16 | 17 | name: flutter_app 18 | description: Label StoreMax 19 | 20 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 21 | 22 | version: 1.0.0+1 23 | 24 | environment: 25 | sdk: '>=3.1.3 <4.0.0' 26 | flutter: ">=3.0.0" 27 | 28 | dependencies: 29 | google_fonts: ^4.0.5 30 | analyzer: ^5.12.0 31 | intl: ^0.18.0 32 | nylo_framework: ^5.13.0 33 | woosignal: ^3.8.1 34 | wp_json_api: ^3.3.3 35 | cached_network_image: ^3.3.0 36 | package_info_plus: ^4.2.0 37 | money_formatter: ^0.0.5 38 | flutter_web_browser: ^0.17.1 39 | webview_flutter: 3.0.4 40 | pull_to_refresh_flutter3: 2.0.2 41 | url_launcher: ^6.2.1 42 | bubble_tab_indicator: ^0.1.5 43 | status_alert: ^1.0.1 44 | math_expressions: ^2.4.0 45 | validated: ^2.0.0 46 | flutter_spinkit: ^5.1.0 47 | auto_size_text: ^3.0.0 48 | html: ^0.15.4 49 | flutter_widget_from_html_core: ^0.14.7 50 | flutter_rating_bar: ^4.0.1 51 | flutter_staggered_grid_view: ^0.7.0 52 | flutter_swiper_view: ^1.1.8 53 | firebase_messaging: ^14.7.6 54 | firebase_core: ^2.24.0 55 | flutter: 56 | sdk: flutter 57 | flutter_localizations: 58 | sdk: flutter 59 | 60 | # The following adds the Cupertino Icons font to your application. 61 | # Use with the CupertinoIcons class for iOS style icons. 62 | cupertino_icons: ^1.0.6 63 | collection: ^1.17.1 64 | flutter_stripe: ^9.6.0 65 | razorpay_flutter: ^1.3.5 66 | animate_do: ^3.1.2 67 | 68 | dependency_overrides: 69 | http: ^1.0.0 70 | 71 | dev_dependencies: 72 | flutter_launcher_icons: ^0.13.1 73 | lints: ^2.1.1 74 | flutter_test: 75 | sdk: flutter 76 | 77 | # APP ICON 78 | flutter_launcher_icons: 79 | android: true 80 | ios: true 81 | image_path: "public/assets/app_icon/appicon.png" 82 | remove_alpha_ios: true 83 | 84 | flutter: 85 | 86 | # The following line ensures that the Material Icons font is 87 | # included with your application, so that you can use the icons in 88 | # the material Icons class. 89 | uses-material-design: true 90 | 91 | # To add assets to your application, add an assets section, like this: 92 | assets: 93 | - public/assets/fonts/ 94 | - public/ 95 | - public/assets/json/ 96 | - public/assets/images/ 97 | - lang/ 98 | - .env 99 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/config/decoders.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_app/app/controllers/account_order_detail_controller.dart'; 2 | import 'package:flutter_app/app/controllers/browse_category_controller.dart'; 3 | import 'package:flutter_app/app/controllers/checkout_status_controller.dart'; 4 | import 'package:flutter_app/app/controllers/leave_review_controller.dart'; 5 | import 'package:flutter_app/app/controllers/product_detail_controller.dart'; 6 | import 'package:flutter_app/app/controllers/product_image_viewer_controller.dart'; 7 | import 'package:flutter_app/app/controllers/product_reviews_controller.dart'; 8 | import 'package:flutter_app/app/models/user.dart'; 9 | import 'package:flutter_app/app/networking/api_service.dart'; 10 | import 'package:nylo_framework/nylo_framework.dart'; 11 | 12 | /* 13 | |-------------------------------------------------------------------------- 14 | | Model Decoders 15 | | ------------------------------------------------------------------------- 16 | | Model decoders are used in 'app/networking/' for morphing json payloads 17 | | into Models. Learn more https://nylo.dev/docs/5.x/decoders#model-decoders 18 | |-------------------------------------------------------------------------- 19 | */ 20 | 21 | final Map modelDecoders = { 22 | // ... 23 | User: (data) => User.fromJson(data) 24 | }; 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | API Decoders 29 | | ------------------------------------------------------------------------- 30 | | API decoders are used when you need to access an API service using the 31 | | 'api' helper. E.g. api((request) => request.fetchData()); 32 | | Learn more https://nylo.dev/docs/5.x/decoders#api-decoders 33 | |-------------------------------------------------------------------------- 34 | */ 35 | 36 | final Map apiDecoders = { 37 | ApiService: ApiService(), 38 | 39 | // ... 40 | }; 41 | 42 | /* 43 | |-------------------------------------------------------------------------- 44 | | Controller Decoders 45 | | ------------------------------------------------------------------------- 46 | | Controller are used in pages. 47 | | E.g. NyPage 48 | | 49 | | Learn more https://nylo.dev/docs/5.x/controllers#using-controllers-with-ny-page 50 | |-------------------------------------------------------------------------- 51 | */ 52 | final Map controllers = { 53 | ProductDetailController: ProductDetailController(), 54 | AccountOrderDetailController: AccountOrderDetailController(), 55 | BrowseCategoryController: BrowseCategoryController(), 56 | CheckoutStatusController: CheckoutStatusController(), 57 | LeaveReviewController: LeaveReviewController(), 58 | ProductImageViewerController: ProductImageViewerController(), 59 | ProductReviewsController: ProductReviewsController() 60 | 61 | // ... 62 | 63 | }; -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/providers/payments/paypal_pay.dart: -------------------------------------------------------------------------------- 1 | // 2 | // LabelCore 3 | // Label StoreMax 4 | // 5 | // Created by Anthony Gordon. 6 | // 2023, WooSignal Ltd. All rights reserved. 7 | // 8 | 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | 14 | import 'package:flutter/material.dart'; 15 | import 'package:flutter_app/app/models/cart_line_item.dart'; 16 | import 'package:flutter_app/bootstrap/data/order_wc.dart'; 17 | import 'package:flutter_app/bootstrap/helpers.dart'; 18 | import 'package:flutter_app/resources/pages/checkout_confirmation_page.dart'; 19 | import 'package:flutter_app/resources/widgets/checkout_paypal.dart'; 20 | import 'package:nylo_framework/nylo_framework.dart'; 21 | import 'package:woosignal/models/payload/order_wc.dart'; 22 | import 'package:woosignal/models/response/order.dart'; 23 | import 'package:woosignal/models/response/tax_rate.dart'; 24 | 25 | payPalPay(context, 26 | {required CheckoutConfirmationPageState state, TaxRate? taxRate}) async { 27 | await checkout(taxRate, (total, billingDetails, cart) async { 28 | List cartLineItems = await cart.getCart(); 29 | String description = await cart.cartShortDesc(); 30 | 31 | await Navigator.push( 32 | context, 33 | MaterialPageRoute( 34 | builder: (_) => PayPalCheckout( 35 | description: description, 36 | amount: total, 37 | cartLineItems: cartLineItems))).then((value) async { 38 | if (value is! Map) { 39 | showToastNotification( 40 | context, 41 | title: trans("Payment Cancelled"), 42 | description: trans("The payment has been cancelled"), 43 | ); 44 | state.reloadState(showLoader: false); 45 | return; 46 | } 47 | 48 | state.reloadState(showLoader: true); 49 | if (value.containsKey("status") && value["status"] == "success") { 50 | OrderWC orderWC = await buildOrderWC(taxRate: taxRate, markPaid: true); 51 | Order? order = await (appWooSignal((api) => api.createOrder(orderWC))); 52 | 53 | if (order == null) { 54 | showToastNotification( 55 | context, 56 | title: trans("Error"), 57 | description: 58 | trans("Something went wrong, please contact our store"), 59 | ); 60 | return; 61 | } 62 | Navigator.pushNamed(context, "/checkout-status", arguments: order); 63 | return; 64 | } else { 65 | showToastNotification( 66 | context, 67 | title: trans("Payment Cancelled"), 68 | description: trans("The payment has been cancelled"), 69 | ); 70 | } 71 | }); 72 | state.reloadState(showLoader: false); 73 | }); 74 | } 75 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/checkout_select_coupon_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/app/models/checkout_session.dart'; 13 | import 'package:nylo_framework/nylo_framework.dart'; 14 | 15 | class CheckoutSelectCouponWidget extends StatelessWidget { 16 | const CheckoutSelectCouponWidget( 17 | {Key? key, 18 | required this.context, 19 | required this.checkoutSession, 20 | required this.resetState}) 21 | : super(key: key); 22 | 23 | final CheckoutSession checkoutSession; 24 | final BuildContext context; 25 | final Function resetState; 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | bool hasCoupon = checkoutSession.coupon != null; 30 | return Container( 31 | height: 50, 32 | padding: EdgeInsets.symmetric(vertical: 5), 33 | child: InkWell( 34 | onTap: _actionCoupon, 35 | child: Row( 36 | crossAxisAlignment: CrossAxisAlignment.center, 37 | mainAxisAlignment: MainAxisAlignment.center, 38 | children: [ 39 | if (hasCoupon == true) 40 | IconButton( 41 | padding: EdgeInsets.symmetric(vertical: 3), 42 | onPressed: _clearCoupon, 43 | icon: Icon( 44 | Icons.close, 45 | size: 19, 46 | )), 47 | Text( 48 | hasCoupon 49 | ? "Coupon Applied: " + checkoutSession.coupon!.code! 50 | : trans('Apply Coupon'), 51 | style: Theme.of(context).textTheme.titleSmall, 52 | ), 53 | ], 54 | ), 55 | ), 56 | ); 57 | } 58 | 59 | _clearCoupon() { 60 | CheckoutSession.getInstance.coupon = null; 61 | resetState(); 62 | } 63 | 64 | _actionCoupon() { 65 | if (checkoutSession.billingDetails!.billingAddress == null) { 66 | showToastNotification( 67 | context, 68 | title: trans("Oops"), 69 | description: 70 | trans("Please select add your billing/shipping address to proceed"), 71 | style: ToastNotificationStyleType.WARNING, 72 | icon: Icons.local_shipping, 73 | ); 74 | 75 | return; 76 | } 77 | if (checkoutSession.billingDetails?.billingAddress?.hasMissingFields() ?? 78 | true) { 79 | showToastNotification( 80 | context, 81 | title: trans("Oops"), 82 | description: trans("Your billing/shipping details are incomplete"), 83 | style: ToastNotificationStyleType.WARNING, 84 | icon: Icons.local_shipping, 85 | ); 86 | return; 87 | } 88 | Navigator.pushNamed(context, "/checkout-coupons") 89 | .then((value) => resetState()); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/product_detail_related_products_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/bootstrap/helpers.dart'; 13 | import 'package:flutter_app/resources/widgets/woosignal_ui.dart'; 14 | import 'package:nylo_framework/nylo_framework.dart'; 15 | import 'package:woosignal/models/response/product.dart'; 16 | import 'package:woosignal/models/response/woosignal_app.dart'; 17 | 18 | class ProductDetailRelatedProductsWidget extends StatelessWidget { 19 | const ProductDetailRelatedProductsWidget( 20 | {Key? key, required this.product, required this.wooSignalApp}) 21 | : super(key: key); 22 | 23 | final Product? product; 24 | final WooSignalApp? wooSignalApp; 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | if (wooSignalApp!.showRelatedProducts == false) { 29 | return SizedBox.shrink(); 30 | } 31 | return ListView( 32 | shrinkWrap: true, 33 | physics: NeverScrollableScrollPhysics(), 34 | children: [ 35 | Container( 36 | height: 50, 37 | padding: EdgeInsets.symmetric(vertical: 4, horizontal: 16), 38 | child: Row( 39 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 40 | crossAxisAlignment: CrossAxisAlignment.center, 41 | children: [ 42 | Text( 43 | trans("Related products"), 44 | style: Theme.of(context) 45 | .textTheme 46 | .bodySmall! 47 | .copyWith(fontSize: 18), 48 | textAlign: TextAlign.left, 49 | ), 50 | ], 51 | ), 52 | ), 53 | Container( 54 | height: 300, 55 | child: NyFutureBuilder>( 56 | future: fetchRelated(), 57 | child: (context, relatedProducts) { 58 | if (relatedProducts == null) return SizedBox.shrink(); 59 | 60 | if (relatedProducts.isEmpty) { 61 | return SizedBox.shrink(); 62 | } 63 | return ListView( 64 | shrinkWrap: true, 65 | scrollDirection: Axis.horizontal, 66 | children: relatedProducts 67 | .map((e) => Container( 68 | width: MediaQuery.of(context).size.width / 2.2, 69 | child: ProductItemContainer(product: e))) 70 | .toList(), 71 | ); 72 | }, 73 | ), 74 | ), 75 | ], 76 | ); 77 | } 78 | 79 | Future> fetchRelated() async => await (appWooSignal( 80 | (api) => api.getProducts(perPage: 100, include: product!.relatedIds, status: "publish"), 81 | )); 82 | } 83 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/providers/payments/razorpay_pay.dart: -------------------------------------------------------------------------------- 1 | // 2 | // LabelCore 3 | // Label StoreMAX 4 | // 5 | // Created by Anthony Gordon. 6 | // 2023, WooSignal Ltd. All rights reserved. 7 | // 8 | 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // 13 | 14 | import 'package:flutter/widgets.dart'; 15 | import 'package:flutter_app/app/models/cart.dart'; 16 | import 'package:flutter_app/bootstrap/data/order_wc.dart'; 17 | import 'package:flutter_app/bootstrap/helpers.dart'; 18 | import 'package:flutter_app/resources/pages/checkout_confirmation_page.dart'; 19 | import 'package:nylo_framework/nylo_framework.dart'; 20 | import 'package:razorpay_flutter/razorpay_flutter.dart'; 21 | import 'package:woosignal/models/response/tax_rate.dart'; 22 | import 'package:woosignal/models/payload/order_wc.dart'; 23 | import 'package:woosignal/models/response/order.dart'; 24 | 25 | razorPay(context, 26 | {required CheckoutConfirmationPageState state, TaxRate? taxRate}) async { 27 | Razorpay razorpay = Razorpay(); 28 | 29 | razorpay.on(Razorpay.EVENT_PAYMENT_SUCCESS, 30 | (PaymentSuccessResponse response) async { 31 | OrderWC orderWC = await buildOrderWC(taxRate: taxRate); 32 | 33 | Order? order = await appWooSignal((api) => api.createOrder(orderWC)); 34 | 35 | if (order != null) { 36 | showToastNotification( 37 | context, 38 | title: "Error".tr(), 39 | description: trans("Something went wrong, please contact our store"), 40 | ); 41 | state.reloadState(showLoader: false); 42 | return; 43 | } 44 | Cart.getInstance.clear(); 45 | Navigator.pushNamed(context, "/checkout-status", arguments: order); 46 | }); 47 | 48 | razorpay.on(Razorpay.EVENT_PAYMENT_ERROR, (PaymentFailureResponse response) { 49 | showToastNotification(context, 50 | title: trans("Error"), 51 | description: response.message ?? "", 52 | style: ToastNotificationStyleType.WARNING); 53 | state.reloadState(showLoader: false); 54 | }); 55 | 56 | razorpay.on(Razorpay.EVENT_EXTERNAL_WALLET, _handleExternalWallet); 57 | 58 | // CHECKOUT HELPER 59 | await checkout(taxRate, (total, billingDetails, cart) async { 60 | var options = { 61 | 'key': getEnv('RAZORPAY_API_KEY'), 62 | 'amount': (double.parse(total) * 100).toInt(), 63 | 'name': getEnv('APP_NAME'), 64 | 'description': await cart.cartShortDesc(), 65 | 'prefill': { 66 | "name": [ 67 | billingDetails!.billingAddress?.firstName, 68 | billingDetails.billingAddress?.lastName 69 | ].where((t) => t != null || t != "").toList().join(" "), 70 | "method": "card", 71 | 'email': billingDetails.billingAddress?.emailAddress ?? "" 72 | } 73 | }; 74 | 75 | state.reloadState(showLoader: true); 76 | 77 | razorpay.open(options); 78 | }); 79 | } 80 | 81 | void _handleExternalWallet(ExternalWalletResponse response) {} -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/firebase_options.dart: -------------------------------------------------------------------------------- 1 | // ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members 2 | import 'package:firebase_core/firebase_core.dart' show FirebaseOptions; 3 | import 'package:flutter/foundation.dart' 4 | show defaultTargetPlatform, kIsWeb, TargetPlatform; 5 | import 'package:flutter_app/bootstrap/app_helper.dart'; 6 | 7 | /// Default [FirebaseOptions] for use with your Firebase apps. 8 | class DefaultFirebaseOptions { 9 | static FirebaseOptions get currentPlatform { 10 | if (kIsWeb) { 11 | throw UnsupportedError( 12 | 'DefaultFirebaseOptions have not been configured for web - ' 13 | 'you can reconfigure this by running the FlutterFire CLI again.', 14 | ); 15 | } 16 | switch (defaultTargetPlatform) { 17 | case TargetPlatform.android: 18 | if (AppHelper.instance.appConfig?.firebaseOptionsAndroid == null) { 19 | throw UnsupportedError( 20 | 'Add a valid Firebase json config on https://woosignal.com for your WooCommerce store', 21 | ); 22 | } 23 | return FirebaseOptions( 24 | apiKey: AppHelper.instance.appConfig!.firebaseOptionsAndroid!['apiKey'], 25 | appId: AppHelper.instance.appConfig!.firebaseOptionsAndroid!['appId'], 26 | messagingSenderId: AppHelper.instance.appConfig!.firebaseOptionsAndroid!['messagingSenderId'], 27 | projectId: AppHelper.instance.appConfig!.firebaseOptionsAndroid!['projectId'], 28 | storageBucket: AppHelper.instance.appConfig!.firebaseOptionsAndroid!['storageBucket'], 29 | ); 30 | case TargetPlatform.iOS: 31 | if (AppHelper.instance.appConfig?.firebaseOptionsIos == null) { 32 | throw UnsupportedError( 33 | 'Add a valid Firebase plist config on https://woosignal.com for your WooCommerce store', 34 | ); 35 | } 36 | return FirebaseOptions( 37 | apiKey: AppHelper.instance.appConfig!.firebaseOptionsIos!['apiKey'], 38 | appId: AppHelper.instance.appConfig!.firebaseOptionsIos!['appId'], 39 | messagingSenderId: AppHelper.instance.appConfig!.firebaseOptionsIos!['messagingSenderId'], 40 | projectId: AppHelper.instance.appConfig!.firebaseOptionsIos!['projectId'], 41 | storageBucket: AppHelper.instance.appConfig!.firebaseOptionsIos!['storageBucket'], 42 | iosClientId: AppHelper.instance.appConfig!.firebaseOptionsIos!['iosClientId'], 43 | iosBundleId: AppHelper.instance.appConfig!.firebaseOptionsIos!['iosBundleId'], 44 | ); 45 | case TargetPlatform.macOS: 46 | throw UnsupportedError( 47 | 'DefaultFirebaseOptions have not been configured for macos - ' 48 | 'you can reconfigure this by running the FlutterFire CLI again.', 49 | ); 50 | case TargetPlatform.windows: 51 | throw UnsupportedError( 52 | 'DefaultFirebaseOptions have not been configured for windows - ' 53 | 'you can reconfigure this by running the FlutterFire CLI again.', 54 | ); 55 | case TargetPlatform.linux: 56 | throw UnsupportedError( 57 | 'DefaultFirebaseOptions have not been configured for linux - ' 58 | 'you can reconfigure this by running the FlutterFire CLI again.', 59 | ); 60 | default: 61 | throw UnsupportedError( 62 | 'DefaultFirebaseOptions are not supported for this platform.', 63 | ); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/product_detail_review_tile_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/bootstrap/helpers.dart'; 13 | import 'package:flutter_rating_bar/flutter_rating_bar.dart'; 14 | import 'package:nylo_framework/nylo_framework.dart'; 15 | import 'package:woosignal/models/response/product_review.dart'; 16 | 17 | class ProductDetailReviewTileWidget extends StatefulWidget { 18 | ProductDetailReviewTileWidget({Key? key, required this.productReview}); 19 | final ProductReview productReview; 20 | 21 | @override 22 | _ProductDetailReviewTileWidgetState createState() => 23 | _ProductDetailReviewTileWidgetState(); 24 | } 25 | 26 | class _ProductDetailReviewTileWidgetState 27 | extends State { 28 | int? _maxLines = 3; 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return Container( 33 | padding: EdgeInsets.only(top: 5, left: 16, right: 16), 34 | child: Column( 35 | crossAxisAlignment: CrossAxisAlignment.start, 36 | mainAxisAlignment: MainAxisAlignment.spaceAround, 37 | children: [ 38 | Row( 39 | crossAxisAlignment: CrossAxisAlignment.center, 40 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 41 | children: [ 42 | RatingBarIndicator( 43 | rating: widget.productReview.rating!.toDouble(), 44 | itemBuilder: (context, index) => Icon( 45 | Icons.star, 46 | color: Colors.amber, 47 | ), 48 | itemCount: 5, 49 | itemSize: 20.0, 50 | direction: Axis.horizontal, 51 | ), 52 | Text(widget.productReview.reviewer!), 53 | Text( 54 | formatDateTime("MMM d, yyyy").format( 55 | parseDateTime(widget.productReview.dateCreated!), 56 | ), 57 | ), 58 | ], 59 | ), 60 | ListTile( 61 | title: Container( 62 | margin: EdgeInsets.only(top: 10), 63 | child: Text(parseHtmlString(widget.productReview.review), 64 | maxLines: _maxLines, 65 | overflow: _maxLines != null 66 | ? TextOverflow.ellipsis 67 | : TextOverflow.visible), 68 | ), 69 | contentPadding: EdgeInsets.all(0), 70 | minVerticalPadding: 0), 71 | if (_maxLines != null && widget.productReview.review!.length > 115) 72 | InkWell( 73 | child: Text(trans("More"), 74 | style: Theme.of(context) 75 | .textTheme 76 | .bodyMedium! 77 | .copyWith(fontWeight: FontWeight.bold)), 78 | onTap: () => setState(() { 79 | _maxLines = null; 80 | }), 81 | ) 82 | ], 83 | ), 84 | decoration: BoxDecoration( 85 | border: Border( 86 | bottom: BorderSide(color: Colors.black12, width: 1), 87 | )), 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/product_detail_description_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/resources/widgets/woosignal_ui.dart'; 13 | import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart'; 14 | import 'package:nylo_framework/nylo_framework.dart'; 15 | import 'package:url_launcher/url_launcher.dart'; 16 | import 'package:woosignal/models/response/product.dart'; 17 | 18 | class ProductDetailDescriptionWidget extends StatelessWidget { 19 | const ProductDetailDescriptionWidget({Key? key, required this.product}) 20 | : super(key: key); 21 | 22 | final Product? product; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | if (product!.shortDescription!.isEmpty && product!.description!.isEmpty) { 27 | return SizedBox.shrink(); 28 | } 29 | 30 | return ListView( 31 | shrinkWrap: true, 32 | physics: NeverScrollableScrollPhysics(), 33 | children: [ 34 | Container( 35 | height: 50, 36 | padding: EdgeInsets.symmetric(vertical: 4, horizontal: 16), 37 | child: Row( 38 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 39 | crossAxisAlignment: CrossAxisAlignment.center, 40 | children: [ 41 | Text( 42 | trans("Description"), 43 | style: Theme.of(context) 44 | .textTheme 45 | .bodySmall! 46 | .copyWith(fontSize: 18), 47 | textAlign: TextAlign.left, 48 | ), 49 | if (product!.shortDescription!.isNotEmpty && 50 | product!.description!.isNotEmpty) 51 | MaterialButton( 52 | child: Text( 53 | trans("Full description"), 54 | style: Theme.of(context) 55 | .textTheme 56 | .bodyMedium! 57 | .copyWith(fontSize: 14), 58 | textAlign: TextAlign.right, 59 | overflow: TextOverflow.ellipsis, 60 | ), 61 | height: 50, 62 | minWidth: 60, 63 | onPressed: () => _modalBottomSheetMenu(context), 64 | ), 65 | ], 66 | ), 67 | ), 68 | Container( 69 | padding: EdgeInsets.symmetric(vertical: 4, horizontal: 16), 70 | child: HtmlWidget( 71 | product!.shortDescription!.isNotEmpty 72 | ? product!.shortDescription! 73 | : product!.description!, 74 | renderMode: RenderMode.column, onTapUrl: (String url) async { 75 | await launchUrl(Uri.parse(url)); 76 | return true; 77 | }, textStyle: Theme.of(context).textTheme.bodyMedium), 78 | ), 79 | ], 80 | ); 81 | } 82 | 83 | _modalBottomSheetMenu(BuildContext context) { 84 | wsModalBottom( 85 | context, 86 | title: trans("Description"), 87 | bodyWidget: SingleChildScrollView( 88 | child: HtmlWidget(product!.description!), 89 | ), 90 | ); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/themes/light_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_app/bootstrap/app_helper.dart'; 4 | import 'package:flutter_app/config/font.dart'; 5 | import 'package:flutter_app/resources/themes/styles/color_styles.dart'; 6 | import 'package:flutter_app/resources/themes/text_theme/default_text_theme.dart'; 7 | import 'package:google_fonts/google_fonts.dart'; 8 | import 'package:nylo_framework/nylo_framework.dart'; 9 | 10 | /* 11 | |-------------------------------------------------------------------------- 12 | | Light Theme 13 | | 14 | | Theme Config - config/theme.dart 15 | |-------------------------------------------------------------------------- 16 | */ 17 | 18 | ThemeData lightTheme(ColorStyles lightColors) { 19 | try { 20 | appFont = GoogleFonts.getFont( 21 | AppHelper.instance.appConfig!.themeFont ?? "Poppins"); 22 | } on Exception catch (e) { 23 | if (getEnv('APP_DEBUG') == true) { 24 | NyLogger.error(e.toString()); 25 | } 26 | } 27 | 28 | TextTheme lightTheme = 29 | getAppTextTheme(appFont, defaultTextTheme.merge(_textTheme(lightColors))); 30 | 31 | return ThemeData( 32 | useMaterial3: true, 33 | primaryColor: lightColors.primaryContent, 34 | primaryColorLight: lightColors.primaryAccent, 35 | focusColor: lightColors.primaryContent, 36 | scaffoldBackgroundColor: lightColors.background, 37 | hintColor: lightColors.primaryAccent, 38 | appBarTheme: AppBarTheme( 39 | backgroundColor: lightColors.appBarBackground, 40 | titleTextStyle: lightTheme.titleLarge! 41 | .copyWith(color: lightColors.appBarPrimaryContent), 42 | iconTheme: IconThemeData(color: lightColors.appBarPrimaryContent), 43 | elevation: 1.0, 44 | systemOverlayStyle: SystemUiOverlayStyle.dark, 45 | ), 46 | buttonTheme: ButtonThemeData( 47 | buttonColor: lightColors.buttonPrimaryContent, 48 | colorScheme: ColorScheme.light(primary: lightColors.buttonBackground), 49 | ), 50 | textButtonTheme: TextButtonThemeData( 51 | style: TextButton.styleFrom(foregroundColor: lightColors.primaryContent), 52 | ), 53 | elevatedButtonTheme: ElevatedButtonThemeData( 54 | style: TextButton.styleFrom( 55 | foregroundColor: lightColors.buttonPrimaryContent, 56 | backgroundColor: lightColors.buttonBackground), 57 | ), 58 | bottomNavigationBarTheme: BottomNavigationBarThemeData( 59 | backgroundColor: lightColors.bottomTabBarBackground, 60 | unselectedIconTheme: 61 | IconThemeData(color: lightColors.bottomTabBarIconUnselected), 62 | selectedIconTheme: 63 | IconThemeData(color: lightColors.bottomTabBarIconSelected), 64 | unselectedLabelStyle: 65 | TextStyle(color: lightColors.bottomTabBarLabelUnselected), 66 | selectedLabelStyle: 67 | TextStyle(color: lightColors.bottomTabBarLabelSelected), 68 | selectedItemColor: lightColors.bottomTabBarLabelSelected, 69 | ), 70 | textTheme: lightTheme, 71 | colorScheme: 72 | ColorScheme.light().copyWith(background: lightColors.background), 73 | ); 74 | } 75 | 76 | /* 77 | |-------------------------------------------------------------------------- 78 | | Light Text Theme 79 | |-------------------------------------------------------------------------- 80 | */ 81 | 82 | TextTheme _textTheme(ColorStyles colors) { 83 | Color primaryContent = colors.primaryContent; 84 | TextTheme textTheme = TextTheme().apply(displayColor: primaryContent); 85 | return textTheme.copyWith( 86 | labelLarge: TextStyle(color: primaryContent.withOpacity(0.8)), 87 | bodyMedium: TextStyle(color: primaryContent.withOpacity(0.8)), 88 | ); 89 | } 90 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/themes/dark_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:flutter_app/bootstrap/app_helper.dart'; 4 | import 'package:flutter_app/config/font.dart'; 5 | import 'package:flutter_app/resources/themes/styles/color_styles.dart'; 6 | import 'package:flutter_app/resources/themes/text_theme/default_text_theme.dart'; 7 | import 'package:google_fonts/google_fonts.dart'; 8 | import 'package:nylo_framework/nylo_framework.dart'; 9 | 10 | /* 11 | |-------------------------------------------------------------------------- 12 | | Dark Theme 13 | | 14 | | Theme Config - config/theme.dart 15 | |-------------------------------------------------------------------------- 16 | */ 17 | 18 | ThemeData darkTheme(ColorStyles darkColors) { 19 | try { 20 | appFont = GoogleFonts.getFont( 21 | AppHelper.instance.appConfig!.themeFont ?? "Poppins"); 22 | } on Exception catch (e) { 23 | if (getEnv('APP_DEBUG') == true) { 24 | NyLogger.error(e.toString()); 25 | } 26 | } 27 | 28 | TextTheme darkTheme = 29 | getAppTextTheme(appFont, defaultTextTheme.merge(_textTheme(darkColors))); 30 | return ThemeData( 31 | primaryColor: darkColors.primaryContent, 32 | primaryColorDark: darkColors.primaryContent, 33 | brightness: Brightness.dark, 34 | focusColor: darkColors.primaryContent, 35 | scaffoldBackgroundColor: darkColors.background, 36 | appBarTheme: AppBarTheme( 37 | backgroundColor: darkColors.appBarBackground, 38 | titleTextStyle: darkTheme.titleLarge! 39 | .copyWith(color: darkColors.appBarPrimaryContent), 40 | iconTheme: IconThemeData(color: darkColors.appBarPrimaryContent), 41 | elevation: 1.0, 42 | systemOverlayStyle: SystemUiOverlayStyle.light), 43 | buttonTheme: ButtonThemeData( 44 | buttonColor: darkColors.primaryAccent, 45 | colorScheme: ColorScheme.light(primary: darkColors.buttonBackground), 46 | ), 47 | textButtonTheme: TextButtonThemeData( 48 | style: TextButton.styleFrom(foregroundColor: darkColors.primaryContent), 49 | ), 50 | elevatedButtonTheme: ElevatedButtonThemeData( 51 | style: TextButton.styleFrom( 52 | foregroundColor: darkColors.buttonPrimaryContent, 53 | backgroundColor: darkColors.buttonBackground), 54 | ), 55 | bottomNavigationBarTheme: BottomNavigationBarThemeData( 56 | backgroundColor: darkColors.bottomTabBarBackground, 57 | unselectedIconTheme: 58 | IconThemeData(color: darkColors.bottomTabBarIconUnselected), 59 | selectedIconTheme: 60 | IconThemeData(color: darkColors.bottomTabBarIconSelected), 61 | unselectedLabelStyle: 62 | TextStyle(color: darkColors.bottomTabBarLabelUnselected), 63 | selectedLabelStyle: 64 | TextStyle(color: darkColors.bottomTabBarLabelSelected), 65 | selectedItemColor: darkColors.bottomTabBarLabelSelected, 66 | ), 67 | textTheme: darkTheme, 68 | colorScheme: ColorScheme.dark().copyWith(background: darkColors.background), 69 | ); 70 | } 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | Dark Text Theme 75 | |-------------------------------------------------------------------------- 76 | */ 77 | 78 | TextTheme _textTheme(ColorStyles colors) { 79 | Color primaryContent = colors.primaryContent; 80 | TextTheme textTheme = TextTheme().apply(displayColor: primaryContent); 81 | return textTheme.copyWith( 82 | titleLarge: TextStyle(color: primaryContent.withOpacity(0.8)), 83 | labelLarge: TextStyle(color: primaryContent.withOpacity(0.8)), 84 | bodySmall: TextStyle(color: primaryContent.withOpacity(0.8)), 85 | bodyMedium: TextStyle(color: primaryContent.withOpacity(0.8))); 86 | } 87 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/pages/account_delete_page.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/bootstrap/shared_pref/sp_auth.dart'; 13 | import 'package:flutter_app/resources/widgets/buttons.dart'; 14 | import 'package:flutter_app/resources/widgets/safearea_widget.dart'; 15 | import 'package:nylo_framework/nylo_framework.dart'; 16 | import 'package:wp_json_api/models/responses/wp_user_delete_response.dart'; 17 | import 'package:wp_json_api/wp_json_api.dart'; 18 | 19 | class AccountDeletePage extends StatefulWidget { 20 | AccountDeletePage({Key? key}) : super(key: key); 21 | 22 | @override 23 | _AccountDeletePageState createState() => _AccountDeletePageState(); 24 | } 25 | 26 | class _AccountDeletePageState extends NyState { 27 | @override 28 | init() async {} 29 | 30 | @override 31 | void dispose() { 32 | super.dispose(); 33 | } 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return Scaffold( 38 | appBar: AppBar( 39 | title: Text(trans("Delete Account")), 40 | ), 41 | body: SafeAreaWidget( 42 | child: Column( 43 | crossAxisAlignment: CrossAxisAlignment.center, 44 | mainAxisAlignment: MainAxisAlignment.spaceAround, 45 | children: [ 46 | Expanded( 47 | child: Column( 48 | crossAxisAlignment: CrossAxisAlignment.center, 49 | mainAxisAlignment: MainAxisAlignment.center, 50 | children: [ 51 | Icon(Icons.no_accounts_rounded, size: 50), 52 | Text( 53 | trans("Delete your account"), 54 | style: textTheme.displaySmall, 55 | ), 56 | Padding( 57 | padding: const EdgeInsets.only(top: 18), 58 | child: Text(trans("Are you sure?")), 59 | ), 60 | ], 61 | ), 62 | ), 63 | Column( 64 | crossAxisAlignment: CrossAxisAlignment.center, 65 | mainAxisAlignment: MainAxisAlignment.spaceAround, 66 | children: [ 67 | PrimaryButton( 68 | title: trans("Yes, delete my account"), 69 | isLoading: isLocked('delete_account'), 70 | action: _deleteAccount, 71 | ), 72 | LinkButton(title: trans("Back"), action: pop) 73 | ], 74 | ) 75 | ], 76 | )), 77 | ); 78 | } 79 | 80 | _deleteAccount() async { 81 | await lockRelease('delete_account', perform: () async { 82 | String? userToken = await readAuthToken(); 83 | 84 | WPUserDeleteResponse? wpUserDeleteResponse; 85 | try { 86 | wpUserDeleteResponse = await WPJsonAPI.instance 87 | .api((request) => request.wpUserDelete(userToken)); 88 | } on Exception catch (e) { 89 | NyLogger.error(e.toString()); 90 | showToastNotification( 91 | context, 92 | title: trans("Oops!"), 93 | description: trans("Something went wrong"), 94 | style: ToastNotificationStyleType.DANGER, 95 | ); 96 | } 97 | 98 | if (wpUserDeleteResponse != null) { 99 | showToast( 100 | title: trans("Success"), description: trans("Account deleted")); 101 | await authLogout(context); 102 | } 103 | }); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/models/billing_details.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter_app/app/models/customer_address.dart'; 12 | 13 | class BillingDetails { 14 | CustomerAddress? billingAddress; 15 | CustomerAddress? shippingAddress; 16 | bool? rememberDetails; 17 | 18 | BillingDetails(); 19 | 20 | void initSession() { 21 | billingAddress = CustomerAddress(); 22 | shippingAddress = CustomerAddress(); 23 | } 24 | 25 | Map createStripeDetails() => { 26 | 'address': { 27 | if (billingAddress?.addressLine != null) 28 | 'line1': billingAddress?.addressLine, 29 | if (billingAddress?.city != null) 'city': billingAddress?.city, 30 | if (billingAddress?.postalCode != null) 31 | 'postal_code': billingAddress?.postalCode, 32 | if (billingAddress?.customerCountry?.state?.name != null) 33 | 'state': billingAddress?.customerCountry?.state?.name, 34 | if (billingAddress?.customerCountry?.countryCode != null) 35 | 'country': billingAddress?.customerCountry?.countryCode, 36 | }, 37 | 'shipping': { 38 | if (shippingAddress?.nameFull() != null) 39 | 'name': shippingAddress?.nameFull(), 40 | if (shippingAddress?.city != null) 'city': shippingAddress?.city, 41 | if (shippingAddress?.postalCode != null) 42 | 'postal_code': shippingAddress?.postalCode, 43 | if (shippingAddress?.customerCountry?.state?.name != null) 44 | 'state': shippingAddress?.customerCountry?.state?.name, 45 | if (shippingAddress?.customerCountry?.countryCode != null) 46 | 'country': shippingAddress?.customerCountry?.countryCode, 47 | }, 48 | if (billingAddress?.emailAddress != null) 49 | 'email': billingAddress?.emailAddress, 50 | if (billingAddress?.nameFull() != null) 51 | 'name': billingAddress?.nameFull(), 52 | if (billingAddress?.phoneNumber != null) 53 | 'phone': billingAddress?.phoneNumber 54 | }; 55 | 56 | Map getShippingAddressStripe() => { 57 | "name": shippingAddress?.nameFull(), 58 | "line1": shippingAddress!.addressLine, 59 | "city": shippingAddress!.city, 60 | "postal_code": shippingAddress!.postalCode, 61 | "country": (shippingAddress?.customerCountry?.name ?? "") 62 | }; 63 | 64 | fromWpMeta(Map data) async { 65 | final Map shippingDetailsWpMeta = {}, 66 | billingDetailsWpMeta = {}; 67 | 68 | shippingDetailsWpMeta.addEntries(data.entries 69 | .where((element) => element.key.startsWith("shipping_")) 70 | .map((shippingMeta) => MapEntry( 71 | shippingMeta.key.replaceAll("shipping_", ""), shippingMeta.value))); 72 | billingDetailsWpMeta.addEntries(data.entries 73 | .where((element) => element.key.startsWith("billing_")) 74 | .map((billingMeta) => MapEntry( 75 | billingMeta.key.replaceAll("billing_", ""), billingMeta.value))); 76 | 77 | CustomerAddress billingCustomerAddress = CustomerAddress(); 78 | await billingCustomerAddress.fromWpMetaData(billingDetailsWpMeta); 79 | 80 | CustomerAddress shippingCustomerAddress = CustomerAddress(); 81 | await shippingCustomerAddress.fromWpMetaData(shippingDetailsWpMeta); 82 | 83 | billingAddress = billingCustomerAddress; 84 | shippingAddress = shippingCustomerAddress; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/app/models/shipping_type.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | import 'package:flutter_app/bootstrap/helpers.dart'; 11 | import 'package:woosignal/models/response/shipping_method.dart'; 12 | 13 | class ShippingType { 14 | String? methodId; 15 | String cost; 16 | String? minimumValue; 17 | dynamic object; 18 | 19 | ShippingType( 20 | {required this.methodId, 21 | this.object, 22 | required this.cost, 23 | required this.minimumValue}); 24 | 25 | Map toJson() => { 26 | 'methodId': methodId, 27 | 'object': object, 28 | 'cost': cost, 29 | 'minimumValue': minimumValue 30 | }; 31 | 32 | String? getTotal({bool withFormatting = false}) { 33 | if (object != null) { 34 | switch (methodId) { 35 | case "flat_rate": 36 | FlatRate? flatRate = (object as FlatRate?); 37 | return (withFormatting == true 38 | ? formatStringCurrency(total: cost) 39 | : flatRate!.cost); 40 | case "free_shipping": 41 | FreeShipping? freeShipping = (object as FreeShipping?); 42 | return (withFormatting == true 43 | ? formatStringCurrency(total: cost) 44 | : freeShipping!.cost); 45 | case "local_pickup": 46 | LocalPickup? localPickup = (object as LocalPickup?); 47 | return (withFormatting == true 48 | ? formatStringCurrency(total: cost) 49 | : localPickup!.cost); 50 | default: 51 | return "0"; 52 | } 53 | } 54 | return "0"; 55 | } 56 | 57 | String? getTitle() { 58 | if (object != null) { 59 | switch (methodId) { 60 | case "flat_rate": 61 | FlatRate flatRate = (object as FlatRate); 62 | return flatRate.title; 63 | case "free_shipping": 64 | FreeShipping freeShipping = (object as FreeShipping); 65 | return freeShipping.title; 66 | case "local_pickup": 67 | LocalPickup localPickup = (object as LocalPickup); 68 | return localPickup.title; 69 | default: 70 | return ""; 71 | } 72 | } 73 | return ""; 74 | } 75 | 76 | Map? toShippingLineFee() { 77 | if (object != null) { 78 | Map tmpShippingLinesObj = {}; 79 | 80 | switch (methodId) { 81 | case "flat_rate": 82 | FlatRate flatRate = (object as FlatRate); 83 | tmpShippingLinesObj["method_title"] = flatRate.title; 84 | tmpShippingLinesObj["method_id"] = flatRate.methodId; 85 | tmpShippingLinesObj["total"] = cost; 86 | break; 87 | case "free_shipping": 88 | FreeShipping freeShipping = (object as FreeShipping); 89 | tmpShippingLinesObj["method_title"] = freeShipping.title; 90 | tmpShippingLinesObj["method_id"] = freeShipping.methodId; 91 | tmpShippingLinesObj["total"] = cost; 92 | break; 93 | case "local_pickup": 94 | LocalPickup localPickup = (object as LocalPickup); 95 | tmpShippingLinesObj["method_title"] = localPickup.title; 96 | tmpShippingLinesObj["method_id"] = localPickup.methodId; 97 | tmpShippingLinesObj["total"] = cost; 98 | break; 99 | default: 100 | return null; 101 | } 102 | return tmpShippingLinesObj; 103 | } 104 | 105 | return null; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /LabelStoreMax/lib/resources/widgets/product_detail_upsell_widget.dart: -------------------------------------------------------------------------------- 1 | // Label StoreMax 2 | // 3 | // Created by Anthony Gordon. 4 | // 2023, WooSignal Ltd. All rights reserved. 5 | // 6 | 7 | // Unless required by applicable law or agreed to in writing, software 8 | // distributed under the License is distributed on an "AS IS" BASIS, 9 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 10 | 11 | import 'package:flutter/material.dart'; 12 | import 'package:flutter_app/app/controllers/product_loader_controller.dart'; 13 | import 'package:flutter_app/resources/widgets/app_loader_widget.dart'; 14 | import 'package:flutter_app/resources/widgets/woosignal_ui.dart'; 15 | import 'package:nylo_framework/nylo_framework.dart'; 16 | import 'package:woosignal/models/response/product.dart'; 17 | import 'package:woosignal/models/response/woosignal_app.dart'; 18 | 19 | class ProductDetailUpsellWidget extends StatefulWidget { 20 | ProductDetailUpsellWidget( 21 | {required this.productIds, required this.wooSignalApp}); 22 | final List? productIds; 23 | final WooSignalApp? wooSignalApp; 24 | 25 | @override 26 | _ProductDetailUpsellWidgetState createState() => 27 | _ProductDetailUpsellWidgetState(); 28 | } 29 | 30 | class _ProductDetailUpsellWidgetState extends State { 31 | final ProductLoaderController _productLoaderController = 32 | ProductLoaderController(); 33 | 34 | bool _isLoading = true; 35 | 36 | @override 37 | void initState() { 38 | super.initState(); 39 | fetchProducts(); 40 | } 41 | 42 | @override 43 | Widget build(BuildContext context) { 44 | List products = _productLoaderController.getResults(); 45 | if (widget.productIds!.isEmpty || 46 | products.isEmpty || 47 | widget.wooSignalApp!.showUpsellProducts == false) { 48 | return SizedBox.shrink(); 49 | } 50 | 51 | if (_isLoading == true) { 52 | return AppLoaderWidget(); 53 | } 54 | 55 | return ListView( 56 | shrinkWrap: true, 57 | physics: NeverScrollableScrollPhysics(), 58 | children: [ 59 | Container( 60 | height: 50, 61 | padding: EdgeInsets.symmetric(vertical: 4, horizontal: 16), 62 | child: Row( 63 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 64 | crossAxisAlignment: CrossAxisAlignment.center, 65 | children: [ 66 | Text( 67 | trans("${trans('You may also like')}…"), 68 | style: Theme.of(context) 69 | .textTheme 70 | .bodySmall! 71 | .copyWith(fontSize: 18), 72 | textAlign: TextAlign.left, 73 | ), 74 | ], 75 | ), 76 | ), 77 | Container( 78 | height: 300, 79 | child: ListView( 80 | shrinkWrap: true, 81 | scrollDirection: Axis.horizontal, 82 | children: products 83 | .map( 84 | (e) => Container( 85 | width: MediaQuery.of(context).size.width / 2.2, 86 | child: ProductItemContainer(product: e), 87 | ), 88 | ) 89 | .toList(), 90 | ), 91 | ), 92 | ], 93 | ); 94 | } 95 | 96 | Future fetchProducts() async { 97 | await _productLoaderController.loadProducts( 98 | hasResults: (result) { 99 | if (result == false) { 100 | return false; 101 | } 102 | return true; 103 | }, 104 | didFinish: () { 105 | if (mounted) { 106 | setState(() { 107 | _isLoading = false; 108 | }); 109 | } 110 | }, 111 | productIds: widget.productIds); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /LabelStoreMax/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | --------------------------------------------------------------------------------