├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── 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-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.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 ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist └── .gitignore ├── lib ├── feature │ ├── product │ │ ├── presentation │ │ │ ├── widgets │ │ │ │ ├── completed_order_card.dart │ │ │ │ ├── back_app_bar.dart │ │ │ │ ├── default_app_bar.dart │ │ │ │ ├── carousel_card.dart │ │ │ │ ├── transaction_button.dart │ │ │ │ ├── product_grid.dart │ │ │ │ ├── home_app_bar.dart │ │ │ │ ├── input_field.dart │ │ │ │ ├── delete_modal_bottom_sheet.dart │ │ │ │ ├── product_card.dart │ │ │ │ └── order_card.dart │ │ │ ├── bloc │ │ │ │ └── cubit │ │ │ │ │ ├── product_state.dart │ │ │ │ │ └── product_cubit.dart │ │ │ └── screens │ │ │ │ └── home │ │ │ │ ├── order │ │ │ │ ├── completed_order.dart │ │ │ │ ├── ongoing_order.dart │ │ │ │ └── order_screen.dart │ │ │ │ ├── home │ │ │ │ ├── carousel_list.dart │ │ │ │ └── most_popular_product_screen.dart │ │ │ │ ├── main_home_screen.dart │ │ │ │ ├── cart │ │ │ │ ├── promo_screen.dart │ │ │ │ ├── choose_shipping_screen.dart │ │ │ │ └── payment_screen.dart │ │ │ │ ├── profile │ │ │ │ └── profile_screen.dart │ │ │ │ └── wallet │ │ │ │ └── wallet_screen.dart │ │ ├── domain │ │ │ ├── entities │ │ │ │ ├── product_entity.dart │ │ │ │ └── carousel_entity.dart │ │ │ ├── usecases │ │ │ │ ├── order_product_usecase.dart │ │ │ │ ├── delete_cart_item.dart │ │ │ │ ├── addto_cart_usecase.dart │ │ │ │ ├── getProductData_usecase.dart │ │ │ │ └── getCarouselData_usecase.dart │ │ │ └── repositories │ │ │ │ └── product_repository.dart │ │ └── data │ │ │ ├── datasource │ │ │ └── network_db │ │ │ │ ├── product_network_db.dart │ │ │ │ └── product_network_db_impl.dart │ │ │ ├── models │ │ │ ├── product_model.dart │ │ │ ├── product_model.g.dart │ │ │ ├── carousel_model.dart │ │ │ └── carousel_model.g.dart │ │ │ └── repositories │ │ │ └── repository_impl.dart │ └── auth │ │ ├── domain │ │ ├── entities │ │ │ └── user_credentail_entity.dart │ │ ├── usecases │ │ │ ├── auth_verifyOTP_usecase.dart │ │ │ ├── auth_sendOTP_usecase.dart │ │ │ ├── forgot_password_usecase.dart │ │ │ ├── createUser_profile_usercase.dart │ │ │ ├── create_user_usecase.dart │ │ │ └── login_user_usecase.dart │ │ └── repositories │ │ │ └── auth_repository.dart │ │ ├── data │ │ ├── datasource │ │ │ └── network_db │ │ │ │ ├── auth_network_db.dart │ │ │ │ └── auth_network_db_impl.dart │ │ └── repositories │ │ │ └── auth_repository_impl.dart │ │ └── presentation │ │ ├── bloc │ │ └── cubit │ │ │ ├── auth_state.dart │ │ │ └── auth_cubit.dart │ │ ├── widgets │ │ ├── back_app_bar.dart │ │ ├── login_button.dart │ │ └── signup_button.dart │ │ └── screens │ │ ├── splash_screen │ │ └── main_splash_screen.dart │ │ └── auth_screens │ │ ├── forgot_password_screen.dart │ │ ├── auth_main_screen.dart │ │ └── phone_auth_screen.dart ├── core │ └── asset_constants.dart ├── main.dart └── injection_container.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── manifest.json └── index.html ├── assets ├── icons │ ├── logo │ │ ├── logo1.png │ │ ├── logo2.png │ │ └── logo_loading.png │ └── general │ │ ├── home │ │ ├── pc.png │ │ ├── all.png │ │ ├── bags.png │ │ ├── toys.png │ │ ├── clothes.png │ │ ├── diamond.png │ │ ├── filter.png │ │ ├── heart.png │ │ ├── kitchen.png │ │ ├── search.png │ │ ├── shoes.png │ │ ├── watch.png │ │ ├── emptycart.png │ │ ├── no_transaction.png │ │ └── notificationbell.png │ │ ├── social │ │ ├── apple.png │ │ ├── google.png │ │ ├── paypal.png │ │ └── facebook.png │ │ └── bottom_nav │ │ ├── cart.png │ │ ├── home.png │ │ ├── orders.png │ │ ├── wallet.png │ │ └── profile.png ├── fonts │ └── ubuntu │ │ ├── Ubuntu-Bold.ttf │ │ └── Ubuntu-Medium.ttf ├── images │ └── illustrations │ │ ├── otp.png │ │ ├── splash_screen1.png │ │ ├── splash_screen2.png │ │ ├── splash_screen3.png │ │ └── splash_screen4.png └── json │ ├── category.json │ ├── carousel.json │ ├── jewellery.json │ ├── kitchen.json │ ├── toys.json │ ├── watch.json │ └── shoes.json ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── evira_shop │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ ├── profile │ │ │ └── AndroidManifest.xml │ │ └── google-services.json │ ├── google-services.json │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── Pink and Green New Product Promotion Beauty Business Facebook Cover.png ├── .metadata ├── README.md ├── .gitignore ├── analysis_options.yaml └── pubspec.yaml /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/widgets/completed_order_card.dart: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /assets/icons/logo/logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/logo/logo1.png -------------------------------------------------------------------------------- /assets/icons/logo/logo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/logo/logo2.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /assets/icons/general/home/pc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/pc.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /assets/icons/general/home/all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/all.png -------------------------------------------------------------------------------- /assets/icons/general/home/bags.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/bags.png -------------------------------------------------------------------------------- /assets/icons/general/home/toys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/toys.png -------------------------------------------------------------------------------- /assets/icons/logo/logo_loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/logo/logo_loading.png -------------------------------------------------------------------------------- /assets/fonts/ubuntu/Ubuntu-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/fonts/ubuntu/Ubuntu-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/ubuntu/Ubuntu-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/fonts/ubuntu/Ubuntu-Medium.ttf -------------------------------------------------------------------------------- /assets/icons/general/home/clothes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/clothes.png -------------------------------------------------------------------------------- /assets/icons/general/home/diamond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/diamond.png -------------------------------------------------------------------------------- /assets/icons/general/home/filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/filter.png -------------------------------------------------------------------------------- /assets/icons/general/home/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/heart.png -------------------------------------------------------------------------------- /assets/icons/general/home/kitchen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/kitchen.png -------------------------------------------------------------------------------- /assets/icons/general/home/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/search.png -------------------------------------------------------------------------------- /assets/icons/general/home/shoes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/shoes.png -------------------------------------------------------------------------------- /assets/icons/general/home/watch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/watch.png -------------------------------------------------------------------------------- /assets/icons/general/social/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/social/apple.png -------------------------------------------------------------------------------- /assets/images/illustrations/otp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/images/illustrations/otp.png -------------------------------------------------------------------------------- /assets/icons/general/home/emptycart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/emptycart.png -------------------------------------------------------------------------------- /assets/icons/general/social/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/social/google.png -------------------------------------------------------------------------------- /assets/icons/general/social/paypal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/social/paypal.png -------------------------------------------------------------------------------- /assets/icons/general/bottom_nav/cart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/bottom_nav/cart.png -------------------------------------------------------------------------------- /assets/icons/general/bottom_nav/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/bottom_nav/home.png -------------------------------------------------------------------------------- /assets/icons/general/bottom_nav/orders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/bottom_nav/orders.png -------------------------------------------------------------------------------- /assets/icons/general/bottom_nav/wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/bottom_nav/wallet.png -------------------------------------------------------------------------------- /assets/icons/general/social/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/social/facebook.png -------------------------------------------------------------------------------- /assets/icons/general/bottom_nav/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/bottom_nav/profile.png -------------------------------------------------------------------------------- /assets/icons/general/home/no_transaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/no_transaction.png -------------------------------------------------------------------------------- /assets/icons/general/home/notificationbell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/icons/general/home/notificationbell.png -------------------------------------------------------------------------------- /assets/images/illustrations/splash_screen1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/images/illustrations/splash_screen1.png -------------------------------------------------------------------------------- /assets/images/illustrations/splash_screen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/images/illustrations/splash_screen2.png -------------------------------------------------------------------------------- /assets/images/illustrations/splash_screen3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/images/illustrations/splash_screen3.png -------------------------------------------------------------------------------- /assets/images/illustrations/splash_screen4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/assets/images/illustrations/splash_screen4.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /Pink and Green New Product Promotion Beauty Business Facebook Cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/Pink and Green New Product Promotion Beauty Business Facebook Cover.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HemantPra389/Evira_Ecommerce/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/evira_shop/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.evira_shop 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/feature/auth/domain/entities/user_credentail_entity.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class UserCredentialEntity { 4 | String email; 5 | String password; 6 | UserCredentialEntity( 7 | {required this.email, required this.password}); 8 | } 9 | -------------------------------------------------------------------------------- /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-6.7-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.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: cbaa754c3fa2ccb4a781d7119ddca162d976f5a9 8 | channel: Day-9 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /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 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /lib/feature/product/domain/entities/product_entity.dart: -------------------------------------------------------------------------------- 1 | class ProductEntity { 2 | String type; 3 | String title; 4 | String price; 5 | List url; 6 | String category; 7 | ProductEntity({ 8 | required this.type, 9 | required this.title, 10 | required this.price, 11 | required this.url, 12 | required this.category 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/feature/product/domain/usecases/order_product_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/product/domain/repositories/product_repository.dart'; 2 | 3 | class OrderProductUseCase { 4 | final ProductRepository repository; 5 | OrderProductUseCase({required this.repository}); 6 | Future orderProductUsecase() async { 7 | await repository.orderProduct(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/feature/product/domain/entities/carousel_entity.dart: -------------------------------------------------------------------------------- 1 | class CarouselEntity { 2 | String type; 3 | String discount; 4 | String heading; 5 | String subtitle; 6 | String image_url; 7 | CarouselEntity({ 8 | required this.type, 9 | required this.discount, 10 | required this.heading, 11 | required this.subtitle, 12 | required this.image_url, 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /lib/feature/product/presentation/bloc/cubit/product_state.dart: -------------------------------------------------------------------------------- 1 | part of 'product_cubit.dart'; 2 | 3 | abstract class ProductState extends Equatable { 4 | const ProductState(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | class ProductInitial extends ProductState {} 11 | 12 | class AddingCartState extends ProductState{} 13 | 14 | class AddedCartSuccess extends ProductState{} 15 | -------------------------------------------------------------------------------- /lib/feature/auth/domain/usecases/auth_verifyOTP_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/auth/domain/repositories/auth_repository.dart'; 2 | 3 | class AuthVerifyOTPUseCase { 4 | final AuthRepository authRepository; 5 | AuthVerifyOTPUseCase({required this.authRepository}); 6 | Future authVerifyOTPUsecase(int otp) async { 7 | return await authRepository.authverifyOTP(otp); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/feature/auth/domain/usecases/auth_sendOTP_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/auth/domain/repositories/auth_repository.dart'; 2 | 3 | class AuthSendOTPUseCase { 4 | final AuthRepository authRepository; 5 | AuthSendOTPUseCase({required this.authRepository}); 6 | Future authSendOTPUseCase(String phoneNumber) async { 7 | return authRepository.authsendOTP(phoneNumber); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/feature/product/domain/usecases/delete_cart_item.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | import 'package:evira_shop/feature/product/domain/repositories/product_repository.dart'; 4 | 5 | class DeleteCartItemUseCase { 6 | final ProductRepository repository; 7 | DeleteCartItemUseCase({required this.repository}); 8 | Future delete_cart_item_usecase(String id) async { 9 | await repository.deleteCartItem(id); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/feature/auth/domain/usecases/forgot_password_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/auth/domain/repositories/auth_repository.dart'; 2 | 3 | class ForgotPasswordUseCase { 4 | final AuthRepository authRepository; 5 | ForgotPasswordUseCase({required this.authRepository}); 6 | Future forgotpasswordusecase(String email) async { 7 | return await authRepository.forgotpassword(email); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/feature/product/domain/usecases/addto_cart_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | import 'package:evira_shop/feature/product/domain/repositories/product_repository.dart'; 6 | 7 | class AddtoCartUseCase { 8 | final ProductRepository repository; 9 | AddtoCartUseCase({required this.repository}); 10 | 11 | Future addtoCartUsecase(Map cartProductData) async { 12 | return repository.addtoCart(cartProductData); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/feature/product/domain/usecases/getProductData_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:evira_shop/feature/product/domain/entities/product_entity.dart'; 3 | import 'package:evira_shop/feature/product/domain/repositories/product_repository.dart'; 4 | 5 | class GetProductDataUseCase { 6 | final ProductRepository repository; 7 | GetProductDataUseCase({required this.repository}); 8 | 9 | Future> getProductData(String filename) async { 10 | return repository.getProductData(filename); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/feature/product/domain/usecases/getCarouselData_usecase.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | import 'package:evira_shop/feature/product/domain/entities/carousel_entity.dart'; 6 | import 'package:evira_shop/feature/product/domain/repositories/product_repository.dart'; 7 | 8 | class GetCarouselDataUseCase { 9 | final ProductRepository repository; 10 | GetCarouselDataUseCase({required this.repository}); 11 | 12 | Future> getCarouselData() async { 13 | return repository.getCarouselData(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/feature/product/data/datasource/network_db/product_network_db.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:evira_shop/feature/product/domain/entities/carousel_entity.dart'; 3 | import 'package:evira_shop/feature/product/domain/entities/product_entity.dart'; 4 | 5 | abstract class ProductNetworkDb{ 6 | Future> getProductData(String filename); 7 | Future> getCarouselData(); 8 | Future addtoCart(Map cartProductData); 9 | Future deleteCartItem(String id); 10 | Future orderProduct(); 11 | 12 | } -------------------------------------------------------------------------------- /lib/feature/auth/domain/usecases/createUser_profile_usercase.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:evira_shop/feature/auth/domain/repositories/auth_repository.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class CreateUserProfileUseCase { 6 | final AuthRepository repository; 7 | CreateUserProfileUseCase({required this.repository}); 8 | Future createUserProfileUseCase(Map usercredentials, 9 | BuildContext context, File image) async { 10 | return await repository.createUserProfile(usercredentials, context, image); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/feature/product/domain/repositories/product_repository.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:evira_shop/feature/product/domain/entities/carousel_entity.dart'; 4 | import 'package:evira_shop/feature/product/domain/entities/product_entity.dart'; 5 | 6 | 7 | abstract class ProductRepository { 8 | Future> getProductData(String filename); 9 | Future> getCarouselData(); 10 | 11 | Future addtoCart(Map cartProductData); 12 | Future deleteCartItem(String id); 13 | Future orderProduct(); 14 | } 15 | -------------------------------------------------------------------------------- /lib/feature/auth/domain/usecases/create_user_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/auth/domain/entities/user_credentail_entity.dart'; 2 | import 'package:evira_shop/feature/auth/domain/repositories/auth_repository.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class CreateUserUsecase { 6 | final AuthRepository repository; 7 | CreateUserUsecase({required this.repository}); 8 | Future createuserUsecase(UserCredentialEntity userCredentialEntity,BuildContext context) async { 9 | return repository.createUser(userCredentialEntity,context); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/feature/auth/domain/usecases/login_user_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/auth/domain/entities/user_credentail_entity.dart'; 2 | import 'package:evira_shop/feature/auth/domain/repositories/auth_repository.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class LoginUserUseCase { 6 | final AuthRepository repository; 7 | LoginUserUseCase({required this.repository}); 8 | Future loginuserusecase( 9 | UserCredentialEntity userCredentialEntity, BuildContext context) async { 10 | return await repository.loginUser(userCredentialEntity, context); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/feature/auth/domain/repositories/auth_repository.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:evira_shop/feature/auth/domain/entities/user_credentail_entity.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | abstract class AuthRepository { 6 | Future createUser( 7 | UserCredentialEntity userCredentialEntity, BuildContext context); 8 | Future loginUser( 9 | UserCredentialEntity userCredentialEntity, BuildContext context); 10 | Future createUserProfile( 11 | Map usercredentials, BuildContext context, File image); 12 | Future forgotpassword(String email); 13 | Future authsendOTP(String phoneNumber); 14 | Future authverifyOTP(int otp); 15 | } 16 | -------------------------------------------------------------------------------- /lib/feature/auth/data/datasource/network_db/auth_network_db.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:evira_shop/feature/auth/domain/entities/user_credentail_entity.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | abstract class AuthNetworkDB { 6 | Future createUser( 7 | UserCredentialEntity userCredentialEntity, BuildContext context); 8 | Future loginUser( 9 | UserCredentialEntity userCredentialEntity, BuildContext context); 10 | Future createUserProfile( 11 | Map usercredentials, BuildContext context, File image); 12 | Future forgotpassword(String email); 13 | Future authsendOTP(String phoneNumber); 14 | Future authverifyOTP(int otp); 15 | } 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Evira Ecommerce 3 | 4 | A Ecommerce based Flutter Project 5 | 6 | 7 | 8 | ## Features 9 | 10 | - Clean Architecture for separation of concern 11 | - Authentication enabled 12 | - User-friendly interface 13 | - Firebase for back-end 14 | - Bloc Statemanagement 15 | 16 | 17 | 18 | ## Optimizations 19 | 20 | - Bloc Statemanagement for seperating the Logic concern. 21 | - Maximum of Bug Fixes 22 | - Clean Architecture for easy maintainance of App 23 | 24 | 25 | 26 | 27 | ## Screenshots 28 | 29 | ![App Screenshot](https://github.com/HemantPra389/Evira_Ecommerce/blob/main/Pink%20and%20Green%20New%20Product%20Promotion%20Beauty%20Business%20Facebook%20Cover.png?raw=true) 30 | 31 | 32 | ## Authors 33 | 34 | - [@HemantPra389](https://github.com/HemantPra389) 35 | -------------------------------------------------------------------------------- /lib/feature/auth/presentation/bloc/cubit/auth_state.dart: -------------------------------------------------------------------------------- 1 | part of 'auth_cubit.dart'; 2 | 3 | abstract class AuthState extends Equatable { 4 | const AuthState(); 5 | 6 | @override 7 | List get props => []; 8 | } 9 | 10 | class AuthInitial extends AuthState {} 11 | 12 | class AuthFailure extends AuthState { 13 | String error; 14 | AuthFailure({required this.error}); 15 | @override 16 | List get props => [error]; 17 | } 18 | 19 | class AuthLoading extends AuthState {} 20 | 21 | class AuthSuccess extends AuthState {} 22 | 23 | //Phone auth state 24 | class AuthCodeSentState extends AuthState{} 25 | 26 | class AuthCodeVerifiedState extends AuthState{} 27 | 28 | class AuthLoggedInState extends AuthState{} 29 | 30 | class AuthLoggedOutState extends AuthState{} -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.13' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/screens/home/order/completed_order.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:evira_shop/core/asset_constants.dart' as asset; 3 | 4 | class CompletedOrder extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Padding( 8 | padding: const EdgeInsets.only(top: 8.0), 9 | child: Center( 10 | child: Column(mainAxisAlignment: MainAxisAlignment.center, children: [ 11 | Image.asset(asset.empty_cart_error, width: 300), 12 | const SizedBox( 13 | height: 20, 14 | ), 15 | Text( 16 | 'No Completed Orders Yet', 17 | textAlign: TextAlign.center, 18 | style: asset.introStyles(22, color: Colors.black54), 19 | ) 20 | ]), 21 | )); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /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 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/feature/product/data/models/product_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/product/domain/entities/product_entity.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | part 'product_model.g.dart'; 4 | 5 | @JsonSerializable() 6 | class ProductModel extends ProductEntity { 7 | String type; 8 | String title; 9 | String price; 10 | List url; 11 | String category; 12 | ProductModel({ 13 | required this.type, 14 | required this.title, 15 | required this.price, 16 | required this.url, 17 | required this.category 18 | }) : super( 19 | type: type, 20 | title: title, 21 | price: price, 22 | url: url, 23 | category: category); 24 | factory ProductModel.fromJson(Map json) => 25 | _$ProductModelFromJson(json); 26 | 27 | Map toJson() => _$ProductModelToJson(this); 28 | } 29 | -------------------------------------------------------------------------------- /.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 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /lib/feature/product/data/models/product_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'product_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | ProductModel _$ProductModelFromJson(Map json) => ProductModel( 10 | type: json['type'] as String, 11 | title: json['title'] as String, 12 | price: json['price'] as String, 13 | url: (json['url'] as List).map((e) => e as String).toList(), 14 | category: json['category'] as String 15 | ); 16 | 17 | Map _$ProductModelToJson(ProductModel instance) => 18 | { 19 | 'type': instance.type, 20 | 'title': instance.title, 21 | 'price': instance.price, 22 | 'url': instance.url, 23 | 'category':instance.category 24 | }; 25 | -------------------------------------------------------------------------------- /lib/feature/product/data/models/carousel_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/product/domain/entities/carousel_entity.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | 4 | part 'carousel_model.g.dart'; 5 | 6 | @JsonSerializable() 7 | class CarouselModel extends CarouselEntity { 8 | String type; 9 | String discount; 10 | String heading; 11 | String subtitle; 12 | String image_url; 13 | CarouselModel({ 14 | required this.type, 15 | required this.discount, 16 | required this.heading, 17 | required this.subtitle, 18 | required this.image_url, 19 | }) : super( 20 | type: type, 21 | discount: discount, 22 | heading: heading, 23 | subtitle: subtitle, 24 | image_url: image_url); 25 | 26 | factory CarouselModel.fromJson(Map json) => 27 | _$CarouselModelFromJson(json); 28 | 29 | Map toJson() => _$CarouselModelToJson(this); 30 | } 31 | -------------------------------------------------------------------------------- /lib/feature/product/data/models/carousel_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'carousel_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CarouselModel _$CarouselModelFromJson(Map json) => 10 | CarouselModel( 11 | type: json['type'] as String, 12 | discount: json['discount'] as String, 13 | heading: json['heading'] as String, 14 | subtitle: json['subtitle'] as String, 15 | image_url: json['image_url'] as String, 16 | ); 17 | 18 | Map _$CarouselModelToJson(CarouselModel instance) => 19 | { 20 | 'type': instance.type, 21 | 'discount': instance.discount, 22 | 'heading': instance.heading, 23 | 'subtitle': instance.subtitle, 24 | 'image_url': instance.image_url, 25 | }; 26 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "evira_shop", 3 | "short_name": "evira_shop", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/feature/auth/presentation/widgets/back_app_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | PreferredSize BackAppBar( 4 | BuildContext context,String title, 5 | ) { 6 | return PreferredSize( 7 | child: SafeArea( 8 | child: Container( 9 | child: AppBar( 10 | elevation: 0, 11 | primary: false, 12 | automaticallyImplyLeading: false, 13 | backgroundColor: Colors.transparent, 14 | titleSpacing: 10, 15 | title: Row( 16 | children: [ 17 | IconButton( 18 | onPressed: () { 19 | Navigator.of(context).pop(); 20 | }, 21 | icon: 22 | const Icon(Icons.arrow_back_ios, color: Colors.black)), 23 | Text( 24 | title, 25 | style: const TextStyle( 26 | color: Colors.black, fontFamily: 'Ubuntu', fontSize: 23), 27 | ) 28 | ], 29 | ), 30 | ), 31 | ), 32 | ), 33 | preferredSize: const Size.fromHeight(60)); 34 | } 35 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/widgets/back_app_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | PreferredSize BackAppBar( 4 | BuildContext context,String title, 5 | ) { 6 | return PreferredSize( 7 | child: SafeArea( 8 | child: Container( 9 | child: AppBar( 10 | elevation: 0, 11 | primary: false, 12 | automaticallyImplyLeading: false, 13 | backgroundColor: Colors.transparent, 14 | titleSpacing: 10, 15 | title: Row( 16 | children: [ 17 | IconButton( 18 | onPressed: () { 19 | Navigator.of(context).pop(); 20 | }, 21 | icon: 22 | const Icon(Icons.arrow_back_ios, color: Colors.black)), 23 | Text( 24 | title, 25 | style: const TextStyle( 26 | color: Colors.black, fontFamily: 'Ubuntu', fontSize: 23), 27 | ) 28 | ], 29 | ), 30 | ), 31 | ), 32 | ), 33 | preferredSize: const Size.fromHeight(60)); 34 | } 35 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "627267166039", 4 | "project_id": "evira-ecommerce", 5 | "storage_bucket": "evira-ecommerce.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:627267166039:android:2354c122b65cbe70162812", 11 | "android_client_info": { 12 | "package_name": "com.example.evira_shop" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "627267166039-0bc097dqnktttp47dukf4uod5tqjnnpp.apps.googleusercontent.com", 18 | "client_type": 3 19 | } 20 | ], 21 | "api_key": [ 22 | { 23 | "current_key": "AIzaSyD-6gHixpTm3UWO0YZbdUeE6L7HNk0PEQU" 24 | } 25 | ], 26 | "services": { 27 | "appinvite_service": { 28 | "other_platform_oauth_client": [ 29 | { 30 | "client_id": "627267166039-0bc097dqnktttp47dukf4uod5tqjnnpp.apps.googleusercontent.com", 31 | "client_type": 3 32 | } 33 | ] 34 | } 35 | } 36 | } 37 | ], 38 | "configuration_version": "1" 39 | } -------------------------------------------------------------------------------- /android/app/src/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "627267166039", 4 | "project_id": "evira-ecommerce", 5 | "storage_bucket": "evira-ecommerce.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:627267166039:android:2354c122b65cbe70162812", 11 | "android_client_info": { 12 | "package_name": "com.example.evira_shop" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "627267166039-0bc097dqnktttp47dukf4uod5tqjnnpp.apps.googleusercontent.com", 18 | "client_type": 3 19 | } 20 | ], 21 | "api_key": [ 22 | { 23 | "current_key": "AIzaSyD-6gHixpTm3UWO0YZbdUeE6L7HNk0PEQU" 24 | } 25 | ], 26 | "services": { 27 | "appinvite_service": { 28 | "other_platform_oauth_client": [ 29 | { 30 | "client_id": "627267166039-0bc097dqnktttp47dukf4uod5tqjnnpp.apps.googleusercontent.com", 31 | "client_type": 3 32 | } 33 | ] 34 | } 35 | } 36 | } 37 | ], 38 | "configuration_version": "1" 39 | } -------------------------------------------------------------------------------- /assets/json/category.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "title": "Clothes", 4 | "icon": "assets/icons/general/home/clothes.png", 5 | "json": [ 6 | "assets/json/shirt.json", 7 | "assets/json/girl_wear.json" 8 | ] 9 | }, 10 | { 11 | "title": "Shoes", 12 | "icon": "assets/icons/general/home/shoes.png", 13 | "json": "assets/json/shoes.json" 14 | }, 15 | { 16 | "title": "Bags", 17 | "icon": "assets/icons/general/home/bags.png", 18 | "json": "assets/json/bags.json" 19 | }, 20 | { 21 | "title": "Electronics", 22 | "icon": "assets/icons/general/home/pc.png", 23 | "json": "assets/json/electronic.json" 24 | }, 25 | { 26 | "title": "Watch", 27 | "icon": "assets/icons/general/home/watch.png", 28 | "json": "assets/json/watch.json" 29 | }, 30 | { 31 | "title": "Jewellery", 32 | "icon": "assets/icons/general/home/diamond.png" 33 | }, 34 | { 35 | "title": "Kitchen", 36 | "icon": "assets/icons/general/home/kitchen.png" 37 | }, 38 | { 39 | "title": "Toys", 40 | "icon": "assets/icons/general/home/toys.png" 41 | } 42 | ] -------------------------------------------------------------------------------- /lib/feature/auth/presentation/widgets/login_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/auth/domain/entities/user_credentail_entity.dart'; 2 | import 'package:evira_shop/feature/auth/presentation/bloc/cubit/auth_cubit.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | 6 | class LoginButton extends StatelessWidget { 7 | String title; 8 | UserCredentialEntity userCredentialEntity; 9 | LoginButton({required this.title, required this.userCredentialEntity}); 10 | @override 11 | Widget build(BuildContext context) { 12 | return InkWell( 13 | onTap: () { 14 | BlocProvider.of(context) 15 | .loginUser(userCredentialEntity, context); 16 | }, 17 | child: Container( 18 | width: double.infinity, 19 | padding: const EdgeInsets.symmetric(vertical: 20), 20 | alignment: Alignment.center, 21 | decoration: BoxDecoration( 22 | color: Colors.black87, borderRadius: BorderRadius.circular(35)), 23 | child: Text( 24 | title, 25 | style: const TextStyle( 26 | color: Colors.white, fontFamily: 'Ubuntu', fontSize: 26), 27 | ), 28 | ), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/feature/auth/presentation/widgets/signup_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/auth/domain/entities/user_credentail_entity.dart'; 2 | import 'package:evira_shop/feature/auth/presentation/bloc/cubit/auth_cubit.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_bloc/flutter_bloc.dart'; 5 | 6 | class SignUpButton extends StatelessWidget { 7 | String title; 8 | UserCredentialEntity userCredentialEntity; 9 | SignUpButton({required this.title, required this.userCredentialEntity}); 10 | @override 11 | Widget build(BuildContext context) { 12 | return InkWell( 13 | onTap: () { 14 | BlocProvider.of(context) 15 | .createUser(userCredentialEntity, context); 16 | }, 17 | child: Container( 18 | width: double.infinity, 19 | padding: const EdgeInsets.symmetric(vertical: 20), 20 | alignment: Alignment.center, 21 | decoration: BoxDecoration( 22 | color: Colors.black87, borderRadius: BorderRadius.circular(35)), 23 | child: Text( 24 | title, 25 | style: const TextStyle( 26 | color: Colors.white, fontFamily: 'Ubuntu', fontSize: 26), 27 | ), 28 | ), 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/widgets/default_app_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:evira_shop/core/asset_constants.dart' as asset; 3 | 4 | PreferredSize DefaultAppBar( 5 | String title, 6 | ) { 7 | return PreferredSize( 8 | child: SafeArea( 9 | child: AppBar( 10 | elevation: 0, 11 | primary: false, 12 | automaticallyImplyLeading: false, 13 | backgroundColor: Colors.transparent, 14 | titleSpacing: 10, 15 | title: Row( 16 | children: [ 17 | IconButton( 18 | onPressed: () {}, 19 | icon: Image.asset(asset.logo1), 20 | ), 21 | Text( 22 | title, 23 | style: const TextStyle( 24 | color: Colors.black, fontFamily: 'Ubuntu', fontSize: 23), 25 | ) 26 | ], 27 | ), 28 | actions: [ 29 | IconButton( 30 | onPressed: () {}, 31 | icon: Icon( 32 | Icons.search, 33 | color: Colors.black54, 34 | size: 30, 35 | )) 36 | ], 37 | ), 38 | ), 39 | preferredSize: const Size.fromHeight(60)); 40 | } 41 | -------------------------------------------------------------------------------- /lib/feature/product/data/repositories/repository_impl.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:evira_shop/feature/product/data/datasource/network_db/product_network_db.dart'; 3 | import 'package:evira_shop/feature/product/domain/entities/carousel_entity.dart'; 4 | import 'package:evira_shop/feature/product/domain/entities/product_entity.dart'; 5 | import 'package:evira_shop/feature/product/domain/repositories/product_repository.dart'; 6 | 7 | class ProductRepositoryImpl implements ProductRepository { 8 | final ProductNetworkDb productNetworkDb; 9 | ProductRepositoryImpl({required this.productNetworkDb}); 10 | 11 | @override 12 | Future> getProductData(String filename) async { 13 | return productNetworkDb.getProductData(filename); 14 | } 15 | 16 | @override 17 | Future> getCarouselData() async { 18 | return productNetworkDb.getCarouselData(); 19 | } 20 | 21 | @override 22 | Future addtoCart(Map cartProductData) { 23 | return productNetworkDb.addtoCart(cartProductData); 24 | } 25 | 26 | @override 27 | Future orderProduct() async { 28 | return productNetworkDb.orderProduct(); 29 | } 30 | 31 | @override 32 | Future deleteCartItem(String id) async { 33 | return await productNetworkDb.deleteCartItem(id); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /lib/feature/auth/data/repositories/auth_repository_impl.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'package:evira_shop/feature/auth/data/datasource/network_db/auth_network_db.dart'; 3 | import 'package:evira_shop/feature/auth/domain/entities/user_credentail_entity.dart'; 4 | import 'package:evira_shop/feature/auth/domain/repositories/auth_repository.dart'; 5 | import 'package:flutter/src/widgets/framework.dart'; 6 | 7 | class AuthRepositoryImpl implements AuthRepository { 8 | final AuthNetworkDB authnetworkDB; 9 | AuthRepositoryImpl({required this.authnetworkDB}); 10 | @override 11 | Future createUser( 12 | UserCredentialEntity userCredentialEntity, BuildContext context) async { 13 | return await authnetworkDB.createUser(userCredentialEntity, context); 14 | } 15 | 16 | @override 17 | Future createUserProfile(Map usercredentials, 18 | BuildContext context, File image) async { 19 | return await authnetworkDB.createUserProfile( 20 | usercredentials, context, image); 21 | } 22 | 23 | @override 24 | Future loginUser( 25 | UserCredentialEntity userCredentialEntity, BuildContext context) async { 26 | return await authnetworkDB.loginUser(userCredentialEntity, context); 27 | } 28 | 29 | @override 30 | Future authsendOTP(String phoneNumber) async { 31 | return await authnetworkDB.authsendOTP(phoneNumber); 32 | } 33 | 34 | @override 35 | Future authverifyOTP(int otp) async { 36 | return await authnetworkDB.authverifyOTP(otp); 37 | } 38 | 39 | @override 40 | Future forgotpassword(String email) async { 41 | return await authnetworkDB.forgotpassword(email); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /assets/json/carousel.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "carousel", 4 | "discount": "30%", 5 | "heading": "Today's Special", 6 | "subtitle": "Get Discount for every order, only valid for today", 7 | "image_url": "https://rukminim1.flixcart.com/image/753/904/km6mxe80/top/n/y/d/xs-st01-silkova-original-imagf5fmh6gdecba.jpeg?q=50" 8 | }, 9 | { 10 | "type": "carousel", 11 | "discount": "25%", 12 | "heading": "Summers Special", 13 | "subtitle": "Get Discount for every order, only valid for this summer", 14 | "image_url": "https://rukminim1.flixcart.com/image/753/904/kc0u7bk0/shirt/k/a/a/m-pk19sh09g-surhi-original-imaft8vgvhmhbhsy.jpeg?q=50" 15 | }, 16 | { 17 | "type": "carousel", 18 | "discount": "40%", 19 | "heading": "For Premium members", 20 | "subtitle": "Free delivery with maximum discount on each order", 21 | "image_url": "https://rukminim1.flixcart.com/image/753/904/krs40i80/shirt/p/v/g/m-sh-chi-19-u-turn-original-imag5hqt8pwyx7wz.jpeg?q=50" 22 | }, 23 | { 24 | "type": "carousel", 25 | "discount": "20%", 26 | "heading": "New Arrivals", 27 | "subtitle": "One for today, for any purchase", 28 | "image_url": "https://rukminim1.flixcart.com/image/753/904/l09w8sw0/top/8/h/7/s-84-fab-star-original-imagc3eg4zfuk4q8.jpeg?q=50" 29 | }, 30 | { 31 | "type": "carousel", 32 | "discount": "30%", 33 | "heading": "Black Friday", 34 | "subtitle": "Left with few orders,", 35 | "image_url": "https://rukminim1.flixcart.com/image/746/895/klo27bk0/top/c/l/p/m-147tkr2785a-selvia-original-imagyq82gwvysrqy.jpeg?q=50" 36 | } 37 | ] -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/widgets/carousel_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/core/asset_constants.dart' as asset; 2 | import 'package:flutter/material.dart'; 3 | 4 | class CarouselCard extends StatelessWidget { 5 | String discount, heading, subtitle, url; 6 | CarouselCard(this.discount, this.heading, this.subtitle, this.url); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | width: double.infinity, 12 | height: 200, 13 | padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10), 14 | decoration: BoxDecoration( 15 | borderRadius: BorderRadius.circular(20), 16 | image: DecorationImage( 17 | image: NetworkImage( 18 | url, 19 | ), 20 | alignment: Alignment.centerRight, 21 | fit: BoxFit.fitHeight)), 22 | child: Stack( 23 | children: [ 24 | Container( 25 | width: 200, 26 | padding: const EdgeInsets.symmetric(vertical: 20), 27 | child: Column( 28 | crossAxisAlignment: CrossAxisAlignment.start, 29 | mainAxisAlignment: MainAxisAlignment.spaceAround, 30 | children: [ 31 | Text( 32 | discount, 33 | style: asset.introStyles(34), 34 | ), 35 | Text( 36 | heading, 37 | style: asset.introStyles(24), 38 | ), 39 | Text(subtitle, style: asset.introStyles(16)), 40 | ], 41 | ), 42 | alignment: Alignment.centerLeft, 43 | ), 44 | ], 45 | ), 46 | ); 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/widgets/transaction_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:evira_shop/core/asset_constants.dart' as asset; 3 | 4 | class TransactionButton extends StatelessWidget { 5 | final double mediaQuery; 6 | String title; 7 | double titleSize; 8 | double middlepadding; 9 | double verticalpadding; 10 | Widget? suffixIcon; 11 | VoidCallback trasaction_fun; 12 | 13 | TransactionButton( 14 | {required this.mediaQuery, 15 | required this.title, 16 | this.titleSize = 22, 17 | this.middlepadding = 20, 18 | this.verticalpadding = 10, 19 | required this.suffixIcon, 20 | required this.trasaction_fun}); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return InkWell( 25 | onTap: trasaction_fun, 26 | child: Container( 27 | width: mediaQuery, 28 | padding: EdgeInsets.symmetric(vertical: verticalpadding), 29 | decoration: BoxDecoration( 30 | color: Colors.black87, 31 | borderRadius: BorderRadius.circular(30), 32 | boxShadow: [ 33 | const BoxShadow( 34 | color: Colors.grey, 35 | spreadRadius: 1, 36 | blurRadius: 1, 37 | offset: Offset(1.5, 1.5)) 38 | ]), 39 | child: Row( 40 | mainAxisAlignment: MainAxisAlignment.center, 41 | children: [ 42 | Text( 43 | title, 44 | style: asset.introStyles(titleSize, color: Colors.white), 45 | ), 46 | SizedBox( 47 | width: middlepadding, 48 | ), 49 | suffixIcon! 50 | ], 51 | ), 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Evira Shop 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | evira_shop 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/bloc/cubit/product_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | import 'package:equatable/equatable.dart'; 3 | import 'package:evira_shop/feature/product/domain/entities/carousel_entity.dart'; 4 | import 'package:evira_shop/feature/product/domain/entities/product_entity.dart'; 5 | import 'package:evira_shop/feature/product/domain/usecases/addto_cart_usecase.dart'; 6 | import 'package:evira_shop/feature/product/domain/usecases/delete_cart_item.dart'; 7 | import 'package:evira_shop/feature/product/domain/usecases/getCarouselData_usecase.dart'; 8 | import 'package:evira_shop/feature/product/domain/usecases/getProductData_usecase.dart'; 9 | import 'package:evira_shop/feature/product/domain/usecases/order_product_usecase.dart'; 10 | import 'package:evira_shop/injection_container.dart'; 11 | part 'product_state.dart'; 12 | 13 | class ProductCubit extends Cubit { 14 | ProductCubit() : super(ProductInitial()); 15 | Future> getProductData(String filename) async { 16 | return await locator.call().getProductData(filename); 17 | } 18 | 19 | Future> getCarouselData() async { 20 | return await locator.call().getCarouselData(); 21 | } 22 | 23 | Future addToCart(Map cartProductData) async { 24 | emit(AddingCartState()); 25 | await locator.call().addtoCartUsecase(cartProductData); 26 | emit(AddedCartSuccess()); 27 | } 28 | 29 | Future orderProduct() async { 30 | await locator 31 | .call() 32 | .orderProductUsecase(); 33 | } 34 | 35 | Future deleteCartProduct(String id) async { 36 | await locator.call().delete_cart_item_usecase(id); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/widgets/product_grid.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/product/domain/entities/product_entity.dart'; 2 | import 'package:evira_shop/feature/product/presentation/bloc/cubit/product_cubit.dart'; 3 | import 'package:evira_shop/feature/product/presentation/widgets/back_app_bar.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_bloc/flutter_bloc.dart'; 6 | 7 | import 'product_card.dart'; 8 | 9 | class ProductGrid extends StatelessWidget { 10 | String jsonPath; 11 | String title; 12 | ProductGrid(this.jsonPath, this.title); 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | appBar: BackAppBar(context, title), 17 | body: FutureBuilder( 18 | future: 19 | BlocProvider.of(context).getProductData(jsonPath), 20 | builder: (context, AsyncSnapshot> snapshot) { 21 | if (snapshot.connectionState == ConnectionState.waiting) { 22 | return const Center( 23 | child: CircularProgressIndicator( 24 | color: Colors.black87, 25 | strokeWidth: 7, 26 | ), 27 | ); 28 | } else { 29 | return GridView.builder( 30 | itemCount: snapshot.data!.length, 31 | scrollDirection: Axis.vertical, 32 | gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( 33 | childAspectRatio: .65, 34 | crossAxisCount: 2, 35 | crossAxisSpacing: 7), 36 | itemBuilder: (context, index) => ProductCard( 37 | title: snapshot.data![index].title, 38 | price: snapshot.data![index].price, 39 | image_url: snapshot.data![index].url, 40 | category: snapshot.data![index].category)); 41 | } 42 | }), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/widgets/home_app_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:evira_shop/core/asset_constants.dart' as asset; 3 | 4 | PreferredSize MyAppBar(String title) { 5 | return PreferredSize( 6 | child: SafeArea( 7 | child: Container( 8 | padding: const EdgeInsets.only(top: 10), 9 | child: AppBar( 10 | elevation: 0, 11 | primary: false, 12 | automaticallyImplyLeading: false, 13 | backgroundColor: Colors.transparent, 14 | title: Row( 15 | children: [ 16 | const CircleAvatar( 17 | backgroundImage: NetworkImage( 18 | "https://cdn.pixabay.com/photo/2021/04/25/14/30/man-6206540_1280.jpg"), 19 | ), 20 | const SizedBox( 21 | width: 10, 22 | ), 23 | Column( 24 | crossAxisAlignment: CrossAxisAlignment.start, 25 | children: [ 26 | Text( 27 | 'Good Morning', 28 | style: asset.introStyles(20, color: Colors.black54), 29 | ), 30 | Text( 31 | 'Andrew Ainsley', 32 | style: asset.introStyles(20), 33 | ), 34 | ], 35 | ) 36 | ], 37 | ), 38 | actions: [ 39 | IconButton( 40 | onPressed: () {}, 41 | icon: Image.asset( 42 | asset.notification_bell, 43 | width: 25, 44 | ), 45 | ), 46 | IconButton( 47 | onPressed: () {}, 48 | icon: Image.asset( 49 | asset.heart, 50 | width: 25, 51 | color: Colors.black, 52 | ), 53 | ), 54 | ], 55 | ), 56 | ), 57 | ), 58 | preferredSize: const Size.fromHeight(60)); 59 | } 60 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/screens/home/home/carousel_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/product/presentation/bloc/cubit/product_cubit.dart'; 2 | import 'package:evira_shop/feature/product/presentation/widgets/back_app_bar.dart'; 3 | import 'package:evira_shop/feature/product/presentation/widgets/carousel_card.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_bloc/flutter_bloc.dart'; 6 | 7 | class CarouselList extends StatelessWidget { 8 | static const routename = '/carousel_list'; 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | appBar: BackAppBar(context,"Special Offers"), 13 | body: FutureBuilder( 14 | future: BlocProvider.of(context).getCarouselData(), 15 | builder: (BuildContext context, AsyncSnapshot snapshot) { 16 | if (snapshot.connectionState == ConnectionState.waiting) { 17 | return const Center( 18 | child: CircularProgressIndicator( 19 | color: Colors.black87, 20 | strokeWidth: 7, 21 | )); 22 | } else { 23 | return ListView.builder( 24 | itemBuilder: (context, index) => Container( 25 | margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 4), 26 | padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 4), 27 | decoration: BoxDecoration( 28 | boxShadow: [ 29 | BoxShadow( 30 | color: Colors.grey.shade300, 31 | spreadRadius: 1, 32 | blurRadius: 1, 33 | offset: const Offset(1, 1.1)) 34 | ], 35 | color: Colors.white, 36 | borderRadius: BorderRadius.circular(20), 37 | ), 38 | child: CarouselCard( 39 | snapshot.data[index].discount, 40 | snapshot.data[index].heading, 41 | snapshot.data[index].subtitle, 42 | snapshot.data[index].image_url), 43 | ), 44 | itemCount: snapshot.data.length, 45 | ); 46 | } 47 | }, 48 | ), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/screens/home/order/ongoing_order.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:evira_shop/feature/product/presentation/widgets/order_card.dart'; 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:evira_shop/core/asset_constants.dart' as asset; 6 | 7 | class OnGoingOrder extends StatelessWidget { 8 | var firebasefirestore = FirebaseFirestore.instance 9 | .collection('users') 10 | .doc(FirebaseAuth.instance.currentUser!.uid); 11 | @override 12 | Widget build(BuildContext context) { 13 | return StreamBuilder( 14 | stream: firebasefirestore.collection('orders').snapshots(), 15 | builder: (BuildContext context, AsyncSnapshot snapshot) { 16 | if (snapshot.connectionState == ConnectionState.waiting) { 17 | return const Center( 18 | child: CircularProgressIndicator( 19 | color: Colors.black87, 20 | strokeWidth: 7, 21 | ), 22 | ); 23 | } else if (snapshot.hasData && snapshot.data!.size != 0) { 24 | return ListView( 25 | physics: const BouncingScrollPhysics(), 26 | children: snapshot.data!.docs.map((document) { 27 | return Padding( 28 | padding: const EdgeInsets.only(bottom: 10), 29 | child: OrderCard( 30 | status: "In Delivery", 31 | title: document['title'], 32 | price: document['price'], 33 | image_url: document['product_img_url'], 34 | )); 35 | }).toList(), 36 | ); 37 | } else { 38 | return Center( 39 | child: 40 | Column(mainAxisAlignment: MainAxisAlignment.center, children: [ 41 | Image.asset(asset.empty_cart_error, width: 300), 42 | const SizedBox( 43 | height: 20, 44 | ), 45 | Text( 46 | 'No Orders Yet', 47 | textAlign: TextAlign.center, 48 | style: asset.introStyles(22, color: Colors.black54), 49 | ) 50 | ]), 51 | ); 52 | } 53 | }, 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/widgets/input_field.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:evira_shop/core/asset_constants.dart' as asset; 3 | 4 | class InputField extends StatefulWidget { 5 | final String title; 6 | final Widget? iconData; 7 | Widget? suffixIcon; 8 | bool obsecureText = false; 9 | ValueChanged? fun; 10 | InputField(this.title, this.fun, 11 | [this.iconData,this.suffixIcon, this.obsecureText = false]); 12 | 13 | @override 14 | State createState() => _InputFieldState(); 15 | } 16 | 17 | class _InputFieldState extends State { 18 | @override 19 | Widget build(BuildContext context) { 20 | return TextFormField( 21 | style: asset.introStyles(20), 22 | obscureText: widget.obsecureText, 23 | onChanged: widget.fun, 24 | 25 | validator: (value) {}, 26 | decoration: InputDecoration( 27 | fillColor: Colors.white, 28 | prefixIcon: IconTheme( 29 | data: const IconThemeData(color: Colors.grey, size: 30), 30 | child: widget.iconData != null 31 | ? IconTheme( 32 | data: const IconThemeData(color: Colors.grey, size: 30), 33 | child: widget.iconData!, 34 | ) 35 | : const SizedBox( 36 | height: 0, 37 | width: 0, 38 | ), 39 | ), 40 | hintText: widget.title, 41 | prefixIconColor: Colors.grey, 42 | suffixIcon: widget.suffixIcon != null 43 | ? IconTheme( 44 | data: const IconThemeData(color: Colors.grey, size: 30), 45 | child: widget.suffixIcon!, 46 | ) 47 | : const SizedBox( 48 | height: 0, 49 | width: 0, 50 | ), 51 | hintStyle: asset.introStyles(18, color: Colors.black45), 52 | focusedBorder: OutlineInputBorder( 53 | borderRadius: BorderRadius.circular(20), 54 | borderSide: const BorderSide(color: Colors.black, width: 1.5)), 55 | filled: true, 56 | border: OutlineInputBorder( 57 | borderSide: BorderSide.none, 58 | borderRadius: BorderRadius.circular(20))), 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /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 plugin: 'com.google.gms.google-services' 27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 28 | 29 | android { 30 | compileSdkVersion flutter.compileSdkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.example.evira_shop" 48 | minSdkVersion 23 49 | targetSdkVersion 28 50 | versionCode 1 51 | versionName "1" 52 | multiDexEnabled true 53 | } 54 | 55 | buildTypes { 56 | release { 57 | // TODO: Add your own signing config for the release build. 58 | // Signing with the debug keys for now, so `flutter run --release` works. 59 | signingConfig signingConfigs.debug 60 | } 61 | } 62 | } 63 | 64 | flutter { 65 | source '../..' 66 | } 67 | 68 | dependencies { 69 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 70 | implementation platform('com.google.firebase:firebase-bom:30.3.1') 71 | } 72 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/screens/home/main_home_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:evira_shop/core/asset_constants.dart' as asset; 3 | 4 | import 'cart/cart_screen.dart'; 5 | import 'home/home_screen.dart'; 6 | import 'order/order_screen.dart'; 7 | import 'profile/profile_screen.dart'; 8 | import 'wallet/wallet_screen.dart'; 9 | 10 | class MainHomeScreen extends StatefulWidget { 11 | static const routename = '/mainhomescreen'; 12 | 13 | @override 14 | State createState() => _MainHomeScreenState(); 15 | } 16 | 17 | class _MainHomeScreenState extends State { 18 | List screens = [ 19 | HomeScreen(), 20 | CartScreen(), 21 | OrderScreen(), 22 | WalletScreen(), 23 | ProfileScreen() 24 | ]; 25 | 26 | int currentIndex = 0; 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return Scaffold( 31 | body: screens[currentIndex], 32 | bottomNavigationBar: BottomNavigationBar( 33 | type: BottomNavigationBarType.fixed, 34 | selectedLabelStyle: asset.introStyles(12), 35 | selectedItemColor: Colors.black, 36 | currentIndex: currentIndex, 37 | onTap: (value) { 38 | setState(() { 39 | currentIndex = value; 40 | }); 41 | }, 42 | items: [ 43 | BottomNavigationBarItem( 44 | icon: Image.asset( 45 | asset.home, 46 | color: currentIndex == 0 ? Colors.black87 : Colors.black54, 47 | width: 25, 48 | ), 49 | label: "Home"), 50 | BottomNavigationBarItem( 51 | icon: Image.asset( 52 | asset.cart, 53 | color: currentIndex == 1 ? Colors.black87 : Colors.black54, 54 | width: 25, 55 | ), 56 | label: "Cart"), 57 | BottomNavigationBarItem( 58 | icon: Image.asset( 59 | asset.orders, 60 | color: currentIndex == 2 ? Colors.black87 : Colors.black54, 61 | width: 25, 62 | ), 63 | label: "Orders"), 64 | BottomNavigationBarItem( 65 | icon: Image.asset( 66 | asset.wallet, 67 | color: currentIndex == 3 ? Colors.black87 : Colors.black54, 68 | width: 25, 69 | ), 70 | label: "Wallet"), 71 | BottomNavigationBarItem( 72 | icon: Image.asset( 73 | asset.profile, 74 | color: currentIndex == 4 ? Colors.black87 : Colors.black54, 75 | width: 25, 76 | ), 77 | label: "Profile"), 78 | ], 79 | ), 80 | ); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /assets/json/jewellery.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "jewellery", 4 | "title": "Estele Gold Plated CZ Floral Design Bridal Choker Necklace Set With Pearls for Women", 5 | "rating": "4.3", 6 | "price": "5,249", 7 | "category": "Jewellery", 8 | "review":0, 9 | "url": [ 10 | "https://m.media-amazon.com/images/I/812pU4iy2qL._UY625_.jpg", 11 | "https://m.media-amazon.com/images/I/71jRzAaqfEL._UY625_.jpg", 12 | "https://m.media-amazon.com/images/I/61msXU8dY+L._UY625_.jpg", 13 | "https://m.media-amazon.com/images/I/61zq-BMBRrL._UY625_.jpg", 14 | "https://m.media-amazon.com/images/I/716dNvtwukL._UY625_.jpg" 15 | ] 16 | }, 17 | { 18 | "type": "jewellery", 19 | "title": "Indian Traditional Gold Plated Kundan Dulhan Bridal Choker Necklace Set with Earring And Maang Tikka Wedding Jewellery for Women & Girls", 20 | "rating": "4.5", 21 | "price": "5,519", 22 | "category": "Jewellery", 23 | "review":0, 24 | "url": [ 25 | "https://m.media-amazon.com/images/I/713s0i3jWlL._UY625_.jpg", 26 | "https://m.media-amazon.com/images/I/81zKp6imMdL._UY625_.jpg", 27 | "https://m.media-amazon.com/images/I/41kyYF4tm1L.jpg", 28 | "https://m.media-amazon.com/images/I/41A86CNjKSL.jpg" 29 | ] 30 | }, 31 | { 32 | "type": "jewellery", 33 | "title": "Dishis Designer Jewellery 14K (585) Yellow Gold, Diamond and Blue Sapphire Gold, Diamond Designer Earrings Drop Earrings For Women", 34 | "rating": "3.5", 35 | "price": "7,366", 36 | "category": "Jewellery", 37 | "review":0, 38 | "url": [ 39 | "https://m.media-amazon.com/images/I/41OdZkc3qrS.jpg", 40 | "https://m.media-amazon.com/images/I/518wO1ud-vL._UY625_.jpg", 41 | "https://m.media-amazon.com/images/I/51IxTUlgdlL._UY625_.jpg", 42 | "https://m.media-amazon.com/images/I/61cD3YNg6FS._UY625_.jpg" 43 | ] 44 | }, 45 | { 46 | "type": "jewellery", 47 | "title": "GIVA 925 Sterling Silver Zircon Stripped Ring For Him , Adjustable| Rings for Men and Boys | With Certificate of Authenticity and 925 Stamp", 48 | "rating": "4.5", 49 | "price": "2,943", 50 | "category": "Jewellery", 51 | "review":0, 52 | "url": [ 53 | "https://m.media-amazon.com/images/I/51dSAH8btoL._UY625_.jpg", 54 | "https://m.media-amazon.com/images/I/71bJGFgPQLL._UY625_.jpg", 55 | "https://m.media-amazon.com/images/I/81rCW4qJXzL._UY625_.jpg", 56 | "https://m.media-amazon.com/images/I/61jjWgFowwL._UY625_.jpg", 57 | "https://m.media-amazon.com/images/I/41Qq1o7G7NL._UY625_.jpg" 58 | ] 59 | } 60 | ] -------------------------------------------------------------------------------- /lib/core/asset_constants.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:intl/intl.dart'; 3 | 4 | const logo1 = "assets/icons/logo/logo1.png"; 5 | const logo2 = "assets/icons/logo/logo2.png"; 6 | const loading = "assets/icons/logo/logo_loading.png"; 7 | const splash_login = "assets/images/illustrations/splash_screen1.png"; 8 | const splash_store = "assets/images/illustrations/splash_screen2.png"; 9 | const splash_drop = "assets/images/illustrations/splash_screen3.png"; 10 | const splash_check = "assets/images/illustrations/splash_screen4.png"; 11 | const otp = "assets/images/illustrations/otp.png"; 12 | const apple_logo = "assets/icons/general/social/apple.png"; 13 | const facebook_logo = "assets/icons/general/social/facebook.png"; 14 | const paypal = "assets/icons/general/social/paypal.png"; 15 | const google_logo = "assets/icons/general/social/google.png"; 16 | const notification_bell = "assets/icons/general/home/notificationbell.png"; 17 | const heart = "assets/icons/general/home/heart.png"; 18 | const filter = "assets/icons/general/home/filter.png"; 19 | const search = "assets/icons/general/home/search.png"; 20 | const empty_cart_error = "assets/icons/general/home/emptycart.png"; 21 | const no_transaction = "assets/icons/general/home/no_transaction.png"; 22 | const home = "assets/icons/general/bottom_nav/home.png"; 23 | const cart = "assets/icons/general/bottom_nav/cart.png"; 24 | const orders = "assets/icons/general/bottom_nav/orders.png"; 25 | const wallet = "assets/icons/general/bottom_nav/wallet.png"; 26 | const profile = "assets/icons/general/bottom_nav/profile.png"; 27 | 28 | String numberFormat(int price) { 29 | final numberFormatter = NumberFormat( 30 | "##,##,###", 31 | "en_US", // local US 32 | ); 33 | 34 | return numberFormatter.format(price); 35 | } 36 | 37 | String timeConversion(DateTime dateTime) { 38 | return DateFormat('yyyy-MM-dd – kk:mm').format(dateTime); 39 | } 40 | 41 | TextStyle introStyles(double size, {Color color = Colors.black87}) { 42 | return TextStyle(fontFamily: 'Ubuntu', color: color, fontSize: size); 43 | } 44 | 45 | Container category_chip(String title, String activeChiptitle) { 46 | if (title.toLowerCase() != activeChiptitle) { 47 | return Container( 48 | margin: EdgeInsets.only(left: 5), 49 | child: Chip( 50 | label: Text( 51 | title, 52 | style: introStyles(16), 53 | ), 54 | backgroundColor: Colors.white, 55 | side: const BorderSide( 56 | width: 1.5, 57 | ), 58 | ), 59 | ); 60 | } else { 61 | return Container( 62 | child: Chip( 63 | label: Text( 64 | title, 65 | style: introStyles(16, color: Colors.white), 66 | ), 67 | backgroundColor: Colors.black, 68 | side: const BorderSide( 69 | width: 1.5, 70 | ), 71 | ), 72 | ); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/injection_container.dart'; 2 | import 'package:firebase_auth/firebase_auth.dart'; 3 | import 'package:firebase_core/firebase_core.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | 8 | import 'feature/auth/presentation/bloc/cubit/auth_cubit.dart'; 9 | import 'feature/auth/presentation/screens/auth_screens/auth_main_screen.dart'; 10 | import 'feature/auth/presentation/screens/auth_screens/create_profile_screen.dart'; 11 | import 'feature/auth/presentation/screens/auth_screens/login_screen.dart'; 12 | import 'feature/auth/presentation/screens/auth_screens/signup_screen.dart'; 13 | import 'feature/auth/presentation/screens/splash_screen/main_splash_screen.dart'; 14 | import 'feature/product/presentation/bloc/cubit/product_cubit.dart'; 15 | import 'feature/product/presentation/screens/home/cart/cart_screen.dart'; 16 | import 'feature/product/presentation/screens/home/home/carousel_list.dart'; 17 | import 'feature/product/presentation/screens/home/home/home_screen.dart'; 18 | import 'feature/product/presentation/screens/home/home/most_popular_product_screen.dart'; 19 | import 'feature/product/presentation/screens/home/main_home_screen.dart'; 20 | 21 | void main() async { 22 | WidgetsFlutterBinding.ensureInitialized(); 23 | await Firebase.initializeApp(); 24 | await setup(); 25 | runApp(MyApp()); 26 | } 27 | 28 | String isAuth() { 29 | if (FirebaseAuth.instance.currentUser != null) { 30 | return MainHomeScreen.routename; 31 | } 32 | return '/'; 33 | } 34 | 35 | class MyApp extends StatelessWidget { 36 | @override 37 | Widget build(BuildContext context) { 38 | return MaterialApp( 39 | debugShowCheckedModeBanner: false, 40 | initialRoute: isAuth(), 41 | routes: { 42 | '/': (context) => MainSplashScreen(), 43 | AuthMainScreen.routename: (context) => AuthMainScreen(), 44 | SignUpScreen.routename: (context) => BlocProvider( 45 | create: (context) => AuthCubit(), 46 | child: SignUpScreen(), 47 | ), 48 | LoginScreen.routename:((context)=>BlocProvider( 49 | create: (context) => AuthCubit(), 50 | child: LoginScreen(), 51 | )), 52 | CreateProfileScreen.routename: (context) => BlocProvider( 53 | create: (context) => AuthCubit(), 54 | child: CreateProfileScreen(), 55 | ), 56 | HomeScreen.routename: (context) => HomeScreen(), 57 | CarouselList.routename: (context) => CarouselList(), 58 | MostPopularProductScreen.routename: (context) => 59 | MostPopularProductScreen(), 60 | CartScreen.routename: (context) => CartScreen(), 61 | MainHomeScreen.routename: (context) => BlocProvider( 62 | create: (context) => ProductCubit(), 63 | child: MainHomeScreen(), 64 | ) 65 | }, 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/screens/home/order/order_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:evira_shop/core/asset_constants.dart' as asset; 3 | 4 | import 'completed_order.dart'; 5 | import 'ongoing_order.dart'; 6 | 7 | class OrderScreen extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | 11 | return DefaultTabController( 12 | length: 2, 13 | child: Scaffold( 14 | appBar: PreferredSize( 15 | child: SafeArea( 16 | child: Container( 17 | child: AppBar( 18 | elevation: 0, 19 | primary: false, 20 | automaticallyImplyLeading: false, 21 | backgroundColor: Colors.transparent, 22 | titleSpacing: 10, 23 | title: Row( 24 | children: [ 25 | IconButton( 26 | onPressed: () {}, 27 | icon: Image.asset(asset.logo1), 28 | ), 29 | const Text( 30 | 'My Order', 31 | style: TextStyle( 32 | color: Colors.black, 33 | fontFamily: 'Ubuntu', 34 | fontSize: 23), 35 | ) 36 | ], 37 | ), 38 | actions: [ 39 | IconButton( 40 | onPressed: () {}, 41 | icon: const Icon( 42 | Icons.search, 43 | color: Colors.black54, 44 | size: 30, 45 | )) 46 | ], 47 | bottom: TabBar( 48 | indicatorColor: Colors.grey.shade800, 49 | indicatorWeight: 3, 50 | unselectedLabelColor: Colors.grey, 51 | labelStyle: asset.introStyles(20), 52 | labelColor: Colors.black, 53 | tabs:const [ 54 | Tab( 55 | icon: Text( 56 | 'Ongoing', 57 | )), 58 | Tab( 59 | icon: Text( 60 | 'Completed', 61 | )), 62 | ], 63 | ), 64 | ), 65 | ), 66 | ), 67 | preferredSize: const Size.fromHeight(100)), 68 | body: TabBarView( 69 | children: [ 70 | Padding( 71 | padding: const EdgeInsets.only(top: 18.0), 72 | child: OnGoingOrder(), 73 | ), 74 | Padding( 75 | padding: const EdgeInsets.only(top: 18.0), 76 | child: CompletedOrder(), 77 | ) 78 | ], 79 | ), 80 | ), 81 | ); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/injection_container.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/auth/domain/usecases/auth_sendOTP_usecase.dart'; 2 | import 'package:evira_shop/feature/auth/domain/usecases/auth_verifyOTP_usecase.dart'; 3 | import 'package:evira_shop/feature/auth/domain/usecases/forgot_password_usecase.dart'; 4 | import 'package:evira_shop/feature/product/domain/usecases/getProductData_usecase.dart'; 5 | import 'package:get_it/get_it.dart'; 6 | 7 | import 'feature/auth/data/datasource/network_db/auth_network_db.dart'; 8 | import 'feature/auth/data/datasource/network_db/auth_network_db_impl.dart'; 9 | import 'feature/auth/data/repositories/auth_repository_impl.dart'; 10 | import 'feature/auth/domain/repositories/auth_repository.dart'; 11 | import 'feature/auth/domain/usecases/createUser_profile_usercase.dart'; 12 | import 'feature/auth/domain/usecases/create_user_usecase.dart'; 13 | import 'feature/auth/domain/usecases/login_user_usecase.dart'; 14 | import 'feature/product/data/datasource/network_db/product_network_db.dart'; 15 | import 'feature/product/data/datasource/network_db/product_network_db_impl.dart'; 16 | import 'feature/product/data/repositories/repository_impl.dart'; 17 | import 'feature/product/domain/repositories/product_repository.dart'; 18 | import 'feature/product/domain/usecases/addto_cart_usecase.dart'; 19 | import 'feature/product/domain/usecases/delete_cart_item.dart'; 20 | import 'feature/product/domain/usecases/getCarouselData_usecase.dart'; 21 | import 'feature/product/domain/usecases/order_product_usecase.dart'; 22 | 23 | 24 | GetIt locator = GetIt.instance; 25 | 26 | Future setup() async { 27 | //usecase 28 | 29 | //usecase-auth 30 | locator.registerLazySingleton( 31 | () => CreateUserUsecase(repository: locator())); 32 | locator.registerLazySingleton( 33 | () => CreateUserProfileUseCase(repository: locator())); 34 | locator.registerLazySingleton( 35 | () => LoginUserUseCase(repository: locator())); 36 | locator.registerLazySingleton( 37 | () => AuthSendOTPUseCase(authRepository: locator())); 38 | locator.registerLazySingleton( 39 | () => AuthVerifyOTPUseCase(authRepository: locator())); 40 | locator.registerLazySingleton( 41 | () => ForgotPasswordUseCase(authRepository: locator())); 42 | 43 | //usecase-product 44 | locator.registerLazySingleton( 45 | () => GetProductDataUseCase(repository: locator())); 46 | locator.registerLazySingleton( 47 | () => GetCarouselDataUseCase(repository: locator())); 48 | locator.registerLazySingleton( 49 | () => AddtoCartUseCase(repository: locator())); 50 | locator.registerLazySingleton( 51 | () => OrderProductUseCase(repository: locator())); 52 | locator.registerLazySingleton( 53 | () => DeleteCartItemUseCase(repository: locator())); 54 | 55 | //Repostory 56 | locator.registerLazySingleton( 57 | () => AuthRepositoryImpl(authnetworkDB: locator())); 58 | locator.registerLazySingleton( 59 | () => ProductRepositoryImpl(productNetworkDb: locator())); 60 | 61 | //Network DB 62 | locator.registerLazySingleton(() => AuthNetworkDBImpl()); 63 | locator.registerLazySingleton(() => ProductNetworkDbImpl()); 64 | } 65 | -------------------------------------------------------------------------------- /assets/json/kitchen.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "kitchen", 4 | "title": "Butterfly Premium Vegetable Chopper 900 Ml, Blue", 5 | "rating": "4.5", 6 | "price": "348", 7 | "category": "Kitchen", 8 | "review":0, 9 | "url": [ 10 | "https://m.media-amazon.com/images/I/31MhbkGeGhS.jpg", 11 | "https://m.media-amazon.com/images/I/31FbggaWSgS.jpg", 12 | "https://m.media-amazon.com/images/I/31prkohQbaS.jpg" 13 | ] 14 | }, 15 | { 16 | "type": "kitchen", 17 | "title": "WOLTAX Food Chopper, Steel Large Manual Hand-Press Vegetable Chopper Mixer Cutter to Cut Onion, Salad, Tomato, Potato (Pack of 1, 2 Kilowatt_Hours)", 18 | "rating": "4.0", 19 | "price": "547", 20 | "category": "Kitchen", 21 | "review":0, 22 | "url": [ 23 | "https://m.media-amazon.com/images/I/61AerMaIkOL._SX679_.jpg", 24 | "https://m.media-amazon.com/images/I/519CyvXN1bL._SY879_.jpg", 25 | "https://m.media-amazon.com/images/I/41jJpQQLp5L.jpg", 26 | "https://m.media-amazon.com/images/I/51taYU1lhSL.jpg", 27 | "https://m.media-amazon.com/images/I/51Zh6YJGY4L._SX679_.jpg", 28 | "https://m.media-amazon.com/images/I/51YqtgVRDdL._SX679_.jpg" 29 | ] 30 | }, 31 | { 32 | "type": "kitchen", 33 | "title": "TheTrust Store Cri8Hub Stainless Steel 2-Tier Trolley Kitchen Rack for Boxes Utensils Dishes Plates for Home (Silver, Standard)", 34 | "rating": "3.8", 35 | "price": "470", 36 | "category": "Kitchen", 37 | "review":0, 38 | "url": [ 39 | "https://m.media-amazon.com/images/I/61i3QOXFTpS.jpg", 40 | "https://m.media-amazon.com/images/I/51eCY2JgjZL.jpg", 41 | "https://m.media-amazon.com/images/I/41C-50upXtS.jpg", 42 | "https://m.media-amazon.com/images/I/41hwigKlCsS.jpg" 43 | ] 44 | }, 45 | { 46 | "type": "kitchen", 47 | "title": "Plantex Stainless Steel Multipurpose Dish Rack/Storage Shelves for Kitchen Cabinets/Plate Stand/Utensil Rack (Chrome-Silver)", 48 | "rating": "4.0", 49 | "price": "379", 50 | "category": "Kitchen", 51 | "review":0, 52 | "url": [ 53 | "https://m.media-amazon.com/images/I/71JLwJPKASL._SX679_.jpg", 54 | "https://m.media-amazon.com/images/I/61Jh+QFnqzS._SX679_.jpg", 55 | "https://m.media-amazon.com/images/I/61QoEVmV8GL._SX679_.jpg", 56 | "https://m.media-amazon.com/images/I/71bus1QVAwL._SX679_.jpg" 57 | ] 58 | }, 59 | { 60 | "type": "kitchen", 61 | "title": "Craftland Kitchen Utensils Set, Wooden Spoons for Cooking Non-Stick Pan Kitchen Tool Wooden Cooking Spoons and Wooden Utensil Storage Wooden Barrel (Set of 6 with Holder)", 62 | "rating": "4.5", 63 | "price": "475", 64 | "category": "Kitchen", 65 | "review":0, 66 | "url": [ 67 | "https://m.media-amazon.com/images/I/71mees+ClxL._SY879_.jpg", 68 | "https://m.media-amazon.com/images/I/61GXed4piQS._SX679_.jpg", 69 | "https://m.media-amazon.com/images/I/81zu+z2fq7S._SX679_.jpg", 70 | "https://m.media-amazon.com/images/I/81RheTVKDaL._SX679_.jpg", 71 | "https://m.media-amazon.com/images/I/71I3CELuM7S._SX679_.jpg", 72 | "https://m.media-amazon.com/images/I/71cY9ZMleGS._SX679_.jpg" 73 | ] 74 | } 75 | ] -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/widgets/delete_modal_bottom_sheet.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:evira_shop/core/asset_constants.dart' as asset; 3 | 4 | class DeleteModalBottomSheet extends StatelessWidget { 5 | String img_url; 6 | String title; 7 | String price; 8 | DeleteModalBottomSheet( 9 | {required this.title, required this.price, required this.img_url}); 10 | @override 11 | Widget build(BuildContext context) { 12 | return Container( 13 | height: 120, 14 | margin: const EdgeInsets.symmetric(horizontal: 20), 15 | padding: const EdgeInsets.only(right: 20), 16 | decoration: BoxDecoration( 17 | borderRadius: BorderRadius.circular(20), 18 | boxShadow: [ 19 | BoxShadow( 20 | color: Colors.grey.shade300, 21 | spreadRadius: 1, 22 | blurRadius: 2, 23 | ) 24 | ], 25 | color: Colors.white), 26 | child: Row( 27 | children: [ 28 | Container( 29 | width: 100, 30 | height: 125, 31 | margin: const EdgeInsets.symmetric(horizontal: 10), 32 | decoration: BoxDecoration( 33 | borderRadius: BorderRadius.circular(15), 34 | image: DecorationImage( 35 | image: NetworkImage( 36 | img_url, 37 | ))), 38 | ), 39 | Expanded( 40 | child: Column( 41 | mainAxisAlignment: MainAxisAlignment.spaceAround, 42 | crossAxisAlignment: CrossAxisAlignment.start, 43 | children: [ 44 | Container( 45 | child: Text( 46 | title, 47 | maxLines: 3, 48 | overflow: TextOverflow.ellipsis, 49 | style: asset.introStyles(20), 50 | ), 51 | ), 52 | Row( 53 | children: [ 54 | const Icon(Icons.circle), 55 | Text( 56 | ' Color', 57 | style: asset.introStyles(14, color: Colors.black54), 58 | ) 59 | ], 60 | ), 61 | Row( 62 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 63 | children: [ 64 | Text( 65 | "₹" + price, 66 | style: asset.introStyles(20), 67 | ), 68 | Container( 69 | width: 90, 70 | padding: 71 | const EdgeInsets.symmetric(vertical: 6, horizontal: 8), 72 | decoration: BoxDecoration( 73 | color: Colors.grey.shade200, 74 | borderRadius: BorderRadius.circular(20)), 75 | child: Row( 76 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 77 | children: [ 78 | const Icon(Icons.remove), 79 | Text( 80 | "1", 81 | style: asset.introStyles(16), 82 | ), 83 | const Icon(Icons.add) 84 | ], 85 | )) 86 | ], 87 | ) 88 | ], 89 | ), 90 | ) 91 | ], 92 | ), 93 | ); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lib/feature/auth/presentation/bloc/cubit/auth_cubit.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:bloc/bloc.dart'; 4 | import 'package:equatable/equatable.dart'; 5 | import 'package:evira_shop/feature/auth/domain/entities/user_credentail_entity.dart'; 6 | import 'package:evira_shop/feature/auth/domain/usecases/auth_sendOTP_usecase.dart'; 7 | import 'package:evira_shop/feature/auth/domain/usecases/auth_verifyOTP_usecase.dart'; 8 | import 'package:evira_shop/feature/auth/domain/usecases/createUser_profile_usercase.dart'; 9 | import 'package:evira_shop/feature/auth/domain/usecases/create_user_usecase.dart'; 10 | import 'package:evira_shop/feature/auth/domain/usecases/forgot_password_usecase.dart'; 11 | import 'package:evira_shop/feature/auth/domain/usecases/login_user_usecase.dart'; 12 | import 'package:evira_shop/injection_container.dart'; 13 | import 'package:flutter/material.dart'; 14 | 15 | part 'auth_state.dart'; 16 | 17 | class AuthCubit extends Cubit { 18 | AuthCubit() : super(AuthInitial()); 19 | Future createUser( 20 | UserCredentialEntity userCredentialEntity, BuildContext context) async { 21 | emit(AuthLoading()); 22 | var authState = await locator 23 | .call() 24 | .createuserUsecase(userCredentialEntity, context); 25 | if (authState.toString() == "Success") { 26 | emit(AuthSuccess()); 27 | } else { 28 | emit(AuthFailure(error: authState.toString())); 29 | } 30 | } 31 | 32 | Future createProfile(Map usercredentials, 33 | BuildContext context, File image) async { 34 | emit(AuthLoading()); 35 | var authstate = await locator 36 | .call() 37 | .createUserProfileUseCase(usercredentials, context, image); 38 | 39 | if (authstate.toString() == "Success") { 40 | emit(AuthSuccess()); 41 | } else { 42 | emit(AuthFailure(error: authstate.toString())); 43 | } 44 | } 45 | 46 | Future loginUser( 47 | UserCredentialEntity userCredentialEntity, BuildContext context) async { 48 | emit(AuthLoading()); 49 | var authstate = await locator 50 | .call() 51 | .loginuserusecase(userCredentialEntity, context); 52 | if (authstate.toString() == "Success") { 53 | emit(AuthSuccess()); 54 | } else { 55 | emit(AuthFailure(error: authstate.toString())); 56 | } 57 | } 58 | 59 | Future authsendOTP(String phoneNumber) async { 60 | emit(AuthLoading()); 61 | var authstate = await locator 62 | .call() 63 | .authSendOTPUseCase(phoneNumber); 64 | if (authstate.toString() == "Success") { 65 | emit(AuthSuccess()); 66 | } else if (authstate.toString() == "AuthCodeSent") { 67 | emit(AuthCodeSentState()); 68 | } else { 69 | emit(AuthFailure(error: authstate.toString())); 70 | } 71 | } 72 | 73 | Future authverifyOTP(int otp) async { 74 | emit(AuthLoading()); 75 | var authstate = 76 | await locator.call().authVerifyOTPUsecase(otp); 77 | if (authstate.toString() == "Success") { 78 | emit(AuthSuccess()); 79 | } else { 80 | emit(AuthFailure(error: authstate.toString())); 81 | } 82 | } 83 | 84 | Future resetPassword(String email) async { 85 | emit(AuthLoading()); 86 | var authstate = await locator 87 | .call() 88 | .forgotpasswordusecase(email); 89 | if (authstate.toString() == "Success") { 90 | emit(AuthSuccess()); 91 | } else { 92 | emit(AuthFailure(error: authstate.toString())); 93 | } 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /assets/json/toys.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "toys", 4 | "title": "Miss & Chief by Flipkart 1:14 Pull Back Metal Die Cast Bike with Light and Sound (White)", 5 | "rating": "4.1", 6 | "price": "367", 7 | "category": "Toys", 8 | "review":0, 9 | "url": [ 10 | "https://rukminim1.flixcart.com/image/416/416/k3g73bk0/vehicle-pull-along/u/e/y/panther-1-14-pull-back-metal-die-cast-bike-with-light-and-sound-original-imafmkgsznsbdywp.jpeg?q=70", 11 | "https://rukminim1.flixcart.com/image/416/416/k3g73bk0/vehicle-pull-along/u/e/y/panther-1-14-pull-back-metal-die-cast-bike-with-light-and-sound-original-imafmkgspch6gvmh.jpeg?q=70", 12 | "https://rukminim1.flixcart.com/image/416/416/k3g73bk0/vehicle-pull-along/u/e/y/panther-1-14-pull-back-metal-die-cast-bike-with-light-and-sound-original-imafmkgsgeq544g5.jpeg?q=70", 13 | "https://rukminim1.flixcart.com/image/416/416/k3g73bk0/vehicle-pull-along/u/e/y/panther-1-14-pull-back-metal-die-cast-bike-with-light-and-sound-original-imafmkgsqvszsgxt.jpeg?q=70", 14 | "https://rukminim1.flixcart.com/image/416/416/k3g73bk0/vehicle-pull-along/u/e/y/panther-1-14-pull-back-metal-die-cast-bike-with-light-and-sound-original-imafmkgshsu2enfs.jpeg?q=70", 15 | "https://rukminim1.flixcart.com/image/416/416/k3g73bk0/vehicle-pull-along/u/e/y/panther-1-14-pull-back-metal-die-cast-bike-with-light-and-sound-original-imafmkgsngee38ht.jpeg?q=70", 16 | "https://rukminim1.flixcart.com/image/416/416/k3g73bk0/vehicle-pull-along/u/e/y/panther-1-14-pull-back-metal-die-cast-bike-with-light-and-sound-original-imafmkgs7nf8zdab.jpeg?q=70", 17 | "https://rukminim1.flixcart.com/image/416/416/k3g73bk0/vehicle-pull-along/u/e/y/panther-1-14-pull-back-metal-die-cast-bike-with-light-and-sound-original-imafmkgswrhergp2.jpeg?q=70" 18 | ] 19 | }, 20 | { 21 | "type": "toys", 22 | "title": "Ayaan Toys Letz Ride Rocky SUV ATV Rechargeable Battery Operated Ride-On with Remote for Kids (2 to 7 Yrs), Red Jeep Battery Operated Ride On (Red)", 23 | "rating": "3.5", 24 | "price": "13,000", 25 | "category": "Toys", 26 | "review":0, 27 | "url": [ 28 | "https://rukminim1.flixcart.com/image/416/416/k6gsk280/electric-ride-on/q/c/8/ltzr6500red-ayaan-toys-original-imafzx8jez3grppy.jpeg?q=70", 29 | "https://rukminim1.flixcart.com/image/416/416/k6gsk280/electric-ride-on/q/c/8/ltzr6500red-ayaan-toys-original-imafzx8jpquxthgm.jpeg?q=70", 30 | "https://rukminim1.flixcart.com/image/416/416/k6gsk280/electric-ride-on/q/c/8/ltzr6500red-ayaan-toys-original-imafzx8jsdystbrg.jpeg?q=70", 31 | "https://rukminim1.flixcart.com/image/416/416/k6gsk280/electric-ride-on/q/c/8/ltzr6500red-ayaan-toys-original-imafzx8jxknqa7rv.jpeg?q=70", 32 | "https://rukminim1.flixcart.com/image/416/416/k6gsk280/electric-ride-on/q/c/8/ltzr6500red-ayaan-toys-original-imafzx8j7tzavkg9.jpeg?q=70" 33 | ] 34 | }, 35 | { 36 | "type": "toys", 37 | "title": "Popsugar Kids Tool Set for Toddlers, Tools Kit for Boy and Girls, Construction Toys Playset for Kids", 38 | "rating": "4.0", 39 | "price": "947", 40 | "category": "Toys", 41 | "review":0, 42 | "url": [ 43 | "https://m.media-amazon.com/images/I/91T075C+xkL._SX522_.jpg", 44 | "https://m.media-amazon.com/images/I/51vMvX5liAL.jpg", 45 | "https://m.media-amazon.com/images/I/61SFDH5LTGL._SX522_.jpg", 46 | "https://m.media-amazon.com/images/I/61gzBCA3xBL._SX522_.jpg", 47 | "https://m.media-amazon.com/images/I/51cQGJidl7L.jpg" 48 | ] 49 | } 50 | ] -------------------------------------------------------------------------------- /lib/feature/product/presentation/screens/home/cart/promo_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/product/presentation/bloc/cubit/product_cubit.dart'; 2 | import 'package:evira_shop/feature/product/presentation/widgets/back_app_bar.dart'; 3 | import 'package:evira_shop/feature/product/presentation/widgets/transaction_button.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:evira_shop/core/asset_constants.dart' as asset; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | 8 | import 'payment_screen.dart'; 9 | 10 | class PromoScreen extends StatelessWidget { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: BackAppBar(context, 'Add Promo'), 15 | body: Container( 16 | padding: const EdgeInsets.symmetric(horizontal: 10), 17 | child: SizedBox( 18 | child: Column( 19 | mainAxisAlignment: MainAxisAlignment.spaceAround, 20 | children: [ 21 | shipping_address_tile( 22 | "Special 25% Off", "Special promo only for today", false), 23 | shipping_address_tile( 24 | "Discount 30% Off", "New user special promo", false), 25 | shipping_address_tile( 26 | "Special 20% Off", "Special promo only for today", false), 27 | shipping_address_tile( 28 | "Discount 30% Off", "New arrival discount ", false), 29 | shipping_address_tile( 30 | "Discount 35% Off", "Special promo only for today ", false), 31 | shipping_address_tile("Discount 45% Off", 32 | "Latest Special heavy discount only for today", true), 33 | ], 34 | ), 35 | ), 36 | ), 37 | bottomNavigationBar: Container( 38 | margin: const EdgeInsets.symmetric(vertical: 13, horizontal: 10), 39 | child: TransactionButton( 40 | mediaQuery: MediaQuery.of(context).size.width * .9, 41 | verticalpadding: 20, 42 | title: 'Apply', 43 | suffixIcon: const SizedBox(), 44 | trasaction_fun: () { 45 | Navigator.of(context).push(MaterialPageRoute( 46 | builder: (context) => BlocProvider( 47 | create: (context) => ProductCubit(), 48 | child: PaymentScreen(), 49 | ), 50 | )); 51 | }, 52 | ), 53 | ), 54 | ); 55 | } 56 | 57 | ListTile shipping_address_tile(String title, String desc, bool isSelected) { 58 | return ListTile( 59 | contentPadding: const EdgeInsets.symmetric(horizontal: 6), 60 | title: Text( 61 | title, 62 | maxLines: 2, 63 | style: asset.introStyles(20), 64 | ), 65 | subtitle: Text( 66 | desc, 67 | style: asset.introStyles(16, color: Colors.grey), 68 | ), 69 | trailing: Padding( 70 | padding: const EdgeInsets.only(right: 15), 71 | child: isSelected 72 | ? const Icon( 73 | Icons.radio_button_checked_rounded, 74 | color: Colors.black, 75 | ) 76 | : const Icon( 77 | Icons.radio_button_off_rounded, 78 | color: Colors.black, 79 | ), 80 | ), 81 | leading: SizedBox( 82 | height: 55, 83 | width: 55, 84 | child: ClipRRect( 85 | borderRadius: BorderRadius.circular(10), 86 | child: Image.network( 87 | "https://thumbs.dreamstime.com/b/gift-box-icon-surprise-black-white-vector-illustration-226582068.jpg", 88 | fit: BoxFit.fill, 89 | ), 90 | ), 91 | ), 92 | ); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/feature/auth/presentation/screens/splash_screen/main_splash_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/auth/presentation/screens/auth_screens/auth_main_screen.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:evira_shop/core/asset_constants.dart' as asset; 4 | import 'package:introduction_screen/introduction_screen.dart'; 5 | 6 | class MainSplashScreen extends StatelessWidget { 7 | @override 8 | Widget build(BuildContext context) { 9 | return Scaffold( 10 | body: FutureBuilder( 11 | future: Future.delayed(const Duration(seconds: 2)), 12 | builder: (context, snapshot) => 13 | snapshot.connectionState == ConnectionState.waiting 14 | ? Center( 15 | child: Column( 16 | mainAxisAlignment: MainAxisAlignment.center, 17 | children: [ 18 | Expanded( 19 | child: Image.asset( 20 | asset.logo2, 21 | width: 200, 22 | ), 23 | ), 24 | const CircularProgressIndicator( 25 | color: Colors.black87, 26 | strokeWidth: 7, 27 | ), 28 | const SizedBox( 29 | height: 50, 30 | ), 31 | ]), 32 | ) 33 | : IntroductionScreen( 34 | showNextButton: true, 35 | showDoneButton: true, 36 | onDone: () { 37 | Navigator.popAndPushNamed( 38 | context, AuthMainScreen.routename); 39 | }, 40 | done: const Text( 41 | 'Done', 42 | style: TextStyle( 43 | color: Colors.black54, 44 | fontSize: 22, 45 | fontFamily: 'Ubuntu'), 46 | ), 47 | dotsDecorator: const DotsDecorator( 48 | activeColor: Colors.black87, 49 | activeSize: Size(20, 35)), 50 | next: const Icon( 51 | Icons.arrow_forward_ios_outlined, 52 | color: Colors.black54, 53 | size: 30, 54 | ), 55 | pages: [ 56 | pageviewmodel( 57 | 'We provide high quality products for you', 58 | asset.splash_login), 59 | pageviewmodel( 60 | 'Your satisfaction is our number one priority', 61 | asset.splash_check), 62 | pageviewmodel( 63 | "Let's fulfill your daily needs with Evira right now!", 64 | asset.splash_store) 65 | ], 66 | ))); 67 | } 68 | 69 | PageViewModel pageviewmodel(String title, String image) { 70 | return PageViewModel( 71 | titleWidget: Text(title, 72 | textAlign: TextAlign.center, 73 | style: const TextStyle( 74 | color: Colors.black, 75 | fontFamily: 'Ubuntu', 76 | fontSize: 40, 77 | )), 78 | body: '', 79 | image: Image.asset( 80 | image, 81 | ), 82 | decoration: const PageDecoration( 83 | imageFlex: 2, 84 | bodyFlex: 1, 85 | bodyPadding: EdgeInsets.zero, 86 | imagePadding: EdgeInsets.all(10)), 87 | ); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /lib/feature/auth/presentation/screens/auth_screens/forgot_password_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/auth/domain/usecases/forgot_password_usecase.dart'; 2 | import 'package:evira_shop/feature/auth/presentation/bloc/cubit/auth_cubit.dart'; 3 | import 'package:evira_shop/feature/auth/presentation/screens/auth_screens/login_screen.dart'; 4 | import 'package:evira_shop/feature/auth/presentation/widgets/back_app_bar.dart'; 5 | import 'package:evira_shop/core/asset_constants.dart' as asset; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter/services.dart'; 8 | import 'package:flutter_bloc/flutter_bloc.dart'; 9 | 10 | class ForgotPasswordScreen extends StatelessWidget { 11 | TextEditingController email = TextEditingController(); 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | appBar: BackAppBar(context, "Forgot Password"), 16 | body: BlocConsumer( 17 | listener: (context, state) { 18 | if (state is AuthSuccess) { 19 | ScaffoldMessenger.of(context).showSnackBar(SnackBar( 20 | content: Text("Email Sent Successfully"), 21 | backgroundColor: Colors.green, 22 | )); 23 | Navigator.of(context).pop(); 24 | } 25 | if (state is AuthFailure) { 26 | ScaffoldMessenger.of(context).showSnackBar(SnackBar( 27 | content: Text(state.error), 28 | backgroundColor: Theme.of(context).errorColor, 29 | )); 30 | } 31 | }, 32 | builder: (context, state) { 33 | if (state is AuthLoading) { 34 | return const Center( 35 | child: CircularProgressIndicator( 36 | color: Colors.black87, 37 | strokeWidth: 7, 38 | ), 39 | ); 40 | } else { 41 | return Column( 42 | children: [ 43 | Image.asset(asset.otp), 44 | Padding( 45 | padding: const EdgeInsets.symmetric(horizontal: 18.0), 46 | child: TextField( 47 | style: asset.introStyles(24), 48 | controller: email, 49 | decoration: InputDecoration( 50 | fillColor: Colors.white, 51 | hintText: "Enter your email address", 52 | hintStyle: asset.introStyles(18, color: Colors.black45), 53 | focusedBorder: OutlineInputBorder( 54 | borderRadius: BorderRadius.circular(20), 55 | borderSide: const BorderSide( 56 | color: Colors.black, width: 1.5)), 57 | filled: true, 58 | border: OutlineInputBorder( 59 | borderSide: BorderSide.none, 60 | borderRadius: BorderRadius.circular(20))), 61 | ), 62 | ), 63 | ], 64 | ); 65 | } 66 | }, 67 | ), 68 | bottomNavigationBar: Container( 69 | margin: const EdgeInsets.symmetric(vertical: 13, horizontal: 10), 70 | height: 70, 71 | child: InkWell( 72 | onTap: () async { 73 | BlocProvider.of(context).resetPassword(email.text); 74 | }, 75 | child: Container( 76 | width: double.infinity, 77 | padding: const EdgeInsets.symmetric(vertical: 20), 78 | alignment: Alignment.center, 79 | decoration: BoxDecoration( 80 | color: Colors.black87, 81 | borderRadius: BorderRadius.circular(35)), 82 | child: const Text( 83 | "Reset Password", 84 | style: TextStyle( 85 | color: Colors.white, fontFamily: 'Ubuntu', fontSize: 26), 86 | ), 87 | ), 88 | )), 89 | ); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/screens/home/profile/profile_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/product/presentation/widgets/default_app_bar.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:evira_shop/core/asset_constants.dart' as asset; 4 | 5 | class ProfileScreen extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | appBar: DefaultAppBar('Profile'), 10 | body: SizedBox( 11 | height: MediaQuery.of(context).size.height, 12 | child: Center( 13 | child: Column( 14 | children: [ 15 | SizedBox( 16 | height: 120, 17 | width: 120, 18 | child: Stack(children: [ 19 | const CircleAvatar( 20 | radius: 60, 21 | backgroundImage: NetworkImage( 22 | "https://cdn.pixabay.com/photo/2021/04/25/14/30/man-6206540_1280.jpg"), 23 | ), 24 | Positioned( 25 | bottom: 0, 26 | right: 0, 27 | child: Container( 28 | height: 30, 29 | width: 30, 30 | decoration: BoxDecoration( 31 | color: Colors.black, 32 | borderRadius: BorderRadius.circular(10)), 33 | child: const Icon( 34 | Icons.edit, 35 | color: Colors.white, 36 | )), 37 | ) 38 | ]), 39 | ), 40 | SizedBox( 41 | height: 20, 42 | ), 43 | Text( 44 | 'Andrew Ainsley', 45 | style: asset.introStyles(24), 46 | ), 47 | const SizedBox( 48 | height: 15, 49 | ), 50 | Expanded( 51 | child: ListView( 52 | children: [ 53 | setting_btn("Edit Profile", Icons.person), 54 | setting_btn("Address", Icons.location_pin), 55 | setting_btn("Notification", Icons.notification_add), 56 | setting_btn("Payment", Icons.payment), 57 | setting_btn("Security", Icons.security), 58 | setting_btn("Language", Icons.language), 59 | setting_btn("Dark Mode", Icons.remove_red_eye_outlined), 60 | setting_btn("Privacy Policy", Icons.lock_outline_rounded), 61 | setting_btn("Help Center", Icons.help), 62 | setting_btn("Invite Friends", Icons.group_add_outlined), 63 | ListTile( 64 | minLeadingWidth: 0, 65 | leading: Icon(Icons.logout_rounded, 66 | size: 30, color: Colors.red.shade300), 67 | title: Text( 68 | 'Logout', 69 | style: 70 | asset.introStyles(18, color: Colors.red.shade300), 71 | ), 72 | ) 73 | ], 74 | )) 75 | ], 76 | ), 77 | ), 78 | )); 79 | } 80 | 81 | ListTile setting_btn( 82 | String title, 83 | IconData leadingIcon, 84 | ) { 85 | return ListTile( 86 | visualDensity: const VisualDensity(vertical: -2), 87 | minLeadingWidth: 0, 88 | leading: Icon( 89 | leadingIcon, 90 | size: 24, 91 | color: Colors.black54, 92 | ), 93 | title: Text( 94 | title, 95 | style: asset.introStyles(18), 96 | ), 97 | trailing: const Icon( 98 | Icons.arrow_forward_ios_rounded, 99 | color: Colors.black54, 100 | ), 101 | ); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | evira_shop 33 | 34 | 35 | 36 | 39 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /lib/feature/product/data/datasource/network_db/product_network_db_impl.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | import 'package:cloud_firestore/cloud_firestore.dart'; 5 | import 'package:evira_shop/feature/auth/domain/entities/user_credentail_entity.dart'; 6 | import 'package:evira_shop/feature/product/data/models/carousel_model.dart'; 7 | import 'package:evira_shop/feature/product/data/models/product_model.dart'; 8 | import 'package:evira_shop/feature/product/domain/entities/carousel_entity.dart'; 9 | import 'package:evira_shop/feature/product/domain/entities/product_entity.dart'; 10 | 11 | import 'package:firebase_auth/firebase_auth.dart'; 12 | 13 | import 'package:flutter/material.dart'; 14 | 15 | import 'package:flutter/services.dart' show rootBundle; 16 | 17 | import 'product_network_db.dart'; 18 | 19 | class ProductNetworkDbImpl implements ProductNetworkDb { 20 | int itemnum = 0; 21 | List> newList = []; 22 | final FirebaseAuth _firebaseAuth = FirebaseAuth.instance; 23 | @override 24 | Future> getProductData(String filename) async { 25 | List? productList; 26 | await rootBundle.loadString('assets/json/$filename.json').then((value) { 27 | List decodedData = json.decode(value); 28 | productList = decodedData.map((e) => ProductModel.fromJson(e)).toList(); 29 | }); 30 | 31 | return productList!; 32 | } 33 | 34 | @override 35 | Future> getCarouselData() async { 36 | List? carouselList; 37 | await rootBundle.loadString('assets/json/carousel.json').then((value) { 38 | List decodedData = json.decode(value); 39 | carouselList = decodedData.map((e) => CarouselModel.fromJson(e)).toList(); 40 | }); 41 | return carouselList!; 42 | } 43 | 44 | @override 45 | Future addtoCart(Map cartProductData) async { 46 | await FirebaseFirestore.instance 47 | .collection('users') 48 | .doc(_firebaseAuth.currentUser!.uid) 49 | .collection('cart_orders') 50 | .add({ 51 | 'title': cartProductData['title'], 52 | 'price': cartProductData['price'], 53 | 'product_img_url': cartProductData['product_img_url'], 54 | }); 55 | 56 | //Helps once to upload all json product to firebase 57 | 58 | // await FirebaseFirestore.instance.collection('products').add({ 59 | // 'id':FirebaseFirestore.instance.collection('products').doc().path, 60 | // 'title': cartProductData['title'], 61 | // 'price': cartProductData['price'], 62 | // 'product_img_url': cartProductData['product_img_url'], 63 | // 'category': cartProductData['category'], 64 | // 'quantity': 200, 65 | // 'sale': true, 66 | // 'featured': true, 67 | // 'total_orders':0 68 | // }); 69 | } 70 | 71 | @override 72 | Future orderProduct() async { 73 | var data = FirebaseFirestore.instance 74 | .collection('users') 75 | .doc(_firebaseAuth.currentUser!.uid) 76 | .collection('cart_orders') 77 | .get(); 78 | data 79 | .then((value) => value.docs.forEach((element) async { 80 | await FirebaseFirestore.instance 81 | .collection('users') 82 | .doc(_firebaseAuth.currentUser!.uid) 83 | .collection('orders') 84 | .add({ 85 | "title": element['title'], 86 | "price": element['price'], 87 | 'product_img_url': element['product_img_url'], 88 | 'time': DateTime.now() 89 | }); 90 | })) 91 | .then((value) async { 92 | await FirebaseFirestore.instance 93 | .collection('users') 94 | .doc(_firebaseAuth.currentUser!.uid) 95 | .collection('cart_orders') 96 | .get() 97 | .then((snapshot) { 98 | for (DocumentSnapshot ds in snapshot.docs) { 99 | ds.reference.delete(); 100 | } 101 | }); 102 | }); 103 | } 104 | 105 | @override 106 | Future deleteCartItem(String id) async { 107 | await FirebaseFirestore.instance 108 | .collection('users') 109 | .doc(_firebaseAuth.currentUser!.uid) 110 | .collection('cart_orders') 111 | .doc(id) 112 | .delete(); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/widgets/product_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/product/presentation/bloc/cubit/product_cubit.dart'; 2 | import 'package:evira_shop/feature/product/presentation/screens/home/home/product_detail_screen.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:evira_shop/core/asset_constants.dart' as asset; 5 | import 'package:flutter_bloc/flutter_bloc.dart'; 6 | 7 | class ProductCard extends StatelessWidget { 8 | List image_url; 9 | String title; 10 | String price; 11 | String category; 12 | ProductCard( 13 | {required this.title, required this.price, required this.image_url,required this.category}); 14 | @override 15 | Widget build(BuildContext context) { 16 | return InkWell( 17 | onTap: () { 18 | Navigator.push( 19 | context, 20 | MaterialPageRoute( 21 | builder: (context) => BlocProvider( 22 | create: (context) => ProductCubit(), 23 | child: ProductDetailScreen( 24 | image_url, title, price, category), 25 | ))); 26 | }, 27 | child: SizedBox( 28 | width: MediaQuery.of(context).size.width * .45, 29 | child: Column( 30 | crossAxisAlignment: CrossAxisAlignment.start, 31 | children: [ 32 | Container( 33 | height: 200, 34 | padding: const EdgeInsets.all(10), 35 | decoration: BoxDecoration( 36 | boxShadow: [ 37 | BoxShadow( 38 | color: Colors.grey.shade300, 39 | spreadRadius: 1, 40 | blurRadius: 1, 41 | ) 42 | ], 43 | color: Colors.white, 44 | borderRadius: BorderRadius.circular(10)), 45 | child: Stack( 46 | fit: StackFit.expand, 47 | children: [ 48 | Container( 49 | decoration: BoxDecoration( 50 | image: DecorationImage( 51 | image: NetworkImage(image_url[0].toString()), 52 | )), 53 | ), 54 | Positioned( 55 | top: 10, 56 | right: 10, 57 | child: CircleAvatar( 58 | backgroundColor: Colors.black54, 59 | radius: 15, 60 | child: Image.asset( 61 | asset.heart, 62 | color: Colors.white, 63 | width: 22, 64 | ), 65 | )) 66 | ], 67 | )), 68 | Padding( 69 | padding: const EdgeInsets.only(left: 8.0), 70 | child: Column( 71 | crossAxisAlignment: CrossAxisAlignment.start, 72 | children: [ 73 | Text( 74 | title, 75 | maxLines: 1, 76 | overflow: TextOverflow.ellipsis, 77 | style: asset.introStyles(20, color: Colors.black), 78 | ), 79 | Row( 80 | mainAxisAlignment: MainAxisAlignment.start, 81 | children: [ 82 | const Icon(Icons.star_half_outlined), 83 | Text( 84 | ' 4.5 | ', 85 | style: asset.introStyles(16, color: Colors.grey), 86 | ), 87 | Container( 88 | width: 60, 89 | height: 20, 90 | padding: const EdgeInsets.symmetric(horizontal: 4), 91 | alignment: Alignment.center, 92 | color: Colors.grey.shade300, 93 | child: Text( 94 | '8,374 sold', 95 | style: asset.introStyles(12), 96 | ), 97 | ), 98 | ], 99 | ), 100 | Text( 101 | '₹$price', 102 | style: asset.introStyles(20), 103 | ) 104 | ], 105 | ), 106 | ), 107 | ], 108 | ), 109 | ), 110 | ); 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /lib/feature/auth/data/datasource/network_db/auth_network_db_impl.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | import 'dart:math'; 3 | 4 | import 'package:cloud_firestore/cloud_firestore.dart'; 5 | import 'package:evira_shop/feature/auth/domain/entities/user_credentail_entity.dart'; 6 | import 'package:firebase_auth/firebase_auth.dart'; 7 | import 'package:firebase_storage/firebase_storage.dart'; 8 | import 'package:flutter/material.dart'; 9 | 10 | import 'auth_network_db.dart'; 11 | 12 | class AuthNetworkDBImpl implements AuthNetworkDB { 13 | final FirebaseAuth _firebaseAuth = FirebaseAuth.instance; 14 | String? _verificationId; 15 | @override 16 | Future createUser( 17 | UserCredentialEntity userCredentialEntity, BuildContext context) async { 18 | try { 19 | await _firebaseAuth.createUserWithEmailAndPassword( 20 | email: userCredentialEntity.email, 21 | password: userCredentialEntity.password); 22 | return "Success"; 23 | } on FirebaseException catch (error) { 24 | return error.message.toString(); 25 | } catch (error) { 26 | return error.toString(); 27 | } 28 | } 29 | 30 | @override 31 | Future createUserProfile(Map usercredentials, 32 | BuildContext context, File image) async { 33 | try { 34 | final ref = FirebaseStorage.instance 35 | .ref() 36 | .child('user-images') 37 | .child(_firebaseAuth.currentUser!.uid + '.jpeg'); 38 | ref.putFile(image).whenComplete(() => null); 39 | await FirebaseFirestore.instance 40 | .collection('users') 41 | .doc(_firebaseAuth.currentUser!.uid) 42 | .set({ 43 | 'fullname': usercredentials['fullname'], 44 | 'nickname': usercredentials['nickname'], 45 | 'DOB': usercredentials['date'], 46 | 'email': usercredentials['email'], 47 | 'gender': usercredentials['gender'] 48 | }).then((value) => print('Success')); 49 | return "Success"; 50 | } on FirebaseException catch (error) { 51 | return error.message.toString(); 52 | } catch (error) { 53 | return error.toString(); 54 | } 55 | } 56 | 57 | @override 58 | Future loginUser( 59 | UserCredentialEntity userCredentialEntity, BuildContext context) async { 60 | try { 61 | await _firebaseAuth.signInWithEmailAndPassword( 62 | email: userCredentialEntity.email, 63 | password: userCredentialEntity.password); 64 | return "Success"; 65 | } on FirebaseAuthException catch (error) { 66 | return error.message.toString(); 67 | } catch (e) { 68 | return e.toString(); 69 | } 70 | } 71 | 72 | //Phone auth only works when we have google play console developer account 73 | @override 74 | Future authsendOTP(String phoneNumber) async { 75 | String returnStatus = ""; 76 | print(phoneNumber); 77 | await _firebaseAuth 78 | .verifyPhoneNumber( 79 | phoneNumber: phoneNumber.toString(), 80 | codeSent: (verificationId, forceResendingToken) { 81 | _verificationId = verificationId; 82 | returnStatus = "AuthCodeSent"; 83 | }, 84 | verificationCompleted: (phoneAuthCredential) async { 85 | returnStatus = await signInWithPhone(phoneAuthCredential); 86 | }, 87 | verificationFailed: (error) { 88 | returnStatus = error.message.toString(); 89 | }, 90 | codeAutoRetrievalTimeout: (verificationId) { 91 | _verificationId = verificationId; 92 | }, 93 | ) 94 | .then((value) { 95 | return returnStatus; 96 | }); 97 | return returnStatus; 98 | } 99 | 100 | @override 101 | Future authverifyOTP(int otp) async { 102 | PhoneAuthCredential phoneAuthCredential = PhoneAuthProvider.credential( 103 | verificationId: _verificationId!, smsCode: otp.toString()); 104 | return await signInWithPhone(phoneAuthCredential); 105 | } 106 | 107 | Future signInWithPhone( 108 | PhoneAuthCredential phoneAuthCredential) async { 109 | try { 110 | await _firebaseAuth.signInWithCredential(phoneAuthCredential); 111 | return "Success"; 112 | } on FirebaseAuthException catch (error) { 113 | return error.message.toString(); 114 | } 115 | } 116 | 117 | @override 118 | Future forgotpassword(String email) async { 119 | try { 120 | await _firebaseAuth.sendPasswordResetEmail(email: email); 121 | return "Success"; 122 | } on FirebaseAuthException catch (error) { 123 | return error.message.toString(); 124 | } 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/screens/home/cart/choose_shipping_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/product/presentation/bloc/cubit/product_cubit.dart'; 2 | import 'package:evira_shop/feature/product/presentation/widgets/back_app_bar.dart'; 3 | import 'package:evira_shop/feature/product/presentation/widgets/transaction_button.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:evira_shop/core/asset_constants.dart' as asset; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | 8 | import 'promo_screen.dart'; 9 | 10 | class 11 | ChooseShippingScreen extends StatelessWidget { 12 | 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: BackAppBar(context,'Choose Shipping'), 18 | body: Container( 19 | padding: const EdgeInsets.symmetric(horizontal: 10), 20 | child: SizedBox( 21 | height: MediaQuery.of(context).size.height * .45, 22 | child: Column( 23 | mainAxisAlignment: MainAxisAlignment.spaceAround, 24 | children: [ 25 | shipping_address_tile( 26 | "Economy", 27 | "Estimated Arrival,Dec 21-23 ", 28 | "https://cdn1.iconfinder.com/data/icons/black-round-web-icons/100/round-web-icons-black-10-512.png", 29 | false, 30 | "120"), 31 | shipping_address_tile( 32 | "Regular", 33 | "Estimated Arrival,Dec 20-22 ", 34 | "https://cdn1.iconfinder.com/data/icons/black-round-web-icons/100/round-web-icons-black-10-512.png", 35 | true, 36 | "180"), 37 | shipping_address_tile( 38 | "Cargo", 39 | "Estimated Arrival,Dec 19-20 ", 40 | "https://cdn1.iconfinder.com/data/icons/black-round-web-icons/100/round-web-icons-black-10-512.png", 41 | false, 42 | "220"), 43 | shipping_address_tile( 44 | "Express", 45 | "Estimated Arrival,Dec 18-19 ", 46 | "https://cdn1.iconfinder.com/data/icons/black-round-web-icons/100/round-web-icons-black-10-512.png", 47 | false, 48 | "250"), 49 | ], 50 | ), 51 | ), 52 | ), 53 | bottomNavigationBar: Container( 54 | margin: const EdgeInsets.symmetric(vertical: 13, horizontal: 10), 55 | child: TransactionButton( 56 | mediaQuery: MediaQuery.of(context).size.width * .9, 57 | verticalpadding: 20, 58 | title: 'Apply', 59 | suffixIcon: const SizedBox(), 60 | trasaction_fun: () { 61 | Navigator.of(context).push(MaterialPageRoute( 62 | builder: (context) => BlocProvider( 63 | create: (context) => ProductCubit(), 64 | child: PromoScreen(), 65 | ), 66 | )); 67 | }, 68 | ), 69 | ), 70 | ); 71 | } 72 | 73 | ListTile shipping_address_tile(String title, String address, String image, 74 | bool isSelected, String price) { 75 | return ListTile( 76 | contentPadding: const EdgeInsets.symmetric(horizontal: 6), 77 | title: Text( 78 | title, 79 | maxLines: 2, 80 | style: asset.introStyles(20), 81 | ), 82 | subtitle: Text( 83 | address, 84 | style: asset.introStyles(16, color: Colors.grey), 85 | ), 86 | trailing: SizedBox( 87 | width: 110, 88 | child: Row( 89 | mainAxisAlignment: MainAxisAlignment.spaceAround, 90 | crossAxisAlignment: CrossAxisAlignment.end, 91 | children: [ 92 | Text( 93 | "₹" + price, 94 | style: asset.introStyles(22), 95 | ), 96 | isSelected 97 | ? const Icon( 98 | Icons.radio_button_checked_rounded, 99 | color: Colors.black, 100 | ) 101 | : const Icon( 102 | Icons.radio_button_off_rounded, 103 | color: Colors.black, 104 | ) 105 | ], 106 | ), 107 | ), 108 | leading: SizedBox( 109 | height: 55, 110 | width: 55, 111 | child: ClipRRect( 112 | borderRadius: BorderRadius.circular(10), 113 | child: Image.network( 114 | image, 115 | fit: BoxFit.fill, 116 | ), 117 | ), 118 | ), 119 | ); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/screens/home/cart/payment_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/product/presentation/bloc/cubit/product_cubit.dart'; 2 | import 'package:evira_shop/feature/product/presentation/widgets/back_app_bar.dart'; 3 | import 'package:evira_shop/feature/product/presentation/widgets/transaction_button.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:evira_shop/core/asset_constants.dart' as asset; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | 8 | import '../main_home_screen.dart'; 9 | 10 | class PaymentScreen extends StatelessWidget { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: BackAppBar(context, 'Payments Methods'), 15 | body: Container( 16 | padding: const EdgeInsets.symmetric(horizontal: 15), 17 | child: SizedBox( 18 | child: ListView(children: [ 19 | Text( 20 | 'Select the payment method you want to choose', 21 | style: asset.introStyles(18), 22 | ), 23 | const SizedBox( 24 | height: 8, 25 | ), 26 | Container( 27 | height: MediaQuery.of(context).size.height * .35, 28 | child: Column( 29 | mainAxisAlignment: MainAxisAlignment.spaceAround, 30 | crossAxisAlignment: CrossAxisAlignment.end, 31 | children: [ 32 | payment_tile("My Wallet", "Estimated Arrival,Dec 21-23 ", 33 | asset.wallet, true, true), 34 | payment_tile("PayPal", "Estimated Arrival,Dec 20-22 ", 35 | asset.paypal, false, false), 36 | payment_tile("Google Pay", "Estimated Arrival,Dec 19-20 ", 37 | asset.google_logo, false, false), 38 | payment_tile("Apple Pay", "Estimated Arrival,Dec 18-19 ", 39 | asset.apple_logo, false, false), 40 | ], 41 | ), 42 | ), 43 | ]), 44 | ), 45 | ), 46 | bottomNavigationBar: Container( 47 | margin: const EdgeInsets.symmetric(vertical: 13, horizontal: 10), 48 | child: TransactionButton( 49 | mediaQuery: MediaQuery.of(context).size.width * .9, 50 | verticalpadding: 20, 51 | title: 'Confirm Payment', 52 | suffixIcon: const SizedBox(), 53 | trasaction_fun: () { 54 | BlocProvider.of(context) 55 | .orderProduct() 56 | .then((value) => 57 | ScaffoldMessenger.of(context).showSnackBar(SnackBar( 58 | content: Text( 59 | 'Ordered Successfully..', 60 | style: asset.introStyles(18, color: Colors.white), 61 | ), 62 | backgroundColor: Colors.green, 63 | ))) 64 | .then((value) => Navigator.pushNamedAndRemoveUntil( 65 | context, MainHomeScreen.routename, (route) => false)); 66 | }, 67 | ), 68 | ), 69 | ); 70 | } 71 | 72 | ListTile payment_tile(String title, String address, String icon_url, 73 | bool isSelected, bool isPriceneeded) { 74 | return ListTile( 75 | contentPadding: const EdgeInsets.symmetric( 76 | horizontal: 6, 77 | ), 78 | title: Text( 79 | title, 80 | maxLines: 2, 81 | style: asset.introStyles(20), 82 | ), 83 | trailing: SizedBox( 84 | width: 110, 85 | child: Row( 86 | mainAxisAlignment: isPriceneeded 87 | ? MainAxisAlignment.spaceAround 88 | : MainAxisAlignment.end, 89 | crossAxisAlignment: CrossAxisAlignment.center, 90 | children: [ 91 | if (isPriceneeded) 92 | Text( 93 | "₹2,54,856", 94 | style: asset.introStyles(20), 95 | ), 96 | isSelected 97 | ? const Icon( 98 | Icons.radio_button_checked_rounded, 99 | color: Colors.black, 100 | ) 101 | : const Icon( 102 | Icons.radio_button_off_rounded, 103 | color: Colors.black, 104 | ) 105 | ], 106 | ), 107 | ), 108 | leading: SizedBox( 109 | height: 35, 110 | width: 35, 111 | child: ClipRRect( 112 | borderRadius: BorderRadius.circular(10), 113 | child: Image.asset(icon_url)), 114 | ), 115 | ); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: evira_shop 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.15.1 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | animate_do: ^2.1.0 31 | bloc: ^8.0.3 32 | build_runner: ^2.1.11 33 | carousel_slider: ^4.1.1 34 | cloud_firestore: ^3.1.9 35 | cupertino_icons: ^1.0.2 36 | equatable: ^2.0.3 37 | firebase_auth: ^3.3.8 38 | firebase_core: ^1.12.0 39 | firebase_storage: ^10.2.8 40 | flutter: 41 | sdk: flutter 42 | flutter_bloc: ^8.0.1 43 | get_it: ^7.2.0 44 | image_picker: ^0.8.5+3 45 | intl: ^0.17.0 46 | introduction_screen: ^3.0.2 47 | json_annotation: ^4.5.0 48 | json_serializable: ^6.2.0 49 | 50 | 51 | dependency_overrides: 52 | image_picker_android: 0.8.4+13 53 | firebase_messaging_platform_interface: 3.1.6 54 | firebase_crashlytics_platform_interface: 3.1.13 55 | cloud_firestore_platform_interface: 5.4.13 56 | firebase_auth_platform_interface: 6.1.11 57 | firebase_storage_platform_interface: 4.0.14 58 | cloud_functions_platform_interface: 5.0.21 59 | firebase_analytics_platform_interface: 3.0.5 60 | firebase_remote_config_platform_interface: 1.0.5 61 | firebase_dynamic_links_platform_interface: 0.2.0+5 62 | firebase_performance_platform_interface: 0.1.0+5 63 | firebase_app_installations_platform_interface: 0.1.0+6 64 | 65 | dev_dependencies: 66 | flutter_lints: ^1.0.0 67 | flutter_test: 68 | sdk: flutter 69 | kiwi_generator: ^4.0.2 70 | 71 | # For information on the generic Dart part of this file, see the 72 | # following page: https://dart.dev/tools/pub/pubspec 73 | # The following section is specific to Flutter. 74 | flutter: 75 | 76 | # The following line ensures that the Material Icons font is 77 | # included with your application, so that you can use the icons in 78 | # the material Icons class. 79 | uses-material-design: true 80 | 81 | # To add assets to your application, add an assets section, like this: 82 | assets: 83 | - assets/images/illustrations/ 84 | - assets/icons/logo/ 85 | - assets/icons/general/home/ 86 | - assets/icons/general/social/ 87 | - assets/json/ 88 | - assets/icons/general/bottom_nav/ 89 | 90 | # An image asset can refer to one or more resolution-specific "variants", see 91 | # https://flutter.dev/assets-and-images/#resolution-aware. 92 | # For details regarding adding assets from package dependencies, see 93 | # https://flutter.dev/assets-and-images/#from-packages 94 | # To add custom fonts to your application, add a fonts section here, 95 | # in this "flutter" section. Each entry in this list should have a 96 | # "family" key with the font family name, and a "fonts" key with a 97 | # list giving the asset and other descriptors for the font. For 98 | # example: 99 | fonts: 100 | - family: Ubuntu 101 | fonts: 102 | - asset: assets/fonts/ubuntu/Ubuntu-Medium.ttf 103 | # - family: Trajan Pro 104 | # fonts: 105 | # - asset: fonts/TrajanPro.ttf 106 | # - asset: fonts/TrajanPro_Bold.ttf 107 | # weight: 700 108 | # 109 | # For details regarding fonts from package dependencies, 110 | # see https://flutter.dev/custom-fonts/#from-packages 111 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/widgets/order_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/product/presentation/widgets/transaction_button.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:evira_shop/core/asset_constants.dart' as asset; 4 | 5 | class OrderCard extends StatelessWidget { 6 | String status; 7 | String title; 8 | String image_url; 9 | String price; 10 | OrderCard( 11 | {required this.status, 12 | required this.title, 13 | required this.price, 14 | required this.image_url}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Container( 19 | height: 160, 20 | margin: const EdgeInsets.symmetric(horizontal: 20), 21 | padding: const EdgeInsets.only(right: 10, bottom: 7, top: 7), 22 | decoration: BoxDecoration( 23 | borderRadius: BorderRadius.circular(20), 24 | boxShadow: [ 25 | BoxShadow( 26 | color: Colors.grey.shade300, 27 | spreadRadius: 1, 28 | blurRadius: 2, 29 | ) 30 | ], 31 | color: Colors.white), 32 | child: Row( 33 | children: [ 34 | Container( 35 | width: 120, 36 | height: 145, 37 | margin: const EdgeInsets.symmetric(horizontal: 10), 38 | decoration: BoxDecoration( 39 | borderRadius: BorderRadius.circular(15), 40 | image: DecorationImage( 41 | image: NetworkImage( 42 | image_url, 43 | ))), 44 | ), 45 | Expanded( 46 | child: Column( 47 | mainAxisAlignment: MainAxisAlignment.spaceAround, 48 | crossAxisAlignment: CrossAxisAlignment.start, 49 | children: [ 50 | Row( 51 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 52 | children: [ 53 | SizedBox( 54 | width: 150, 55 | child: Text( 56 | title, 57 | maxLines: 3, 58 | overflow: TextOverflow.ellipsis, 59 | style: asset.introStyles(20), 60 | ), 61 | ), 62 | status == 'In Delivery' 63 | ? const Icon( 64 | Icons.delete, 65 | color: Colors.black54, 66 | ) 67 | : Container() 68 | ], 69 | ), 70 | Row( 71 | children: [ 72 | const Icon(Icons.circle), 73 | Text( 74 | ' Color', 75 | style: asset.introStyles(16, color: Colors.black54), 76 | ) 77 | ], 78 | ), 79 | Container( 80 | width: 70, 81 | height: 20, 82 | padding: const EdgeInsets.symmetric(horizontal: 4), 83 | alignment: Alignment.center, 84 | decoration: BoxDecoration( 85 | color: Colors.grey.shade300, 86 | borderRadius: BorderRadius.circular(5)), 87 | child: Text( 88 | status == 'In Delivery' ? 'In Delivery' : 'Completed', 89 | style: asset.introStyles(12), 90 | ), 91 | ), 92 | Row( 93 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 94 | children: [ 95 | Text( 96 | '₹' + price, 97 | style: asset.introStyles(22), 98 | ), 99 | TransactionButton( 100 | mediaQuery: 120, 101 | title: status == 'In Delivery' 102 | ? 'Track Order' 103 | : 'Leave Review', 104 | titleSize: 16, 105 | middlepadding: 2, 106 | verticalpadding: 5, 107 | suffixIcon: status == 'In Delivery' 108 | ? const Icon( 109 | Icons.track_changes_outlined, 110 | color: Colors.white, 111 | ) 112 | : Container(), 113 | trasaction_fun: () {}) 114 | ], 115 | ) 116 | ], 117 | ), 118 | ) 119 | ], 120 | ), 121 | ); 122 | 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /lib/feature/product/presentation/screens/home/home/most_popular_product_screen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'package:evira_shop/feature/product/domain/entities/product_entity.dart'; 3 | import 'package:evira_shop/feature/product/presentation/bloc/cubit/product_cubit.dart'; 4 | import 'package:evira_shop/feature/product/presentation/widgets/back_app_bar.dart'; 5 | import 'package:evira_shop/feature/product/presentation/widgets/product_card.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:evira_shop/core/asset_constants.dart' as asset; 8 | import 'package:flutter_bloc/flutter_bloc.dart'; 9 | 10 | class MostPopularProductScreen extends StatefulWidget { 11 | static const routename = "/most-popular-product-screen"; 12 | 13 | @override 14 | State createState() => 15 | _MostPopularProductScreenState(); 16 | } 17 | 18 | class _MostPopularProductScreenState extends State { 19 | String category = "clothes"; 20 | @override 21 | Widget build(BuildContext context) { 22 | return Scaffold( 23 | appBar: BackAppBar(context, "Most Popular"), 24 | body: Padding( 25 | padding: const EdgeInsets.symmetric(horizontal: 12), 26 | child: SizedBox( 27 | height: double.infinity, 28 | child: Column( 29 | children: [ 30 | SizedBox( 31 | height: 60, 32 | child: FutureBuilder( 33 | future: DefaultAssetBundle.of(context) 34 | .loadString('assets/json/category.json'), 35 | builder: (BuildContext context, AsyncSnapshot snapshot) { 36 | if (snapshot.connectionState == ConnectionState.waiting) { 37 | return const CircularProgressIndicator(); 38 | } else { 39 | var categoryData = json.decode(snapshot.data.toString()) 40 | as List; 41 | return ListView.builder( 42 | shrinkWrap: true, 43 | scrollDirection: Axis.horizontal, 44 | itemBuilder: (context, index) { 45 | return GestureDetector( 46 | onTap: () { 47 | setState(() { 48 | category = categoryData[index]['title']; 49 | category = category.toLowerCase(); 50 | }); 51 | }, 52 | child: Padding( 53 | padding: const EdgeInsets.only(right: 2.0), 54 | child: asset.category_chip( 55 | categoryData[index]['title'], category), 56 | ), 57 | ); 58 | }, 59 | itemCount: categoryData.length, 60 | ); 61 | } 62 | }, 63 | ), 64 | ), 65 | FutureBuilder( 66 | future: BlocProvider.of(context) 67 | .getProductData(category), 68 | builder: 69 | (context, AsyncSnapshot> snapshot) { 70 | if (snapshot.connectionState == ConnectionState.waiting) { 71 | return const Center( 72 | child: CircularProgressIndicator( 73 | color: Colors.black87, 74 | strokeWidth: 7, 75 | ), 76 | ); 77 | } else { 78 | return Expanded( 79 | child: GridView.builder( 80 | itemCount: snapshot.data!.length, 81 | scrollDirection: Axis.vertical, 82 | gridDelegate: 83 | const SliverGridDelegateWithFixedCrossAxisCount( 84 | childAspectRatio: .65, 85 | crossAxisCount: 2, 86 | crossAxisSpacing: 7), 87 | itemBuilder: (context, index) => ProductCard( 88 | title: snapshot.data![index].title, 89 | price: snapshot.data![index].price, 90 | image_url: snapshot.data![index].url, 91 | category: snapshot.data![index].category,)), 92 | ); 93 | } 94 | }), 95 | ], 96 | ), 97 | ), 98 | ), 99 | ); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /lib/feature/auth/presentation/screens/auth_screens/auth_main_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/auth/presentation/bloc/cubit/auth_cubit.dart'; 2 | import 'package:evira_shop/feature/auth/presentation/screens/auth_screens/phone_auth_screen.dart'; 3 | import 'package:evira_shop/feature/auth/presentation/screens/auth_screens/signup_screen.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:evira_shop/core/asset_constants.dart' as asset; 6 | import 'package:flutter_bloc/flutter_bloc.dart'; 7 | 8 | import 'login_screen.dart'; 9 | 10 | class AuthMainScreen extends StatelessWidget { 11 | static const routename = '/authmainscreen'; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | body: Padding( 17 | padding: const EdgeInsets.only(left: 20.0, right: 20), 18 | child: Column( 19 | mainAxisAlignment: MainAxisAlignment.spaceAround, 20 | children: [ 21 | Image.asset( 22 | asset.splash_login, 23 | width: 360, 24 | ), 25 | Text( 26 | "Let's you in", 27 | style: asset.introStyles(50), 28 | ), 29 | Container( 30 | margin: const EdgeInsets.only(top: 20), 31 | height: 160, 32 | child: Column( 33 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 34 | children: [ 35 | login_button('Continue with facebook', asset.facebook_logo), 36 | login_button('Continue with Google', asset.google_logo), 37 | InkWell( 38 | onTap: () { 39 | Navigator.of(context).push(MaterialPageRoute( 40 | builder: (context) => BlocProvider( 41 | create: (context) => AuthCubit(), 42 | child: PhoneAuthScreen(), 43 | ), 44 | )); 45 | }, 46 | child: Row( 47 | mainAxisAlignment: MainAxisAlignment.center, 48 | children: [ 49 | Icon( 50 | Icons.phone, 51 | size: 32, 52 | ), 53 | const SizedBox( 54 | width: 10, 55 | ), 56 | Text( 57 | "Continue with Number", 58 | style: asset.introStyles(20), 59 | ) 60 | ], 61 | ), 62 | ) 63 | ], 64 | ), 65 | ), 66 | Text( 67 | 'or', 68 | style: asset.introStyles(20, color: Colors.black54), 69 | ), 70 | InkWell( 71 | onTap: () { 72 | Navigator.of(context).pushNamed(LoginScreen.routename); 73 | }, 74 | child: Container( 75 | width: double.infinity, 76 | padding: const EdgeInsets.symmetric(vertical: 20), 77 | alignment: Alignment.center, 78 | decoration: BoxDecoration( 79 | color: Colors.black87, 80 | borderRadius: BorderRadius.circular(35)), 81 | child: const Text( 82 | 'Sign in with password', 83 | style: TextStyle( 84 | color: Colors.white, fontFamily: 'Ubuntu', fontSize: 24), 85 | ), 86 | ), 87 | ), 88 | Row( 89 | mainAxisAlignment: MainAxisAlignment.center, 90 | children: [ 91 | Text( 92 | "Don't have account?", 93 | style: asset.introStyles(16, color: Colors.black54), 94 | ), 95 | InkWell( 96 | onTap: () { 97 | Navigator.pushNamed(context, SignUpScreen.routename); 98 | }, 99 | child: Text( 100 | "Sign up", 101 | style: asset.introStyles(16), 102 | ), 103 | ) 104 | ], 105 | ), 106 | const SizedBox( 107 | height: 10, 108 | ) 109 | ], 110 | ), 111 | ), 112 | ); 113 | } 114 | 115 | Row login_button(String title, String iconpath) { 116 | return Row( 117 | mainAxisAlignment: MainAxisAlignment.center, 118 | children: [ 119 | Image.asset( 120 | iconpath, 121 | width: 35, 122 | ), 123 | const SizedBox( 124 | width: 10, 125 | ), 126 | Text( 127 | title, 128 | style: asset.introStyles(20), 129 | ) 130 | ], 131 | ); 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /lib/feature/auth/presentation/screens/auth_screens/phone_auth_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:evira_shop/feature/auth/presentation/bloc/cubit/auth_cubit.dart'; 2 | import 'package:evira_shop/feature/auth/presentation/screens/auth_screens/otp_screen.dart'; 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:evira_shop/core/asset_constants.dart' as asset; 6 | import 'package:evira_shop/feature/auth/presentation/widgets/back_app_bar.dart'; 7 | import 'package:flutter/services.dart'; 8 | import 'package:flutter_bloc/flutter_bloc.dart'; 9 | 10 | class PhoneAuthScreen extends StatefulWidget { 11 | @override 12 | State createState() => _PhoneAuthScreenState(); 13 | } 14 | 15 | class _PhoneAuthScreenState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | TextEditingController phonecontroller = TextEditingController(); 19 | return Scaffold( 20 | appBar: BackAppBar(context, "Continue with Phone"), 21 | body: SingleChildScrollView( 22 | child: BlocConsumer( 23 | listener: (context, state) { 24 | if (state is AuthCodeSentState) { 25 | Navigator.of(context).push(MaterialPageRoute( 26 | builder: (context) => BlocProvider( 27 | create: (context) => AuthCubit(), 28 | child: OtpScreen(), 29 | ))); 30 | } 31 | if (state is AuthFailure) { 32 | ScaffoldMessenger.of(context).showSnackBar(SnackBar( 33 | content: Text(state.error,style: asset.introStyles(16),), 34 | backgroundColor: Theme.of(context).errorColor, 35 | )); 36 | } 37 | }, 38 | builder: (context, state) { 39 | if (state is AuthLoading) { 40 | return const Center( 41 | child: CircularProgressIndicator( 42 | color: Colors.black87, 43 | strokeWidth: 7, 44 | ), 45 | ); 46 | } else { 47 | return Container( 48 | margin: EdgeInsets.only(top: 50, left: 20, right: 20), 49 | child: Column( 50 | children: [ 51 | Image.asset(asset.otp), 52 | TextField( 53 | inputFormatters: [LengthLimitingTextInputFormatter(10)], 54 | keyboardType: TextInputType.number, 55 | style: asset.introStyles(24), 56 | controller: phonecontroller, 57 | decoration: InputDecoration( 58 | fillColor: Colors.white, 59 | prefixIcon: IconTheme( 60 | data:const IconThemeData(color: Colors.grey, size: 25), 61 | child: Padding( 62 | padding:const EdgeInsets.symmetric( 63 | vertical: 14, horizontal: 15), 64 | child: Text( 65 | '(+91)', 66 | style: asset.introStyles(22), 67 | ), 68 | ), 69 | ), 70 | hintText: "Enter your phone Number", 71 | hintStyle: 72 | asset.introStyles(18, color: Colors.black45), 73 | focusedBorder: OutlineInputBorder( 74 | borderRadius: BorderRadius.circular(20), 75 | borderSide: const BorderSide( 76 | color: Colors.black, width: 1.5)), 77 | filled: true, 78 | border: OutlineInputBorder( 79 | borderSide: BorderSide.none, 80 | borderRadius: BorderRadius.circular(20))), 81 | ), 82 | ], 83 | ), 84 | ); 85 | } 86 | }, 87 | ), 88 | ), 89 | bottomNavigationBar: Container( 90 | margin: const EdgeInsets.symmetric(vertical: 13, horizontal: 10), 91 | height: 70, 92 | child: InkWell( 93 | onTap: () async { 94 | BlocProvider.of(context) 95 | .authsendOTP("+91" + phonecontroller.text); 96 | }, 97 | child: Container( 98 | width: double.infinity, 99 | padding: const EdgeInsets.symmetric(vertical: 20), 100 | alignment: Alignment.center, 101 | decoration: BoxDecoration( 102 | color: Colors.black87, 103 | borderRadius: BorderRadius.circular(35)), 104 | child: const Text( 105 | "Continue", 106 | style: TextStyle( 107 | color: Colors.white, fontFamily: 'Ubuntu', fontSize: 26), 108 | ), 109 | ), 110 | )), 111 | ); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /assets/json/watch.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "watch", 4 | "title": "A550 Enticer Men's ( MTP-1314D-1AVDF ) Analog Watch - For Men", 5 | "price": "3,055", 6 | "category": "Watch", 7 | "review": 0, 8 | "url": [ 9 | "https://rukminim1.flixcart.com/image/746/895/kruyw7k0/watch/p/r/q/a550-casio-original-imag5jspqxgcadbw.jpeg?q=50", 10 | "https://rukminim1.flixcart.com/image/746/895/l0bbonk0/watch/s/2/b/-original-imagc4gtefc3jtr3.jpeg?q=50", 11 | "https://rukminim1.flixcart.com/image/746/895/kruyw7k0/watch/w/c/4/a550-casio-original-imag5jspvfa64rgp.jpeg?q=50", 12 | "https://rukminim1.flixcart.com/image/746/895/kruyw7k0/watch/f/1/b/a550-casio-original-imag5jspgzqdscyk.jpeg?q=50", 13 | "https://rukminim1.flixcart.com/image/746/895/kruyw7k0/watch/v/x/4/a550-casio-original-imag5jspkfnxgmse.jpeg?q=50", 14 | "https://rukminim1.flixcart.com/image/746/895/kdlzte80/watch/7/h/u/a550-casio-original-imafuhdh4bnqck66.jpeg?q=50" 15 | ] 16 | }, 17 | { 18 | "type": "watch", 19 | "title": "NH2530BM01 Raga Kitsch Analog Watch - For Women", 20 | "price": "2,484", 21 | "category": "Watch", 22 | "review": 0, 23 | "url": [ 24 | "https://rukminim1.flixcart.com/image/753/904/k6l2vm80/watch/n/d/z/nh2530bm01-titan-original-imafpygsthunuy98.jpeg?q=50", 25 | "https://rukminim1.flixcart.com/image/746/895/k6l2vm80/watch/n/d/z/nh2530bm01-titan-original-imafpygs9kubdccs.jpeg?q=50", 26 | "https://rukminim1.flixcart.com/image/746/895/k6l2vm80/watch/n/d/z/nh2530bm01-titan-original-imafpygsnfyhzkeb.jpeg?q=50", 27 | "https://rukminim1.flixcart.com/image/746/895/k6l2vm80/watch/n/d/z/nh2530bm01-titan-original-imafpygsam6fgrep.jpeg?q=50" 28 | ] 29 | }, 30 | { 31 | "type": "watch", 32 | "title": "BQ1009 RHETT Analog Watch - For Men", 33 | "price": "6,799", 34 | "category": "Watch", 35 | "review": 0, 36 | "url": [ 37 | "https://rukminim1.flixcart.com/image/753/904/k1s6ljk0/watch/z/h/j/bq1009-fossil-original-imafh9xkrfb7a3zf.jpeg?q=50", 38 | "https://rukminim1.flixcart.com/image/746/895/l01blow0/watch/n/e/g/-original-imagbwz3zjyyhaa4.jpeg?q=50", 39 | "https://rukminim1.flixcart.com/image/746/895/ksw4ccw0/watch/g/v/k/bq1009-fossil-men-original-imag6cu9ynzrhdrv.jpeg?q=50", 40 | "https://rukminim1.flixcart.com/image/746/895/k1s6ljk0/watch/z/h/j/bq1009-fossil-original-imafh9xk67qegtrc.jpeg?q=50" 41 | ] 42 | }, 43 | { 44 | "type": "watch", 45 | "title": "Noise ColorFit Vision 2 with 1.78'' Always on AMOLED Display Smartwatch (Black Strap, Regular)", 46 | "price": "6,999", 47 | "category": "Watch", 48 | "review": 0, 49 | "url": [ 50 | "https://rukminim1.flixcart.com/image/416/416/l4pxk7k0/smartwatch/s/q/f/-original-imagfjxz9tvr3j3j.jpeg?q=70", 51 | "https://rukminim1.flixcart.com/image/416/416/l4pxk7k0/smartwatch/x/6/r/-original-imagfjxzbjvkxshd.jpeg?q=70", 52 | "https://rukminim1.flixcart.com/image/416/416/l4pxk7k0/smartwatch/j/1/j/-original-imagfjxznmzturk6.jpeg?q=70", 53 | "https://rukminim1.flixcart.com/image/416/416/l4pxk7k0/smartwatch/5/z/v/-original-imagfjxzhhmcdcds.jpeg?q=70", 54 | "https://rukminim1.flixcart.com/image/416/416/l4pxk7k0/smartwatch/b/e/9/-original-imagfjxz6t23nmqt.jpeg?q=70", 55 | "https://rukminim1.flixcart.com/image/416/416/l4pxk7k0/smartwatch/l/0/s/-original-imagfjxzzpxfhdcr.jpeg?q=70", 56 | "https://rukminim1.flixcart.com/image/416/416/l4pxk7k0/smartwatch/m/f/v/-original-imagfjxzudpg6fws.jpeg?q=70", 57 | "https://rukminim1.flixcart.com/image/416/416/l4pxk7k0/smartwatch/c/7/f/-original-imagfjxz9vwuyrsx.jpeg?q=70", 58 | "https://rukminim1.flixcart.com/image/416/416/l4pxk7k0/smartwatch/g/h/j/-original-imagfjxzkkezjg9c.jpeg?q=70", 59 | "https://rukminim1.flixcart.com/image/416/416/l4pxk7k0/smartwatch/5/t/f/-original-imagfjxz4gpvw2d8.jpeg?q=70", 60 | "https://rukminim1.flixcart.com/image/416/416/l4pxk7k0/smartwatch/k/2/a/-original-imagfjxz5fb9ftgd.jpeg?q=70" 61 | ] 62 | }, 63 | { 64 | "type": "watch", 65 | "title": "Ambrane Wise-roam 1.28' Full HD display,bluetooth calling and complete health tracking Smartwatch (Black Strap, Regular)", 66 | "price": "5,999", 67 | "category": "Watch", 68 | "review": 0, 69 | "url": [ 70 | "https://rukminim1.flixcart.com/image/416/416/l4ei1e80/smartwatch/l/c/9/-original-imagfba2vshh73af.jpeg?q=70", 71 | "https://rukminim1.flixcart.com/image/416/416/l4ei1e80/smartwatch/c/6/q/-original-imagfba2dmzdarug.jpeg?q=70", 72 | "https://rukminim1.flixcart.com/image/416/416/l4ei1e80/smartwatch/l/p/y/-original-imagfba2z8ag5qdj.jpeg?q=70", 73 | "https://rukminim1.flixcart.com/image/416/416/l4ei1e80/smartwatch/7/t/h/-original-imagfba2fgcmz6bg.jpeg?q=70", 74 | "https://rukminim1.flixcart.com/image/416/416/l4ei1e80/smartwatch/u/t/7/-original-imagfba2upz6huzs.jpeg?q=70", 75 | "https://rukminim1.flixcart.com/image/416/416/l4ei1e80/smartwatch/f/c/r/-original-imagfba2rmc847hp.jpeg?q=70", 76 | "https://rukminim1.flixcart.com/image/416/416/l4ei1e80/smartwatch/f/k/z/-original-imagfba2phyqhkpg.jpeg?q=70" 77 | ] 78 | } 79 | ] -------------------------------------------------------------------------------- /assets/json/shoes.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "shoes", 4 | "title": "Sneakers For Men (White)", 5 | "price": "2,599", 6 | "category": "Shoes", 7 | "review":0, 8 | "url": [ 9 | "https://rukminim1.flixcart.com/image/753/904/kpmy8i80/shoe/q/w/p/9-ajwings-magnolia-white-original-imag3thhuz3edrjg.jpeg?q=50", 10 | "https://rukminim1.flixcart.com/image/746/895/kpmy8i80/shoe/9/7/7/9-ajwings-magnolia-white-original-imag3thhyc73rhzg.jpeg?q=50", 11 | "https://rukminim1.flixcart.com/image/746/895/kpmy8i80/shoe/k/n/5/9-ajwings-magnolia-white-original-imag3thhuhyfnxh7.jpeg?q=50", 12 | "https://rukminim1.flixcart.com/image/746/895/kpmy8i80/shoe/f/s/a/9-ajwings-magnolia-white-original-imag3thhh5ug8ajt.jpeg?q=50", 13 | "https://rukminim1.flixcart.com/image/746/895/kpmy8i80/shoe/5/i/e/9-ajwings-magnolia-white-original-imag3thhwed8ancq.jpeg?q=50", 14 | "https://rukminim1.flixcart.com/image/746/895/kpmy8i80/shoe/d/x/o/9-ajwings-magnolia-white-original-imag3thh2yhh9ffg.jpeg?q=50" 15 | ] 16 | }, 17 | { 18 | "type": "shoes", 19 | "title": "EC004 Stylish White Sneakers For Men (White)", 20 | "price": "1,699", 21 | "category": "Shoes", 22 | "review":0, 23 | "url": [ 24 | "https://rukminim1.flixcart.com/image/753/904/l3os4280/shoe/a/r/u/6-sneakertvs-1-echor-white-original-imager4sqgrmpqhv.jpeg?q=50", 25 | "https://rukminim1.flixcart.com/image/746/895/l432ikw0/shoe/j/t/y/8-sneakertvs-1-8-echor-white-original-imagffsfqmxazry2.jpeg?q=50", 26 | "https://rukminim1.flixcart.com/image/746/895/l3os4280/shoe/f/w/0/6-sneakertvs-1-echor-white-original-imager4ssrw2mrfe.jpeg?q=50" 27 | ] 28 | }, 29 | { 30 | "type": "shoes", 31 | "title": "Casual Stylish Sneakers For Men Sneakers For Men (Black)", 32 | "price": "1,299", 33 | "category": "Shoes", 34 | "review":0, 35 | "url": [ 36 | "https://rukminim1.flixcart.com/image/753/904/l45xea80/shoe/r/o/5/6-sneakers-for-men-echor-red-original-imagf4fgx5byfu7y.jpeg?q=50", 37 | "https://rukminim1.flixcart.com/image/746/895/l45xea80/shoe/q/h/u/6-sneakers-for-men-echor-red-original-imagf4fgbnskzzwz.jpeg?q=50", 38 | "https://rukminim1.flixcart.com/image/746/895/l45xea80/shoe/c/h/q/6-sneakers-for-men-echor-red-original-imagf4fghp9gjmzz.jpeg?q=50" 39 | ] 40 | }, 41 | { 42 | "type": "shoes", 43 | "title": "Training & Gym Shoes For Men (Black)", 44 | "price": "999", 45 | "category": "Shoes", 46 | "review":0, 47 | "url": [ 48 | "https://rukminim1.flixcart.com/image/753/904/l02r1jk0/shopsy-shoe/6/e/k/7-005-black-rb-10-eunike-black-original-imagbyc29emtqgzy.jpeg?q=50", 49 | "https://rukminim1.flixcart.com/image/746/895/l1pc3gw0/shoe/k/n/9/7-0005-black-royal-blue-07-cresswell-black-original-imagd7xrwfgzdfbk.jpeg?q=50", 50 | "https://rukminim1.flixcart.com/image/746/895/l1pc3gw0/shoe/t/g/2/7-0005-black-royal-blue-07-cresswell-black-original-imagd7xrtnygyf3v.jpeg?q=50", 51 | "https://rukminim1.flixcart.com/image/746/895/l02r1jk0/shopsy-shoe/i/v/6/7-005-black-rb-10-eunike-black-original-imagbyc2yhvyhxr8.jpeg?q=50" 52 | ] 53 | }, 54 | { 55 | "type": "shoes", 56 | "title": "x KL Peak High Tops For Men (Blue)", 57 | "price": "2,454", 58 | "category": "Shoes", 59 | "review":0, 60 | "url": [ 61 | "https://rukminim1.flixcart.com/image/746/895/ktszgy80/shoe/f/t/j/9-387772-9-puma-peacoat-bamboo-black-original-imag72gguuzbwfgw.jpeg?q=50", 62 | "https://rukminim1.flixcart.com/image/746/895/ktrk13k0/shoe/x/c/m/9-387772-9-puma-peacoat-bamboo-black-original-imag7f7efjkjqfsv.jpeg?q=50", 63 | "https://rukminim1.flixcart.com/image/746/895/ktrk13k0/shoe/o/t/x/9-387772-9-puma-peacoat-bamboo-black-original-imag7f7epbdgzqsf.jpeg?q=50", 64 | "https://rukminim1.flixcart.com/image/746/895/ktrk13k0/shoe/4/a/n/9-387772-9-puma-peacoat-bamboo-black-original-imag7f7e3vaazaev.jpeg?q=50", 65 | "https://rukminim1.flixcart.com/image/746/895/ktrk13k0/shoe/h/q/i/9-387772-9-puma-peacoat-bamboo-black-original-imag7f7eghfghgdz.jpeg?q=50", 66 | "https://rukminim1.flixcart.com/image/746/895/ktrk13k0/shoe/8/z/l/9-387772-9-puma-peacoat-bamboo-black-original-imag7f7ektszj5rz.jpeg?q=50", 67 | "https://rukminim1.flixcart.com/image/746/895/ktszgy80/shoe/q/k/5/9-387772-9-puma-peacoat-bamboo-black-original-imag72ggxkwzgetw.jpeg?q=50" 68 | ] 69 | }, 70 | { 71 | "type": "shoes", 72 | "title": "Icon Casuals For Men (Navy)", 73 | "price": "1,349", 74 | "category": "Shoes", 75 | "review":0, 76 | "url": [ 77 | "https://rukminim1.flixcart.com/image/753/904/l432ikw0/shoe/r/w/c/-original-imagf256zrxxxz7s.jpeg?q=50", 78 | "https://rukminim1.flixcart.com/image/746/895/krntoy80/shoe/2/g/x/8-371505-puma-peacoat-vibrant-orange-original-imag5epmnzytruwj.jpeg?q=50", 79 | "https://rukminim1.flixcart.com/image/746/895/krntoy80/shoe/l/e/2/8-371505-puma-peacoat-vibrant-orange-original-imag5epmunxhkxqf.jpeg?q=50", 80 | "https://rukminim1.flixcart.com/image/746/895/krntoy80/shoe/h/n/c/8-371505-puma-peacoat-vibrant-orange-original-imag5epm5uau2h8a.jpeg?q=50", 81 | "https://rukminim1.flixcart.com/image/746/895/krntoy80/shoe/s/s/w/8-371505-puma-peacoat-vibrant-orange-original-imag5epmbapaddfa.jpeg?q=50", 82 | "https://rukminim1.flixcart.com/image/746/895/jvtujrk0/shoe/p/z/5/371505-7-puma-peacoat-vibrant-orange-original-imafggpgtyrr2zvt.jpeg?q=50", 83 | "https://rukminim1.flixcart.com/image/746/895/jvtujrk0/shoe/p/z/5/371505-7-puma-peacoat-vibrant-orange-original-imafggpgujzdrgxz.jpeg?q=50" 84 | ] 85 | } 86 | ] -------------------------------------------------------------------------------- /lib/feature/product/presentation/screens/home/wallet/wallet_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:evira_shop/feature/product/presentation/widgets/default_app_bar.dart'; 3 | import 'package:firebase_auth/firebase_auth.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:evira_shop/core/asset_constants.dart' as asset; 6 | 7 | class WalletScreen extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | final mediaquery = MediaQuery.of(context).size; 11 | var firebasefirestore = FirebaseFirestore.instance 12 | .collection('users') 13 | .doc(FirebaseAuth.instance.currentUser!.uid); 14 | return Scaffold( 15 | appBar: DefaultAppBar('My E-Wallet'), 16 | body: Padding( 17 | padding: const EdgeInsets.symmetric(horizontal: 10.0), 18 | child: Column( 19 | children: [ 20 | Row(children: [ 21 | Column( 22 | crossAxisAlignment: CrossAxisAlignment.start, 23 | children: [ 24 | Text( 25 | 'Your Balance', 26 | style: asset.introStyles(20, color: Colors.grey.shade600), 27 | ), 28 | const SizedBox( 29 | height: 15, 30 | ), 31 | Text( 32 | '₹2,54,856', 33 | style: asset.introStyles(50), 34 | ) 35 | ], 36 | ), 37 | const Icon( 38 | Icons.refresh_rounded, 39 | color: Colors.black54, 40 | ) 41 | ]), 42 | const SizedBox( 43 | height: 30, 44 | ), 45 | Row( 46 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 47 | children: [ 48 | Text( 49 | 'Transaction History', 50 | style: asset.introStyles(24), 51 | ), 52 | GestureDetector( 53 | onTap: () {}, 54 | child: Text( 55 | 'See all', 56 | style: asset.introStyles(18), 57 | ), 58 | ), 59 | ], 60 | ), 61 | const SizedBox( 62 | height: 10, 63 | ), 64 | Expanded( 65 | child: StreamBuilder( 66 | stream: firebasefirestore.collection('orders').snapshots(), 67 | builder: (context, AsyncSnapshot snapshot) { 68 | if (snapshot.connectionState == ConnectionState.waiting) { 69 | return const Center( 70 | child: CircularProgressIndicator( 71 | color: Colors.black87, 72 | strokeWidth: 7, 73 | ), 74 | ); 75 | } else if (snapshot.hasData && snapshot.data!.size != 0) { 76 | return ListView( 77 | children: snapshot.data!.docs.map((document) { 78 | return Padding( 79 | padding: const EdgeInsets.only(bottom: 5), 80 | child: transaction_history_tile( 81 | document['title'], 82 | "Dec 11,2021 | 11:20 AM", 83 | document['price'], 84 | "Order", 85 | document['product_img_url'])); 86 | }).toList(), 87 | ); 88 | } else { 89 | return Center( 90 | child: Column( 91 | mainAxisAlignment: MainAxisAlignment.center, 92 | children: [ 93 | Image.asset(asset.empty_cart_error, width: 300), 94 | const SizedBox( 95 | height: 20, 96 | ), 97 | Text( 98 | 'No Transaction right now', 99 | textAlign: TextAlign.center, 100 | style: asset.introStyles(22, 101 | color: Colors.black54), 102 | ) 103 | ]), 104 | ); 105 | } 106 | }), 107 | ) 108 | ], 109 | ), 110 | )); 111 | } 112 | 113 | ListTile transaction_history_tile( 114 | String title, String date, String rate, String typeOf, String image) { 115 | return ListTile( 116 | contentPadding: const EdgeInsets.symmetric(horizontal: 6), 117 | title: Text( 118 | title, 119 | maxLines: 2, 120 | style: asset.introStyles(20), 121 | ), 122 | subtitle: Text( 123 | date, 124 | style: asset.introStyles(16, color: Colors.grey), 125 | ), 126 | trailing: Column( 127 | mainAxisAlignment: MainAxisAlignment.center, 128 | crossAxisAlignment: CrossAxisAlignment.end, 129 | children: [ 130 | Text( 131 | "₹" + rate, 132 | style: asset.introStyles(22), 133 | ), 134 | Text( 135 | typeOf, 136 | style: asset.introStyles(16, color: Colors.grey), 137 | ) 138 | ], 139 | ), 140 | leading: SizedBox( 141 | height: 55, 142 | width: 55, 143 | child: ClipRRect( 144 | borderRadius: BorderRadius.circular(10), 145 | child: Image.network( 146 | image, 147 | fit: BoxFit.fill, 148 | ), 149 | ), 150 | ), 151 | ); 152 | } 153 | } 154 | --------------------------------------------------------------------------------