├── linux
├── .gitignore
├── main.cc
├── flutter
│ ├── generated_plugin_registrant.h
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugins.cmake
│ └── CMakeLists.txt
├── my_application.h
└── my_application.cc
├── 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-50x50@1x.png
│ │ │ ├── Icon-App-50x50@2x.png
│ │ │ ├── Icon-App-57x57@1x.png
│ │ │ ├── Icon-App-57x57@2x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-72x72@1x.png
│ │ │ ├── Icon-App-72x72@2x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── 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
├── macos
├── Flutter
│ ├── Flutter-Debug.xcconfig
│ ├── Flutter-Release.xcconfig
│ └── GeneratedPluginRegistrant.swift
├── Runner
│ ├── Configs
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ ├── Warnings.xcconfig
│ │ └── AppInfo.xcconfig
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── app_icon_1024.png
│ │ │ ├── app_icon_128.png
│ │ │ ├── app_icon_16.png
│ │ │ ├── app_icon_256.png
│ │ │ ├── app_icon_32.png
│ │ │ ├── app_icon_512.png
│ │ │ ├── app_icon_64.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Release.entitlements
│ ├── DebugProfile.entitlements
│ ├── MainFlutterWindow.swift
│ └── Info.plist
├── .gitignore
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── Runner.xcodeproj
│ ├── project.xcworkspace
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
│ └── xcshareddata
│ └── xcschemes
│ └── Runner.xcscheme
├── web
├── favicon.png
├── icons
│ ├── Icon-192.png
│ ├── Icon-512.png
│ ├── Icon-maskable-192.png
│ └── Icon-maskable-512.png
├── manifest.json
└── index.html
├── assets
└── images
│ ├── cash.png
│ ├── next.jpg
│ ├── nike.jpg
│ ├── prev.jpg
│ ├── logo1.jpg
│ ├── logo1.png
│ ├── offer.png
│ ├── razopay.png
│ ├── splash.jpg
│ ├── success.png
│ ├── onboardimg.jpeg
│ ├── onboardimg1.jpg
│ └── onboardimg2.jpg
├── android
├── gradle.properties
├── app
│ ├── key
│ │ └── private_key.pepk
│ ├── 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
│ │ │ │ │ └── fashionstore
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── .gitignore
├── settings.gradle
└── build.gradle
├── lib
├── provider
│ ├── wishlist_provider.dart
│ ├── product_provider.dart
│ └── cart_provider.dart
├── core
│ ├── strings.dart
│ └── constants.dart
├── model
│ ├── wishlist_model.dart
│ ├── cart_model.dart
│ ├── address_model.dart
│ └── product_models.dart
├── widgets
│ ├── snackbar.dart
│ ├── logo.dart
│ ├── custom_radio_button.dart
│ ├── side_heading_widget.dart
│ ├── main_heading_widget.dart
│ └── appbar.dart
├── presentations
│ ├── checkout
│ │ ├── widget
│ │ │ ├── price_text_widget.dart
│ │ │ ├── failure_widget.dart
│ │ │ ├── address_field.dart
│ │ │ ├── edit_address_button.dart
│ │ │ └── address_widget.dart
│ │ └── order_loading_screen.dart
│ ├── Search
│ │ ├── widgets
│ │ │ └── custom_search_widget.dart
│ │ └── search_screen.dart
│ ├── detail
│ │ └── widgets
│ │ │ ├── appbar.dart
│ │ │ ├── image_widget.dart
│ │ │ ├── quantity_widget.dart
│ │ │ └── addwishlist_widget.dart
│ ├── splash_screen
│ │ └── splash_screen.dart
│ ├── home
│ │ ├── widget
│ │ │ ├── search_widget.dart
│ │ │ ├── category_button_widget.dart
│ │ │ ├── header_widget.dart
│ │ │ ├── Shimmer_widget.dart
│ │ │ ├── categories.dart
│ │ │ └── offer_widget.dart
│ │ └── home_screen.dart
│ ├── onboarding_screens
│ │ ├── onboard_core.dart
│ │ └── widgets
│ │ │ ├── pageindicator_widget.dart
│ │ │ └── onboard_content.dart
│ ├── account
│ │ └── widgets
│ │ │ ├── account_tile_widget.dart
│ │ │ └── markup_file.dart
│ ├── orders
│ │ ├── widgets
│ │ │ ├── delivered_widget.dart
│ │ │ ├── active_widget.dart
│ │ │ └── order_cancel.dart
│ │ └── orders_screen.dart
│ ├── wishlist
│ │ └── wishlist_screen.dart
│ ├── Categories
│ │ ├── Men
│ │ │ └── category_men.dart
│ │ ├── Girls
│ │ │ └── category_women.dart
│ │ ├── Women
│ │ │ └── category_women.dart
│ │ └── Boys
│ │ │ └── category_boys.dart
│ ├── products
│ │ └── all_products.dart
│ └── cart
│ │ └── widgets
│ │ └── count_widget.dart
└── main.dart
├── windows
├── runner
│ ├── resources
│ │ └── app_icon.ico
│ ├── resource.h
│ ├── utils.h
│ ├── runner.exe.manifest
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── CMakeLists.txt
│ ├── utils.cpp
│ ├── flutter_window.cpp
│ ├── Runner.rc
│ └── win32_window.h
├── .gitignore
├── flutter
│ ├── generated_plugin_registrant.h
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugins.cmake
│ └── CMakeLists.txt
└── CMakeLists.txt
├── README.md
├── .gitignore
├── test
└── widget_test.dart
├── analysis_options.yaml
├── .metadata
└── pubspec.yaml
/linux/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "ephemeral/Flutter-Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/web/favicon.png
--------------------------------------------------------------------------------
/assets/images/cash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/cash.png
--------------------------------------------------------------------------------
/assets/images/next.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/next.jpg
--------------------------------------------------------------------------------
/assets/images/nike.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/nike.jpg
--------------------------------------------------------------------------------
/assets/images/prev.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/prev.jpg
--------------------------------------------------------------------------------
/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/assets/images/logo1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/logo1.jpg
--------------------------------------------------------------------------------
/assets/images/logo1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/logo1.png
--------------------------------------------------------------------------------
/assets/images/offer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/offer.png
--------------------------------------------------------------------------------
/assets/images/razopay.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/razopay.png
--------------------------------------------------------------------------------
/assets/images/splash.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/splash.jpg
--------------------------------------------------------------------------------
/assets/images/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/success.png
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/assets/images/onboardimg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/onboardimg.jpeg
--------------------------------------------------------------------------------
/assets/images/onboardimg1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/onboardimg1.jpg
--------------------------------------------------------------------------------
/assets/images/onboardimg2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/assets/images/onboardimg2.jpg
--------------------------------------------------------------------------------
/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/android/app/key/private_key.pepk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/android/app/key/private_key.pepk
--------------------------------------------------------------------------------
/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/macos/.gitignore:
--------------------------------------------------------------------------------
1 | # Flutter-related
2 | **/Flutter/ephemeral/
3 | **/Pods/
4 |
5 | # Xcode-related
6 | **/dgph
7 | **/xcuserdata/
8 |
--------------------------------------------------------------------------------
/lib/provider/wishlist_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class WishlistProvider extends ChangeNotifier {}
4 |
--------------------------------------------------------------------------------
/windows/runner/resources/app_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/windows/runner/resources/app_icon.ico
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iam-Aslam/FashionStore-User/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/iam-Aslam/FashionStore-User/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/linux/main.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | int main(int argc, char** argv) {
4 | g_autoptr(MyApplication) app = my_application_new();
5 | return g_application_run(G_APPLICATION(app), argc, argv);
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/fashionstore/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.fashionstore
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 |
--------------------------------------------------------------------------------
/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lib/core/strings.dart:
--------------------------------------------------------------------------------
1 | const List paymentTitles = [
2 | "Razor Pay",
3 | "Cash On Delivery",
4 | ];
5 |
6 | const List paymentIcons = [
7 | "assets/images/razopay.png",
8 | "assets/images/cash.png",
9 | ];
10 |
--------------------------------------------------------------------------------
/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu May 18 09:49:35 IST 2023
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/macos/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 |
--------------------------------------------------------------------------------
/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/windows/.gitignore:
--------------------------------------------------------------------------------
1 | flutter/ephemeral/
2 |
3 | # Visual Studio user-specific files.
4 | *.suo
5 | *.user
6 | *.userosscache
7 | *.sln.docstates
8 |
9 | # Visual Studio build-related files.
10 | x64/
11 | x86/
12 |
13 | # Visual Studio cache files
14 | # files ending in .cache can be ignored
15 | *.[Cc]ache
16 | # but keep track of directories ending in .cache
17 | !*.[Cc]ache/
18 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/linux/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void fl_register_plugins(FlPluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/windows/flutter/generated_plugin_registrant.h:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #ifndef GENERATED_PLUGIN_REGISTRANT_
8 | #define GENERATED_PLUGIN_REGISTRANT_
9 |
10 | #include
11 |
12 | // Registers Flutter plugins.
13 | void RegisterPlugins(flutter::PluginRegistry* registry);
14 |
15 | #endif // GENERATED_PLUGIN_REGISTRANT_
16 |
--------------------------------------------------------------------------------
/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Fashion Store
2 |
3 | E-Commerce Application built in flutter
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | Contact: mohammedaslammk37@gmail.com
15 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/model/wishlist_model.dart:
--------------------------------------------------------------------------------
1 | class Wishlist {
2 | final String? id;
3 | final String? productId;
4 | final String? email;
5 |
6 | Wishlist.fromJson(Map json)
7 | : this(
8 | id: json['id']! as String,
9 | productId: json['productid']! as String,
10 | email: json['email']! as String,
11 | );
12 | Wishlist({
13 | this.id,
14 | required this.productId,
15 | required this.email,
16 | });
17 | }
18 |
--------------------------------------------------------------------------------
/linux/my_application.h:
--------------------------------------------------------------------------------
1 | #ifndef FLUTTER_MY_APPLICATION_H_
2 | #define FLUTTER_MY_APPLICATION_H_
3 |
4 | #include
5 |
6 | G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION,
7 | GtkApplication)
8 |
9 | /**
10 | * my_application_new:
11 | *
12 | * Creates a new Flutter-based application.
13 | *
14 | * Returns: a new #MyApplication.
15 | */
16 | MyApplication* my_application_new();
17 |
18 | #endif // FLUTTER_MY_APPLICATION_H_
19 |
--------------------------------------------------------------------------------
/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController.init()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/windows/runner/resource.h:
--------------------------------------------------------------------------------
1 | //{{NO_DEPENDENCIES}}
2 | // Microsoft Visual C++ generated include file.
3 | // Used by Runner.rc
4 | //
5 | #define IDI_APP_ICON 101
6 |
7 | // Next default values for new objects
8 | //
9 | #ifdef APSTUDIO_INVOKED
10 | #ifndef APSTUDIO_READONLY_SYMBOLS
11 | #define _APS_NEXT_RESOURCE_VALUE 102
12 | #define _APS_NEXT_COMMAND_VALUE 40001
13 | #define _APS_NEXT_CONTROL_VALUE 1001
14 | #define _APS_NEXT_SYMED_VALUE 101
15 | #endif
16 | #endif
17 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 | #include
10 |
11 | void fl_register_plugins(FlPluginRegistry* registry) {
12 | g_autoptr(FlPluginRegistrar) file_selector_linux_registrar =
13 | fl_plugin_registry_get_registrar_for_plugin(registry, "FileSelectorPlugin");
14 | file_selector_plugin_register_with_registrar(file_selector_linux_registrar);
15 | }
16 |
--------------------------------------------------------------------------------
/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/widgets/snackbar.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | void alertSnackbar(BuildContext context, String message) {
4 | final snackBar = SnackBar(
5 | backgroundColor: Colors.black,
6 | content: Text(message),
7 | action: SnackBarAction(
8 | textColor: Colors.black,
9 | backgroundColor: Colors.white,
10 | label: 'Dismiss',
11 | onPressed: () {
12 | ScaffoldMessenger.of(context).hideCurrentSnackBar();
13 | },
14 | ),
15 | );
16 |
17 | ScaffoldMessenger.of(context).showSnackBar(snackBar);
18 | }
19 |
--------------------------------------------------------------------------------
/lib/widgets/logo.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class Logo extends StatelessWidget {
4 | const Logo({
5 | super.key,
6 | });
7 |
8 | @override
9 | Widget build(BuildContext context) {
10 | var size = MediaQuery.of(context).size;
11 | var height = size.height;
12 | var width = size.width;
13 |
14 | return Padding(
15 | padding: EdgeInsets.only(left: width / 7, top: height / 25),
16 | child: SizedBox(
17 | // width: width / 3,
18 | //height: height / 10,
19 | child: Image.asset('assets/images/logo1.png'),
20 | ),
21 | );
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/widgets/custom_radio_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | Widget customRadioButton(String text, int index, {int value = 0}) {
4 | return OutlinedButton(
5 | onPressed: () {},
6 | style: OutlinedButton.styleFrom(
7 | shape: RoundedRectangleBorder(
8 | borderRadius: BorderRadius.circular(10),
9 | ),
10 | side: BorderSide(
11 | color: (value == index) ? Colors.green : Colors.black,
12 | ),
13 | ),
14 | child: Text(
15 | text,
16 | style: TextStyle(
17 | color: (value == index) ? Colors.green : Colors.black,
18 | ),
19 | ),
20 | );
21 | }
22 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/lib/presentations/checkout/widget/price_text_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 |
4 | class PriceTextWidget extends StatelessWidget {
5 | const PriceTextWidget({
6 | Key? key,
7 | required this.text,
8 | this.size = 18,
9 | }) : super(key: key);
10 | final String text;
11 | final double size;
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Text(text,
16 | style: GoogleFonts.nunito(
17 | textStyle: TextStyle(
18 | fontSize: size,
19 | fontWeight: FontWeight.w700,
20 | ),
21 | ));
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/lib/widgets/side_heading_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 |
4 | class SideHeading extends StatelessWidget {
5 | const SideHeading({
6 | Key? key,
7 | required this.text,
8 | }) : super(key: key);
9 | final String text;
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return Text(
14 | text,
15 | style: GoogleFonts.roboto(
16 | textStyle: const TextStyle(
17 | letterSpacing: .5,
18 | fontSize: 20,
19 | color: Colors.black,
20 | fontWeight: FontWeight.w900),
21 | ),
22 | );
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = fashionstore
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.fashionstore
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/windows/runner/utils.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_UTILS_H_
2 | #define RUNNER_UTILS_H_
3 |
4 | #include
5 | #include
6 |
7 | // Creates a console for the process, and redirects stdout and stderr to
8 | // it for both the runner and the Flutter library.
9 | void CreateAndAttachConsole();
10 |
11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string
12 | // encoded in UTF-8. Returns an empty std::string on failure.
13 | std::string Utf8FromUtf16(const wchar_t* utf16_string);
14 |
15 | // Gets the command line arguments passed in as a std::vector,
16 | // encoded in UTF-8. Returns an empty std::vector on failure.
17 | std::vector GetCommandLineArguments();
18 |
19 | #endif // RUNNER_UTILS_H_
20 |
--------------------------------------------------------------------------------
/lib/widgets/main_heading_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 |
4 | class MainHeading extends StatelessWidget {
5 | const MainHeading({
6 | Key? key,
7 | required this.text,
8 | }) : super(key: key);
9 | final String text;
10 | @override
11 | Widget build(BuildContext context) {
12 | return Padding(
13 | padding: const EdgeInsets.only(left: 10.0),
14 | child: Text(
15 | text,
16 | style: GoogleFonts.nunito(
17 | textStyle: const TextStyle(
18 | letterSpacing: .5,
19 | fontSize: 26,
20 | color: Colors.black,
21 | fontWeight: FontWeight.w700),
22 | ),
23 | ),
24 | );
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/windows/flutter/generated_plugin_registrant.cc:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | // clang-format off
6 |
7 | #include "generated_plugin_registrant.h"
8 |
9 | #include
10 | #include
11 | #include
12 |
13 | void RegisterPlugins(flutter::PluginRegistry* registry) {
14 | ConnectivityPlusWindowsPluginRegisterWithRegistrar(
15 | registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin"));
16 | FileSelectorWindowsRegisterWithRegistrar(
17 | registry->GetRegistrarForPlugin("FileSelectorWindows"));
18 | FirebaseCorePluginCApiRegisterWithRegistrar(
19 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi"));
20 | }
21 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.google.gms:google-services:4.3.15'
10 | classpath 'com.android.tools.build:gradle:7.2.0'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
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 | tasks.register("clean", Delete) {
31 | delete rootProject.buildDir
32 | }
33 |
--------------------------------------------------------------------------------
/lib/presentations/checkout/widget/failure_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | void showFailure(BuildContext context, String title, String message) {
4 | Widget continueButton = ElevatedButton(
5 | style: ElevatedButton.styleFrom(
6 | foregroundColor: Colors.white,
7 | backgroundColor: Colors.black,
8 | ),
9 | child: const Text(
10 | "Continue",
11 | style: TextStyle(color: Colors.white),
12 | ),
13 | onPressed: () {
14 | Navigator.pop(context);
15 | },
16 | );
17 |
18 | AlertDialog alert = AlertDialog(
19 | title: Text(title),
20 | content: Text(message),
21 | actions: [
22 | continueButton,
23 | ],
24 | );
25 |
26 | showDialog(
27 | context: context,
28 | builder: (BuildContext context) {
29 | return alert;
30 | },
31 | );
32 | }
33 |
--------------------------------------------------------------------------------
/linux/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | file_selector_linux
7 | )
8 |
9 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
10 | )
11 |
12 | set(PLUGIN_BUNDLED_LIBRARIES)
13 |
14 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
15 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin})
16 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
19 | endforeach(plugin)
20 |
21 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
22 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin})
23 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
24 | endforeach(ffi_plugin)
25 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/lib/core/constants.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | // constant hieght
4 | const khieght5 = SizedBox(height: 4.5);
5 | const khieght10 = SizedBox(height: 10);
6 | const khieght20 = SizedBox(height: 20);
7 | const khieght30 = SizedBox(height: 30);
8 | const khieght40 = SizedBox(height: 40);
9 | const khieght50 = SizedBox(height: 50);
10 | const khieght60 = SizedBox(height: 60);
11 | const khieght200 = SizedBox(height: 200);
12 | const khieght150 = SizedBox(height: 150);
13 | //constant width
14 | const kwidth10 = SizedBox(width: 10);
15 | const kwidth20 = SizedBox(width: 20);
16 | const kwidth30 = SizedBox(width: 30);
17 | const kwidth40 = SizedBox(width: 40);
18 | const kwidth50 = SizedBox(width: 50);
19 | const kwidth60 = SizedBox(width: 60);
20 | const kwidth70 = SizedBox(width: 70);
21 | const kwidth80 = SizedBox(width: 80);
22 | const kwidth90 = SizedBox(width: 90);
23 | const kwidth100 = SizedBox(width: 100);
24 |
--------------------------------------------------------------------------------
/lib/presentations/Search/widgets/custom_search_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class CustomSearchWidget extends StatelessWidget {
5 | final void Function(String query) onChanged;
6 | const CustomSearchWidget({
7 | Key? key,
8 | required this.onChanged,
9 | }) : super(key: key);
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | return CupertinoSearchTextField(
14 | borderRadius: BorderRadius.circular(30),
15 | backgroundColor: Colors.grey.withOpacity(0.4),
16 | prefixIcon: const Icon(
17 | CupertinoIcons.search,
18 | color: Colors.grey,
19 | ),
20 | suffixIcon: const Icon(
21 | CupertinoIcons.xmark_circle_fill,
22 | color: Colors.grey,
23 | ),
24 | style: const TextStyle(color: Colors.black),
25 | onChanged: onChanged,
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/windows/flutter/generated_plugins.cmake:
--------------------------------------------------------------------------------
1 | #
2 | # Generated file, do not edit.
3 | #
4 |
5 | list(APPEND FLUTTER_PLUGIN_LIST
6 | connectivity_plus
7 | file_selector_windows
8 | firebase_core
9 | )
10 |
11 | list(APPEND FLUTTER_FFI_PLUGIN_LIST
12 | )
13 |
14 | set(PLUGIN_BUNDLED_LIBRARIES)
15 |
16 | foreach(plugin ${FLUTTER_PLUGIN_LIST})
17 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin})
18 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin)
19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $)
20 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries})
21 | endforeach(plugin)
22 |
23 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST})
24 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin})
25 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries})
26 | endforeach(ffi_plugin)
27 |
--------------------------------------------------------------------------------
/lib/presentations/checkout/widget/address_field.dart:
--------------------------------------------------------------------------------
1 | import 'package:fashionstore/core/constants.dart';
2 | import 'package:flutter/material.dart';
3 | import 'package:google_fonts/google_fonts.dart';
4 |
5 | class AddressField extends StatelessWidget {
6 | const AddressField({
7 | Key? key,
8 | required this.id,
9 | required this.value,
10 | }) : super(key: key);
11 | final String id;
12 | final String value;
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return Row(
17 | children: [
18 | Text("$id :",
19 | style: GoogleFonts.roboto(
20 | textStyle:
21 | const TextStyle(fontSize: 18, fontWeight: FontWeight.w600),
22 | )),
23 | kwidth10,
24 | Text(
25 | value,
26 | style: const TextStyle(
27 | fontSize: 15, fontWeight: FontWeight.bold, color: Colors.grey),
28 | ),
29 | ],
30 | );
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/lib/model/cart_model.dart:
--------------------------------------------------------------------------------
1 | class Cart {
2 | final String? id;
3 | final String? productId;
4 | final int? price;
5 | final int? totalPrice;
6 | final int? quantity;
7 | final String? color;
8 | final String? email;
9 | final String? size;
10 | Cart.fromJson(Map json)
11 | : this(
12 | id: json['id']! as String,
13 | color: json['color']! as String,
14 | productId: json['productid']! as String,
15 | quantity: json['quantity']! as int,
16 | totalPrice: json['totalprice']! as int,
17 | price: json['price']! as int,
18 | email: json['email']! as String,
19 | size: json['size']! as String,
20 | );
21 | Cart({
22 | this.id,
23 | required this.productId,
24 | required this.price,
25 | required this.totalPrice,
26 | required this.quantity,
27 | this.color = "Black",
28 | required this.email,
29 | required this.size,
30 | });
31 | }
32 |
--------------------------------------------------------------------------------
/windows/runner/runner.exe.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PerMonitorV2
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/lib/model/address_model.dart:
--------------------------------------------------------------------------------
1 | class Address {
2 | final String? id;
3 | final String? name;
4 | final int? pinCode;
5 | final String? permanentAddress;
6 | final String? state;
7 | final String? city;
8 | final int? phone;
9 | final String? email;
10 |
11 | Address.fromJson(Map json)
12 | : this(
13 | id: json['id']! as String,
14 | name: json['name']! as String,
15 | pinCode: json['pincode']! as int,
16 | permanentAddress: json['address']! as String,
17 | state: json['state']! as String,
18 | city: json['city']! as String,
19 | email: json['email']! as String,
20 | phone: json['phone']! as int,
21 | );
22 |
23 | Address({
24 | required this.id,
25 | required this.name,
26 | required this.pinCode,
27 | required this.permanentAddress,
28 | required this.state,
29 | required this.city,
30 | required this.phone,
31 | required this.email,
32 | });
33 | }
34 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Symbolication related
36 | app.*.symbols
37 |
38 | # Obfuscation related
39 | app.*.map.json
40 |
41 | # Android Studio will place build artifacts here
42 | /android/app/debug
43 | /android/app/profile
44 | /android/app/release
45 |
46 |
47 | # Remember to never publicly share your keystore
48 | key.properties
49 | **/*.keystore
50 | **/*.jks
51 |
--------------------------------------------------------------------------------
/lib/presentations/detail/widgets/appbar.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class DetailAppbar extends StatelessWidget {
5 | const DetailAppbar({
6 | super.key,
7 | });
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Row(
12 | children: [
13 | InkWell(
14 | onTap: () {
15 | Navigator.pop(context);
16 | },
17 | child: const CircleAvatar(
18 | radius: 18,
19 | backgroundImage: AssetImage('assets/images/prev.jpg')),
20 | ),
21 | const Spacer(),
22 | Padding(
23 | padding: const EdgeInsets.only(top: 12.0),
24 | child: CircleAvatar(
25 | radius: 16,
26 | child: IconButton(
27 | onPressed: () {},
28 | icon: const Icon(
29 | CupertinoIcons.bag,
30 | size: 20,
31 | )),
32 | ),
33 | )
34 | ],
35 | );
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fashionstore",
3 | "short_name": "fashionstore",
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 |
--------------------------------------------------------------------------------
/lib/provider/product_provider.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class ProductProvider extends ChangeNotifier {
5 | //get product stream
6 | final Stream productsStream =
7 | FirebaseFirestore.instance.collection('products').snapshots();
8 | //get Category stream
9 | Stream getCategoryProducts(String category) async* {
10 | final QuerySnapshot querySnapshot = await FirebaseFirestore.instance
11 | .collection('products')
12 | .where('category', isEqualTo: category)
13 | .get();
14 |
15 | final List docs = querySnapshot.docs.toList();
16 | yield docs;
17 | }
18 |
19 | //get offer stream
20 | Stream getOfferProducts() async* {
21 | final QuerySnapshot querySnapshot = await FirebaseFirestore.instance
22 | .collection('products')
23 | .where('category', isEqualTo: 'Offer')
24 | .get();
25 |
26 | final List docs = querySnapshot.docs.reversed.toList();
27 | yield docs;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/windows/runner/flutter_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_FLUTTER_WINDOW_H_
2 | #define RUNNER_FLUTTER_WINDOW_H_
3 |
4 | #include
5 | #include
6 |
7 | #include
8 |
9 | #include "win32_window.h"
10 |
11 | // A window that does nothing but host a Flutter view.
12 | class FlutterWindow : public Win32Window {
13 | public:
14 | // Creates a new FlutterWindow hosting a Flutter view running |project|.
15 | explicit FlutterWindow(const flutter::DartProject& project);
16 | virtual ~FlutterWindow();
17 |
18 | protected:
19 | // Win32Window:
20 | bool OnCreate() override;
21 | void OnDestroy() override;
22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam,
23 | LPARAM const lparam) noexcept override;
24 |
25 | private:
26 | // The project to run.
27 | flutter::DartProject project_;
28 |
29 | // The Flutter instance hosted by this window.
30 | std::unique_ptr flutter_controller_;
31 | };
32 |
33 | #endif // RUNNER_FLUTTER_WINDOW_H_
34 |
--------------------------------------------------------------------------------
/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/model/product_models.dart:
--------------------------------------------------------------------------------
1 | class Products {
2 | final String productName;
3 | final String subname;
4 | final String category;
5 | final int quantity;
6 | final int price;
7 | final String color;
8 | final String description;
9 | final List? imageList;
10 | final String? id;
11 | Products.fromJson(Map json)
12 | : this(
13 | productName: json['name']! as String,
14 | subname: json['subname']! as String,
15 | category: json['category']! as String,
16 | quantity: json['quantity']! as int,
17 | price: json['price']! as int,
18 | color: json['color']! as String,
19 | description: json['description']! as String,
20 | imageList: json['image']! as List,
21 | id: json['id']! as String,
22 | );
23 | Products({
24 | required this.productName,
25 | required this.subname,
26 | required this.category,
27 | required this.quantity,
28 | required this.price,
29 | required this.color,
30 | required this.description,
31 | this.imageList,
32 | this.id,
33 | });
34 | }
35 |
--------------------------------------------------------------------------------
/lib/presentations/splash_screen/splash_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:fashionstore/presentations/onboarding_screens/onboard_screen.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class SplashScreen extends StatefulWidget {
5 | const SplashScreen({super.key});
6 |
7 | @override
8 | State createState() => _SplashScreenState();
9 | }
10 |
11 | class _SplashScreenState extends State {
12 | @override
13 | void initState() {
14 | goOnboard();
15 | super.initState();
16 | }
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return SafeArea(
21 | child: Scaffold(
22 | body: Container(
23 | decoration: const BoxDecoration(
24 | image: DecorationImage(
25 | image: AssetImage('assets/images/splash.jpg'),
26 | fit: BoxFit.cover,
27 | )),
28 | ),
29 | ));
30 | }
31 |
32 | Future goOnboard() async {
33 | await Future.delayed(const Duration(seconds: 5));
34 | Navigator.pushReplacement(
35 | context,
36 | MaterialPageRoute(
37 | builder: (context) => const OnboardScreen(),
38 | ),
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/lib/presentations/home/widget/search_widget.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: public_member_api_docs, sort_constructors_first
2 | import 'dart:developer';
3 |
4 | import 'package:flutter/cupertino.dart';
5 | import 'package:flutter/material.dart';
6 |
7 | import '../../Search/search_screen.dart';
8 |
9 | class SearchWidget extends StatelessWidget {
10 | const SearchWidget({
11 | Key? key,
12 | }) : super(key: key);
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return CupertinoSearchTextField(
17 | borderRadius: BorderRadius.circular(30),
18 | backgroundColor: Colors.grey.withOpacity(0.4),
19 | prefixIcon: const Icon(
20 | CupertinoIcons.search,
21 | color: Colors.grey,
22 | ),
23 | suffixIcon: const Icon(
24 | CupertinoIcons.xmark_circle_fill,
25 | color: Colors.grey,
26 | ),
27 | style: const TextStyle(color: Colors.black),
28 | onTap: () {
29 | log('Search Field');
30 |
31 | Navigator.push(context, MaterialPageRoute(
32 | builder: (context) {
33 | return const SearchScreen();
34 | },
35 | ));
36 | },
37 | );
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility in the flutter_test package. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:fashionstore/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(const MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/lib/presentations/onboarding_screens/onboard_core.dart:
--------------------------------------------------------------------------------
1 | class Onboard {
2 | final String image, title1, title2, description1, description2;
3 |
4 | Onboard({
5 | required this.image,
6 | required this.title1,
7 | required this.title2,
8 | required this.description1,
9 | required this.description2,
10 | });
11 | }
12 |
13 | final List demoData = [
14 | Onboard(
15 | image: 'assets/images/onboardimg.jpeg',
16 | title2: 'For New Arrival Product',
17 | title1: '20% Discount Available',
18 | description1: 'Publish up your selfies to make yourself',
19 | description2: 'more beautiful with this app.',
20 | ),
21 | Onboard(
22 | image: 'assets/images/onboardimg1.jpg',
23 | title2: 'Of The Offer Shopping',
24 | title1: 'Take Advantage',
25 | description1: 'Publish up your selfies to make yourself',
26 | description2: 'more beautiful with this app.',
27 | ),
28 | Onboard(
29 | image: 'assets/images/onboardimg2.jpg',
30 | title2: 'Within Your Reach',
31 | title1: 'All Types Offers',
32 | description1: 'Publish up your selfies to make yourself',
33 | description2: 'more beautiful with this app.',
34 | ),
35 | ];
36 |
--------------------------------------------------------------------------------
/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:fashionstore/presentations/splash_screen/splash_screen.dart';
2 | import 'package:fashionstore/provider/cart_provider.dart';
3 | import 'package:fashionstore/provider/product_provider.dart';
4 | import 'package:fashionstore/provider/wishlist_provider.dart';
5 | import 'package:firebase_core/firebase_core.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:provider/provider.dart';
8 |
9 | void main() async {
10 | WidgetsFlutterBinding.ensureInitialized();
11 | await Firebase.initializeApp();
12 | runApp(const MyApp());
13 | }
14 |
15 | class MyApp extends StatelessWidget {
16 | const MyApp({super.key});
17 | @override
18 | Widget build(BuildContext context) {
19 | return MultiProvider(
20 | providers: [
21 | ChangeNotifierProvider(create: (context) => ProductProvider()),
22 | ChangeNotifierProvider(create: (context) => CartProvider()),
23 | ChangeNotifierProvider(create: (context) => WishlistProvider()),
24 | ],
25 | child: MaterialApp(
26 | title: 'Fashion Store',
27 | debugShowCheckedModeBanner: false,
28 | theme: ThemeData(
29 | primarySwatch: Colors.grey,
30 | ),
31 | home: const SplashScreen(),
32 | ),
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/presentations/onboarding_screens/widgets/pageindicator_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class PageIndicator extends StatelessWidget {
4 | const PageIndicator({
5 | Key? key,
6 | this.currentValue = 0,
7 | }) : super(key: key);
8 | final int currentValue;
9 |
10 | @override
11 | Widget build(BuildContext context) {
12 | return Padding(
13 | padding: const EdgeInsets.only(top: 28.0),
14 | child: Row(
15 | mainAxisAlignment: MainAxisAlignment.start,
16 | children: List.generate(
17 | 3,
18 | (index) => Padding(
19 | padding: const EdgeInsets.symmetric(horizontal: 5),
20 | child: AnimatedContainer(
21 | curve: Curves.easeIn,
22 | duration: const Duration(milliseconds: 500),
23 | width: index == currentValue ? 24 : 8,
24 | height: 8,
25 | decoration: BoxDecoration(
26 | color: index == currentValue
27 | ? Colors.black
28 | : Colors.black54,
29 | borderRadius: BorderRadius.circular(20)),
30 | ),
31 | )),
32 | ),
33 | );
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/presentations/checkout/widget/edit_address_button.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 |
4 | class EditButton extends StatelessWidget {
5 | final String name;
6 |
7 | final VoidCallback onTap;
8 | const EditButton({
9 | Key? key,
10 | required this.name,
11 | required this.onTap,
12 | }) : super(key: key);
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return Padding(
17 | padding: const EdgeInsets.symmetric(horizontal: 3),
18 | child: ElevatedButton(
19 | style: ElevatedButton.styleFrom(
20 | padding: const EdgeInsets.symmetric(horizontal: 20),
21 | shape: RoundedRectangleBorder(
22 | side: const BorderSide(color: Colors.black38),
23 | borderRadius: BorderRadius.circular(10.0)),
24 | backgroundColor: Colors.black,
25 | foregroundColor: Colors.white,
26 | ),
27 | onPressed: onTap,
28 | child: Text(
29 | name,
30 | style: GoogleFonts.roboto(
31 | textStyle: const TextStyle(
32 | letterSpacing: .5,
33 | fontSize: 12,
34 | color: Colors.white,
35 | ),
36 | ),
37 | )),
38 | );
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/windows/runner/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "flutter_window.h"
6 | #include "utils.h"
7 |
8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
9 | _In_ wchar_t *command_line, _In_ int show_command) {
10 | // Attach to console when present (e.g., 'flutter run') or create a
11 | // new console when running with a debugger.
12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
13 | CreateAndAttachConsole();
14 | }
15 |
16 | // Initialize COM, so that it is available for use in the library and/or
17 | // plugins.
18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
19 |
20 | flutter::DartProject project(L"data");
21 |
22 | std::vector command_line_arguments =
23 | GetCommandLineArguments();
24 |
25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
26 |
27 | FlutterWindow window(project);
28 | Win32Window::Point origin(10, 10);
29 | Win32Window::Size size(1280, 720);
30 | if (!window.Create(L"fashionstore", origin, size)) {
31 | return EXIT_FAILURE;
32 | }
33 | window.SetQuitOnClose(true);
34 |
35 | ::MSG msg;
36 | while (::GetMessage(&msg, nullptr, 0, 0)) {
37 | ::TranslateMessage(&msg);
38 | ::DispatchMessage(&msg);
39 | }
40 |
41 | ::CoUninitialize();
42 | return EXIT_SUCCESS;
43 | }
44 |
--------------------------------------------------------------------------------
/lib/presentations/home/widget/category_button_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 |
4 | class CategoryButton extends StatelessWidget {
5 | final String name;
6 | final bool active;
7 | final VoidCallback onTap;
8 | const CategoryButton({
9 | Key? key,
10 | required this.name,
11 | required this.active,
12 | required this.onTap,
13 | }) : super(key: key);
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 | return Padding(
18 | padding: const EdgeInsets.symmetric(horizontal: 3),
19 | child: ElevatedButton(
20 | style: ElevatedButton.styleFrom(
21 | padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 5.0),
22 | shape: RoundedRectangleBorder(
23 | side: const BorderSide(color: Colors.black38),
24 | borderRadius: BorderRadius.circular(30.0)),
25 | backgroundColor: active == true ? Colors.black : Colors.white,
26 | foregroundColor: Colors.white,
27 | ),
28 | onPressed: onTap,
29 | child: Text(
30 | name,
31 | style: GoogleFonts.roboto(
32 | textStyle: TextStyle(
33 | letterSpacing: .5,
34 | fontSize: 12,
35 | color: active == true ? Colors.white : Colors.black,
36 | ),
37 | ),
38 | )),
39 | );
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 | import cloud_firestore
9 | import connectivity_plus
10 | import file_selector_macos
11 | import firebase_auth
12 | import firebase_core
13 | import firebase_storage
14 | import package_info_plus
15 | import path_provider_foundation
16 | import shared_preferences_foundation
17 | import sqflite
18 |
19 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
20 | FLTFirebaseFirestorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseFirestorePlugin"))
21 | ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
22 | FileSelectorPlugin.register(with: registry.registrar(forPlugin: "FileSelectorPlugin"))
23 | FLTFirebaseAuthPlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseAuthPlugin"))
24 | FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin"))
25 | FLTFirebaseStoragePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseStoragePlugin"))
26 | FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
27 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
28 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin"))
29 | SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin"))
30 | }
31 |
--------------------------------------------------------------------------------
/lib/presentations/detail/widgets/image_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../detail_product_screen.dart';
3 | import 'addwishlist_widget.dart';
4 | import 'appbar.dart';
5 |
6 | class DetailImageWidget extends StatelessWidget {
7 | const DetailImageWidget({
8 | Key? key,
9 | required this.isAddedToWishlist,
10 | required this.id,
11 | required this.widget,
12 | }) : super(key: key);
13 | final bool isAddedToWishlist;
14 | final String id;
15 |
16 | final ProductDetailScreen widget;
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | var size = MediaQuery.of(context).size;
21 | var height = size.height;
22 | var width = size.width;
23 | return Container(
24 | width: width / 1,
25 | height: height / 1.9,
26 | decoration: BoxDecoration(
27 | borderRadius: BorderRadius.circular(0),
28 | image: DecorationImage(
29 | image: NetworkImage(widget.image[0]),
30 | fit: BoxFit.cover,
31 | )),
32 | child: Column(
33 | mainAxisAlignment: MainAxisAlignment.start,
34 | children: [
35 | const Padding(
36 | padding: EdgeInsets.only(left: 10.0, top: 10, right: 12),
37 | child: DetailAppbar(),
38 | ),
39 | const Spacer(),
40 | AddWishlistWidget(
41 | isAddedToWishlist: isAddedToWishlist,
42 | id: id,
43 | )
44 | ],
45 | ),
46 | );
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "16x16",
5 | "idiom" : "mac",
6 | "filename" : "app_icon_16.png",
7 | "scale" : "1x"
8 | },
9 | {
10 | "size" : "16x16",
11 | "idiom" : "mac",
12 | "filename" : "app_icon_32.png",
13 | "scale" : "2x"
14 | },
15 | {
16 | "size" : "32x32",
17 | "idiom" : "mac",
18 | "filename" : "app_icon_32.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "32x32",
23 | "idiom" : "mac",
24 | "filename" : "app_icon_64.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "128x128",
29 | "idiom" : "mac",
30 | "filename" : "app_icon_128.png",
31 | "scale" : "1x"
32 | },
33 | {
34 | "size" : "128x128",
35 | "idiom" : "mac",
36 | "filename" : "app_icon_256.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "256x256",
41 | "idiom" : "mac",
42 | "filename" : "app_icon_256.png",
43 | "scale" : "1x"
44 | },
45 | {
46 | "size" : "256x256",
47 | "idiom" : "mac",
48 | "filename" : "app_icon_512.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "512x512",
53 | "idiom" : "mac",
54 | "filename" : "app_icon_512.png",
55 | "scale" : "1x"
56 | },
57 | {
58 | "size" : "512x512",
59 | "idiom" : "mac",
60 | "filename" : "app_icon_1024.png",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/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/presentations/account/widgets/account_tile_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import 'package:fashionstore/core/constants.dart';
4 |
5 | class AccountTile extends StatelessWidget {
6 | const AccountTile({
7 | Key? key,
8 | required this.name,
9 | required this.icon,
10 | required this.voidCallback,
11 | }) : super(key: key);
12 | final String name;
13 | final IconData icon;
14 | final VoidCallback voidCallback;
15 |
16 | @override
17 | Widget build(BuildContext context) {
18 | var size = MediaQuery.of(context).size;
19 | var height = size.height;
20 | var width = size.width;
21 | return GestureDetector(
22 | onTap: () {
23 | voidCallback();
24 | },
25 | child: Padding(
26 | padding: const EdgeInsets.only(top: 10.0),
27 | child: Row(
28 | children: [
29 | Container(
30 | height: height / 19,
31 | width: width / 10,
32 | decoration: const BoxDecoration(
33 | color: Color.fromARGB(40, 0, 0, 0),
34 | borderRadius: BorderRadius.all(Radius.circular(5)),
35 | ),
36 | child: Icon(
37 | icon,
38 | color: Colors.black,
39 | ),
40 | ),
41 | kwidth20,
42 | Text(
43 | name,
44 | style: const TextStyle(
45 | color: Colors.black,
46 | fontWeight: FontWeight.w700,
47 | fontSize: 20),
48 | ),
49 | const Spacer(),
50 | const Icon(
51 | Icons.arrow_forward_ios,
52 | )
53 | ],
54 | ),
55 | ),
56 | );
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/lib/presentations/detail/widgets/quantity_widget.dart:
--------------------------------------------------------------------------------
1 | import 'dart:developer';
2 | import 'package:flutter/cupertino.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | ValueNotifier totalPriceNotifier = ValueNotifier(0);
6 |
7 | class QuantityCartWidget extends StatefulWidget {
8 | const QuantityCartWidget({
9 | super.key,
10 | });
11 |
12 | @override
13 | State createState() => _QuantityCartWidgetState();
14 | }
15 |
16 | class _QuantityCartWidgetState extends State {
17 | @override
18 | Widget build(BuildContext context) {
19 | final size = MediaQuery.of(context).size;
20 | return Container(
21 | height: 30,
22 | decoration: BoxDecoration(
23 | color: Colors.grey[300], borderRadius: BorderRadius.circular(30)),
24 | child: SizedBox(
25 | width: size.width * 0.2,
26 | child: Row(
27 | mainAxisSize: MainAxisSize.max,
28 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
29 | children: [
30 | GestureDetector(
31 | onTap: () async {
32 | log('Reduce count');
33 | },
34 | child: const Icon(
35 | CupertinoIcons.minus,
36 | size: 16,
37 | ),
38 | ),
39 | const Padding(padding: EdgeInsets.only(top: 5), child: Text('1')),
40 | GestureDetector(
41 | onTap: () async {
42 | log('Add count');
43 | },
44 | child: const Icon(
45 | CupertinoIcons.add,
46 | size: 16,
47 | ),
48 | ),
49 | ],
50 | ),
51 | ));
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/.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.
5 |
6 | version:
7 | revision: 4b12645012342076800eb701bcdfe18f87da21cf
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
17 | base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
18 | - platform: android
19 | create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
20 | base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
21 | - platform: ios
22 | create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
23 | base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
24 | - platform: linux
25 | create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
26 | base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
27 | - platform: macos
28 | create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
29 | base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
30 | - platform: web
31 | create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
32 | base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
33 | - platform: windows
34 | create_revision: 4b12645012342076800eb701bcdfe18f87da21cf
35 | base_revision: 4b12645012342076800eb701bcdfe18f87da21cf
36 |
37 | # User provided section
38 |
39 | # List of Local paths (relative to this file) that should be
40 | # ignored by the migrate tool.
41 | #
42 | # Files that are not part of the templates will be ignored by default.
43 | unmanaged_files:
44 | - 'lib/main.dart'
45 | - 'ios/Runner.xcodeproj/project.pbxproj'
46 |
--------------------------------------------------------------------------------
/lib/presentations/home/widget/header_widget.dart:
--------------------------------------------------------------------------------
1 | import 'dart:developer';
2 | import 'package:fashionstore/presentations/account/account_screen.dart';
3 | import 'package:fashionstore/presentations/profile/profile_screen.dart';
4 | import 'package:flutter/cupertino.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:page_transition/page_transition.dart';
7 |
8 | class HeadWidget extends StatelessWidget {
9 | const HeadWidget({
10 | super.key,
11 | });
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return Row(
16 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
17 | children: [
18 | CircleAvatar(
19 | backgroundColor: Colors.black,
20 | child: IconButton(
21 | onPressed: () {
22 | Navigator.push(
23 | context,
24 | MaterialPageRoute(
25 | builder: (context) => const ScreenAccount(),
26 | ));
27 | },
28 | icon: const Icon(CupertinoIcons.settings_solid)),
29 | ),
30 | InkWell(
31 | onTap: () {
32 | log('Go to Profile');
33 | Navigator.push(
34 | context,
35 | PageTransition(
36 | type: PageTransitionType.rightToLeft,
37 | child: const ProfileScreen(),
38 | ),
39 | );
40 | },
41 | child: const CircleAvatar(
42 | backgroundColor: Colors.black,
43 | radius: 20,
44 | backgroundImage: NetworkImage(
45 | 'https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=880&q=80'),
46 | ),
47 | )
48 | ],
49 | );
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
16 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
31 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | Fashionstore
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | fashionstore
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 | CADisableMinimumFrameDurationOnPhone
47 |
48 | UIApplicationSupportsIndirectInputEvents
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/windows/runner/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | cmake_minimum_required(VERSION 3.14)
2 | project(runner LANGUAGES CXX)
3 |
4 | # Define the application target. To change its name, change BINARY_NAME in the
5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer
6 | # work.
7 | #
8 | # Any new source files that you add to the application should be added here.
9 | add_executable(${BINARY_NAME} WIN32
10 | "flutter_window.cpp"
11 | "main.cpp"
12 | "utils.cpp"
13 | "win32_window.cpp"
14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc"
15 | "Runner.rc"
16 | "runner.exe.manifest"
17 | )
18 |
19 | # Apply the standard set of build settings. This can be removed for applications
20 | # that need different build settings.
21 | apply_standard_settings(${BINARY_NAME})
22 |
23 | # Add preprocessor definitions for the build version.
24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
29 |
30 | # Disable Windows macros that collide with C++ standard library functions.
31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")
32 |
33 | # Add dependency libraries and include directories. Add any application-specific
34 | # dependencies here.
35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app)
36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib")
37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}")
38 |
39 | # Run the Flutter tool portions of the build. This must not be removed.
40 | add_dependencies(${BINARY_NAME} flutter_assemble)
41 |
--------------------------------------------------------------------------------
/windows/runner/utils.cpp:
--------------------------------------------------------------------------------
1 | #include "utils.h"
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 |
10 | void CreateAndAttachConsole() {
11 | if (::AllocConsole()) {
12 | FILE *unused;
13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
14 | _dup2(_fileno(stdout), 1);
15 | }
16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) {
17 | _dup2(_fileno(stdout), 2);
18 | }
19 | std::ios::sync_with_stdio();
20 | FlutterDesktopResyncOutputStreams();
21 | }
22 | }
23 |
24 | std::vector GetCommandLineArguments() {
25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use.
26 | int argc;
27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
28 | if (argv == nullptr) {
29 | return std::vector();
30 | }
31 |
32 | std::vector command_line_arguments;
33 |
34 | // Skip the first argument as it's the binary name.
35 | for (int i = 1; i < argc; i++) {
36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i]));
37 | }
38 |
39 | ::LocalFree(argv);
40 |
41 | return command_line_arguments;
42 | }
43 |
44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) {
45 | if (utf16_string == nullptr) {
46 | return std::string();
47 | }
48 | int target_length = ::WideCharToMultiByte(
49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
50 | -1, nullptr, 0, nullptr, nullptr);
51 | std::string utf8_string;
52 | if (target_length == 0 || target_length > utf8_string.max_size()) {
53 | return utf8_string;
54 | }
55 | utf8_string.resize(target_length);
56 | int converted_length = ::WideCharToMultiByte(
57 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string,
58 | -1, utf8_string.data(),
59 | target_length, nullptr, nullptr);
60 | if (converted_length == 0) {
61 | return std::string();
62 | }
63 | return utf8_string;
64 | }
65 |
--------------------------------------------------------------------------------
/lib/presentations/detail/widgets/addwishlist_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 | import 'package:flutter/cupertino.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:fashionstore/model/functions.dart';
5 | import 'package:fashionstore/model/wishlist_model.dart';
6 |
7 | // ignore: must_be_immutable
8 | class AddWishlistWidget extends StatefulWidget {
9 | bool isAddedToWishlist;
10 | final String id;
11 | AddWishlistWidget({
12 | Key? key,
13 | required this.isAddedToWishlist,
14 | required this.id,
15 | }) : super(key: key);
16 |
17 | @override
18 | State createState() => _AddWishlistWidgetState();
19 | }
20 |
21 | class _AddWishlistWidgetState extends State {
22 | @override
23 | Widget build(BuildContext context) {
24 | String email = FirebaseAuth.instance.currentUser!.email!;
25 | return Padding(
26 | padding: const EdgeInsets.only(bottom: 18.0, right: 18),
27 | child: Row(
28 | children: [
29 | const Spacer(),
30 | CircleAvatar(
31 | radius: 16,
32 | child: IconButton(
33 | onPressed: () async {
34 | Wishlist wishlist = Wishlist(
35 | email: email,
36 | productId: widget.id,
37 | );
38 | if (widget.isAddedToWishlist) {
39 | removeWishlist(wishlist, context);
40 | } else {
41 | addWishlist(wishlist, context);
42 | }
43 | setState(() {
44 | widget.isAddedToWishlist = !widget.isAddedToWishlist;
45 | });
46 | },
47 | icon: Icon(
48 | widget.isAddedToWishlist
49 | ? CupertinoIcons.suit_heart_fill
50 | : CupertinoIcons.heart,
51 | size: 20,
52 | )),
53 | ),
54 | ],
55 | ),
56 | );
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/lib/presentations/home/widget/Shimmer_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shimmer_animation/shimmer_animation.dart';
3 |
4 | class HomeProductShimmerEffect extends StatelessWidget {
5 | const HomeProductShimmerEffect({
6 | super.key,
7 | });
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return GridView.count(
12 | physics: const NeverScrollableScrollPhysics(),
13 | crossAxisCount: 2,
14 | crossAxisSpacing: 20,
15 | mainAxisSpacing: 20,
16 | childAspectRatio: 1 / 1.8,
17 | shrinkWrap: true,
18 | children: List.generate(4, (index) {
19 | return Column(
20 | crossAxisAlignment: CrossAxisAlignment.start,
21 | children: [
22 | Shimmer(
23 | color: Colors.black,
24 | child: Container(
25 | height: 180,
26 | ),
27 | ),
28 | const SizedBox(
29 | height: 5,
30 | ),
31 | Shimmer(
32 | color: Colors.black,
33 | child: Container(
34 | height: 10,
35 | ),
36 | ),
37 | const SizedBox(
38 | height: 5,
39 | ),
40 | Shimmer(
41 | color: Colors.black,
42 | child: Container(
43 | height: 10,
44 | ),
45 | ),
46 | const SizedBox(
47 | height: 5,
48 | ),
49 | Shimmer(
50 | color: Colors.black,
51 | child: Container(
52 | height: 10,
53 | ),
54 | ),
55 | const SizedBox(
56 | height: 5,
57 | ),
58 | Shimmer(
59 | color: Colors.black,
60 | child: const SizedBox(
61 | height: 30,
62 | width: 100,
63 | ),
64 | ),
65 | ],
66 | );
67 | }),
68 | );
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/web/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | fashionstore
33 |
34 |
35 |
39 |
40 |
41 |
42 |
43 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/windows/runner/flutter_window.cpp:
--------------------------------------------------------------------------------
1 | #include "flutter_window.h"
2 |
3 | #include
4 |
5 | #include "flutter/generated_plugin_registrant.h"
6 |
7 | FlutterWindow::FlutterWindow(const flutter::DartProject& project)
8 | : project_(project) {}
9 |
10 | FlutterWindow::~FlutterWindow() {}
11 |
12 | bool FlutterWindow::OnCreate() {
13 | if (!Win32Window::OnCreate()) {
14 | return false;
15 | }
16 |
17 | RECT frame = GetClientArea();
18 |
19 | // The size here must match the window dimensions to avoid unnecessary surface
20 | // creation / destruction in the startup path.
21 | flutter_controller_ = std::make_unique(
22 | frame.right - frame.left, frame.bottom - frame.top, project_);
23 | // Ensure that basic setup of the controller was successful.
24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) {
25 | return false;
26 | }
27 | RegisterPlugins(flutter_controller_->engine());
28 | SetChildContent(flutter_controller_->view()->GetNativeWindow());
29 |
30 | flutter_controller_->engine()->SetNextFrameCallback([&]() {
31 | this->Show();
32 | });
33 |
34 | return true;
35 | }
36 |
37 | void FlutterWindow::OnDestroy() {
38 | if (flutter_controller_) {
39 | flutter_controller_ = nullptr;
40 | }
41 |
42 | Win32Window::OnDestroy();
43 | }
44 |
45 | LRESULT
46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message,
47 | WPARAM const wparam,
48 | LPARAM const lparam) noexcept {
49 | // Give Flutter, including plugins, an opportunity to handle window messages.
50 | if (flutter_controller_) {
51 | std::optional result =
52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam,
53 | lparam);
54 | if (result) {
55 | return *result;
56 | }
57 | }
58 |
59 | switch (message) {
60 | case WM_FONTCHANGE:
61 | flutter_controller_->engine()->ReloadSystemFonts();
62 | break;
63 | }
64 |
65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam);
66 | }
67 |
--------------------------------------------------------------------------------
/lib/presentations/home/widget/categories.dart:
--------------------------------------------------------------------------------
1 | import 'package:fashionstore/presentations/Categories/Boys/category_boys.dart';
2 | import 'package:fashionstore/presentations/Categories/Girls/category_women.dart';
3 | import 'package:fashionstore/presentations/Categories/Men/category_men.dart';
4 | import 'package:fashionstore/presentations/Categories/Women/category_women.dart';
5 | import 'package:fashionstore/presentations/home/widget/category_button_widget.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:page_transition/page_transition.dart';
8 |
9 | class Categories extends StatelessWidget {
10 | const Categories({
11 | super.key,
12 | });
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | return Row(
17 | children: [
18 | CategoryButton(
19 | name: 'Men',
20 | active: true,
21 | onTap: () {
22 | Navigator.push(
23 | context,
24 | PageTransition(
25 | type: PageTransitionType.rightToLeft,
26 | child: const CategoryMen()));
27 | },
28 | ),
29 | CategoryButton(
30 | name: 'Women',
31 | active: true,
32 | onTap: () {
33 | Navigator.push(
34 | context,
35 | PageTransition(
36 | type: PageTransitionType.rightToLeft,
37 | child: const CategoryWomen()));
38 | },
39 | ),
40 | CategoryButton(
41 | name: 'Boys',
42 | active: true,
43 | onTap: () {
44 | Navigator.push(
45 | context,
46 | PageTransition(
47 | type: PageTransitionType.rightToLeft,
48 | child: const CategoryBoys()));
49 | },
50 | ),
51 | CategoryButton(
52 | name: 'Girls',
53 | active: true,
54 | onTap: () {
55 | Navigator.push(
56 | context,
57 | PageTransition(
58 | type: PageTransitionType.rightToLeft,
59 | child: const CategorGirls()));
60 | },
61 | ),
62 | ],
63 | );
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/lib/presentations/onboarding_screens/widgets/onboard_content.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 |
4 | import '../../../core/constants.dart';
5 |
6 | class OnboardContent extends StatelessWidget {
7 | const OnboardContent({
8 | Key? key,
9 | required this.image,
10 | required this.title1,
11 | required this.title2,
12 | required this.description1,
13 | required this.description2,
14 | }) : super(key: key);
15 | final String image, title1, title2, description1, description2;
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | var size = MediaQuery.of(context).size;
20 | var height = size.height;
21 | var width = size.width;
22 | return Column(
23 | crossAxisAlignment: CrossAxisAlignment.start,
24 | children: [
25 | Container(
26 | width: width / 1,
27 | height: height / 2,
28 | decoration: BoxDecoration(
29 | borderRadius: BorderRadius.circular(30),
30 | image: DecorationImage(
31 | image: AssetImage(image),
32 | fit: BoxFit.fill,
33 | )),
34 | ),
35 | khieght40,
36 | Text(
37 | title1,
38 | style: const TextStyle(fontSize: 30, fontWeight: FontWeight.w900),
39 | ),
40 | khieght10,
41 | Text(
42 | title2,
43 | style: const TextStyle(fontSize: 30, fontWeight: FontWeight.w900),
44 | ),
45 | khieght20,
46 | Text(
47 | description1,
48 | style: GoogleFonts.poppins(
49 | textStyle: const TextStyle(
50 | letterSpacing: .5,
51 | fontSize: 14,
52 | color: Colors.black54,
53 | fontWeight: FontWeight.w600,
54 | ),
55 | ),
56 | ),
57 | Text(
58 | description2,
59 | style: GoogleFonts.poppins(
60 | textStyle: const TextStyle(
61 | letterSpacing: .5,
62 | fontSize: 14,
63 | color: Colors.black54,
64 | fontWeight: FontWeight.w600,
65 | ),
66 | ),
67 | ),
68 | khieght20,
69 | ],
70 | );
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/lib/presentations/account/widgets/markup_file.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 | import 'package:flutter_markdown/flutter_markdown.dart';
4 |
5 | class SettingsMenuPop extends StatelessWidget {
6 | SettingsMenuPop({Key? key, this.radius = 10, required this.mdFileName})
7 | : assert(
8 | mdFileName.contains('.md'), 'The file must contain .md extention'),
9 | super(key: key);
10 | final double radius;
11 | final String mdFileName;
12 | @override
13 | Widget build(BuildContext context) {
14 | return Dialog(
15 | shape:
16 | RoundedRectangleBorder(borderRadius: BorderRadius.circular(radius)),
17 | child: Column(
18 | children: [
19 | Expanded(
20 | child: FutureBuilder(
21 | future: Future.delayed(const Duration(microseconds: 150))
22 | .then((value) =>
23 | rootBundle.loadString('assets/$mdFileName')),
24 | builder: (context, snapshot) {
25 | if (snapshot.hasData) {
26 | return Markdown(
27 | styleSheet: MarkdownStyleSheet.fromTheme(ThemeData(
28 | textTheme: const TextTheme(
29 | bodyMedium: TextStyle(
30 | fontFamily: "Inter",
31 | fontSize: 15.0,
32 | color: Colors.black)))),
33 | data: snapshot.data.toString());
34 | }
35 | return const Center(
36 | child: CircularProgressIndicator(),
37 | );
38 | })),
39 | TextButton(
40 | onPressed: () => Navigator.of(context).pop(),
41 | child: Container(
42 | decoration: const BoxDecoration(
43 | color: Colors.black,
44 | borderRadius: BorderRadius.all(
45 | Radius.circular(10),
46 | )),
47 | alignment: Alignment.center,
48 | height: 50,
49 | width: double.infinity,
50 | child: const Text(
51 | 'OK',
52 | style: TextStyle(color: Colors.white),
53 | ),
54 | ))
55 | ],
56 | ),
57 | );
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/lib/presentations/home/widget/offer_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:carousel_slider/carousel_slider.dart';
2 | import 'package:fashionstore/presentations/home/widget/exclusive_widget.dart';
3 | import 'package:fashionstore/provider/product_provider.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:provider/provider.dart';
6 |
7 | import 'shimmer_widget.dart';
8 |
9 | class OfferWidget extends StatelessWidget {
10 | const OfferWidget({
11 | super.key,
12 | });
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | final productProvider =
17 | Provider.of(context, listen: false);
18 | return StreamBuilder(
19 | stream: productProvider.getOfferProducts(),
20 | builder: (context, snapshot) {
21 | if (snapshot.hasData) {
22 | final data = snapshot.data;
23 | return Container(
24 | color: Colors.white,
25 | height: 100,
26 | child: CarouselSlider(
27 | options: CarouselOptions(
28 | height: 100,
29 | enableInfiniteScroll: true,
30 | scrollDirection: Axis.horizontal,
31 | autoPlay: true,
32 | autoPlayCurve: Curves.fastOutSlowIn,
33 | autoPlayAnimationDuration: const Duration(milliseconds: 800),
34 | viewportFraction: 0.95,
35 | enlargeCenterPage: true,
36 | ),
37 | items: List.generate(data.length, (index) {
38 | return Builder(
39 | builder: (BuildContext context) {
40 | return ExclusiveProductWidget(
41 | id: data[index].get('id'),
42 | name: data[index].get('name'),
43 | subname: data[index].get('subname'),
44 | rate: data[index].get('price'),
45 | image: data[index].get('image'),
46 | description: data[index].get('description'),
47 | );
48 | },
49 | );
50 | }),
51 | ),
52 | );
53 | } else if (snapshot.hasError) {
54 | return Text('Error: ${snapshot.error}');
55 | } else if (snapshot.connectionState == ConnectionState.waiting) {
56 | return const HomeProductShimmerEffect();
57 | } else {
58 | return const HomeProductShimmerEffect();
59 | }
60 | },
61 | );
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/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/presentations/orders/widgets/delivered_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:firebase_auth/firebase_auth.dart';
3 | import 'package:flutter/material.dart';
4 | import 'card_completed.dart';
5 |
6 | class DeliveredWidget extends StatelessWidget {
7 | const DeliveredWidget({
8 | super.key,
9 | });
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | final email = FirebaseAuth.instance.currentUser!.email;
14 | var size = MediaQuery.of(context).size;
15 |
16 | return StreamBuilder(
17 | stream: FirebaseFirestore.instance
18 | .collection('orders')
19 | .where('email', isEqualTo: email)
20 | .where('active', isEqualTo: false)
21 | .snapshots(),
22 | builder: (context, snapshot) {
23 | if (snapshot.hasData) {
24 | final List documents = snapshot.data!.docs;
25 | return documents.isNotEmpty
26 | ? ListView.separated(
27 | itemCount: documents.length,
28 | separatorBuilder: (context, index) => const SizedBox(
29 | height: 8,
30 | ),
31 | itemBuilder: (context, index) {
32 | return CardCompleted(
33 | totalPrice: documents[index].get('totalprice'),
34 | productId: documents[index].get('productid').toString(),
35 | );
36 | },
37 | )
38 | : SizedBox(
39 | height: size.height * 0.8,
40 | child: const Center(
41 | child: Text(
42 | "You have no Delivered Products",
43 | style: TextStyle(
44 | fontSize: 20,
45 | fontWeight: FontWeight.bold,
46 | ),
47 | ),
48 | ),
49 | );
50 | } else if (snapshot.hasError) {
51 | return Text('Error: ${snapshot.error}');
52 | } else if (snapshot.connectionState == ConnectionState.waiting) {
53 | return const Center(
54 | child: CircularProgressIndicator(),
55 | );
56 | } else {
57 | return SizedBox(
58 | height: size.height * 0.8,
59 | child: const Center(
60 | child: Text(
61 | "You have no active!",
62 | style: TextStyle(
63 | fontSize: 20,
64 | fontWeight: FontWeight.bold,
65 | ),
66 | ),
67 | ),
68 | );
69 | }
70 | },
71 | );
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/lib/presentations/orders/widgets/active_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:fashionstore/presentations/orders/widgets/card_active.dart';
3 | import 'package:firebase_auth/firebase_auth.dart';
4 | import 'package:flutter/material.dart';
5 |
6 | class ActiveWidget extends StatelessWidget {
7 | const ActiveWidget({
8 | super.key,
9 | });
10 |
11 | @override
12 | Widget build(BuildContext context) {
13 | final email = FirebaseAuth.instance.currentUser!.email;
14 | var size = MediaQuery.of(context).size;
15 | return StreamBuilder(
16 | stream: FirebaseFirestore.instance
17 | .collection('orders')
18 | .where('email', isEqualTo: email)
19 | .where('active', isEqualTo: true)
20 | .snapshots(),
21 | builder: (context, snapshot) {
22 | if (snapshot.hasData) {
23 | final List documents = snapshot.data!.docs;
24 | return documents.isNotEmpty
25 | ? ListView.separated(
26 | itemCount: documents.length,
27 | separatorBuilder: (context, index) => const SizedBox(
28 | height: 8,
29 | ),
30 | itemBuilder: (context, index) {
31 | return CardActive(
32 | totalPrice: documents[index].get('totalprice'),
33 | productId: documents[index].get('productid').toString(),
34 | orderId: documents[index].get('orderId'),
35 | );
36 | },
37 | )
38 | : SizedBox(
39 | height: size.height * 0.8,
40 | child: const Center(
41 | child: Text(
42 | "You have no active!",
43 | style: TextStyle(
44 | fontSize: 20,
45 | fontWeight: FontWeight.bold,
46 | ),
47 | ),
48 | ),
49 | );
50 | } else if (snapshot.hasError) {
51 | return Text('Error: ${snapshot.error}');
52 | } else if (snapshot.connectionState == ConnectionState.waiting) {
53 | return const Center(
54 | child: CircularProgressIndicator(),
55 | );
56 | } else {
57 | return SizedBox(
58 | height: size.height * 0.8,
59 | child: const Center(
60 | child: Text(
61 | "You have no active!",
62 | style: TextStyle(
63 | fontSize: 20,
64 | fontWeight: FontWeight.bold,
65 | ),
66 | ),
67 | ),
68 | );
69 | }
70 | },
71 | );
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/lib/widgets/appbar.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:firebase_auth/firebase_auth.dart';
3 | import 'package:flutter/cupertino.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:fashionstore/presentations/cart/cart_screen.dart';
6 |
7 | class Appbar extends StatelessWidget {
8 | const Appbar({
9 | Key? key,
10 | required this.goBack,
11 | }) : super(key: key);
12 | final bool goBack;
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | String email = FirebaseAuth.instance.currentUser!.email!;
17 | return Row(
18 | children: [
19 | InkWell(
20 | onTap: () {
21 | goBack ? Navigator.pop(context) : null;
22 | },
23 | child: const CircleAvatar(
24 | radius: 20,
25 | backgroundImage: AssetImage('assets/images/prev.jpg')),
26 | ),
27 | const Spacer(),
28 | StreamBuilder(
29 | stream: FirebaseFirestore.instance
30 | .collection('cart')
31 | .where('email', isEqualTo: email)
32 | .snapshots(),
33 | builder: (context, snapshot) {
34 | if (snapshot.connectionState == ConnectionState.waiting ||
35 | !snapshot.hasData) {
36 | return IconButton(
37 | onPressed: () {
38 | Navigator.push(context, MaterialPageRoute(
39 | builder: (context) {
40 | return const ScreenCart();
41 | },
42 | ));
43 | },
44 | icon: const Icon(
45 | CupertinoIcons.bag,
46 | size: 30,
47 | ));
48 | }
49 | final cartDatas = snapshot.data!.docs.toList();
50 | return Stack(
51 | children: [
52 | IconButton(
53 | onPressed: () {},
54 | icon: const Icon(
55 | CupertinoIcons.bag,
56 | size: 30,
57 | )),
58 | Positioned(
59 | right: 5,
60 | top: 5,
61 | child: CircleAvatar(
62 | backgroundColor: Colors.black,
63 | radius: 9,
64 | child: Text(
65 | cartDatas.length.toString(),
66 | style: const TextStyle(
67 | color: Colors.white,
68 | fontSize: 12,
69 | ),
70 | ),
71 | ),
72 | ),
73 | ],
74 | );
75 | },
76 | )
77 | ],
78 | );
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/lib/presentations/checkout/order_loading_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:animated_text_kit/animated_text_kit.dart';
2 | import 'package:checkmark/checkmark.dart';
3 | import 'package:fashionstore/model/functions.dart';
4 | import 'package:fashionstore/presentations/home/home_screen.dart';
5 | import 'package:firebase_auth/firebase_auth.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:google_fonts/google_fonts.dart';
8 |
9 | class OrderLoadingScreen extends StatefulWidget {
10 | const OrderLoadingScreen({
11 | super.key,
12 | });
13 |
14 | @override
15 | State createState() => _OrderLoadingScreenState();
16 | }
17 |
18 | class _OrderLoadingScreenState extends State {
19 | final email = FirebaseAuth.instance.currentUser!.email;
20 | bool checked = false;
21 | @override
22 | void initState() {
23 | placeOrderAndDeleteCartItems(email!);
24 | delayChecked();
25 | super.initState();
26 | }
27 |
28 | delayChecked() async {
29 | await Future.delayed(
30 | const Duration(milliseconds: 1),
31 | () {
32 | setState(() {
33 | checked = true;
34 | });
35 | },
36 | );
37 | }
38 |
39 | @override
40 | Widget build(BuildContext context) {
41 | navigateToHome(context);
42 | return Scaffold(
43 | body: Center(
44 | child: Column(
45 | mainAxisAlignment: MainAxisAlignment.center,
46 | children: [
47 | SizedBox(
48 | height: 100,
49 | width: 100,
50 | child: CheckMark(
51 | active: checked,
52 | curve: Curves.decelerate,
53 | duration: const Duration(milliseconds: 700),
54 | ),
55 | ),
56 | const SizedBox(
57 | height: 25,
58 | ),
59 | SizedBox(
60 | width: 300,
61 | child: DefaultTextStyle(
62 | style: GoogleFonts.comfortaa(
63 | fontSize: 30.0,
64 | color: Colors.black,
65 | ),
66 | child: AnimatedTextKit(
67 | totalRepeatCount: 1,
68 | animatedTexts: [
69 | TyperAnimatedText('Order was Placed'),
70 | ],
71 | ),
72 | ),
73 | ),
74 | ],
75 | ),
76 | ),
77 | );
78 | }
79 | }
80 |
81 | navigateToHome(BuildContext context) {
82 | Future.delayed(
83 | const Duration(milliseconds: 1500),
84 | () => Navigator.pushAndRemoveUntil(
85 | context,
86 | MaterialPageRoute(
87 | builder: (BuildContext context) => const HomePage(),
88 | ),
89 | (Route route) => false,
90 | ));
91 | }
92 |
--------------------------------------------------------------------------------
/lib/provider/cart_provider.dart:
--------------------------------------------------------------------------------
1 | import 'dart:developer';
2 |
3 | import 'package:cloud_firestore/cloud_firestore.dart';
4 | import 'package:fashionstore/model/cart_model.dart';
5 | import 'package:fashionstore/widgets/snackbar.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:fluttertoast/fluttertoast.dart';
8 |
9 | class CartProvider with ChangeNotifier {
10 | int _totalPrice = 0;
11 |
12 | int get totalPrice => _totalPrice;
13 |
14 | void updateTotalPrice(int newTotalPrice) {
15 | _totalPrice = newTotalPrice;
16 | notifyListeners();
17 | }
18 |
19 | //add to cart function
20 | Future addToCart(Cart cartModel, BuildContext context) async {
21 | final cart = FirebaseFirestore.instance.collection('cart');
22 |
23 | final reference = cart.doc();
24 | try {
25 | await reference.set({
26 | 'productid': cartModel.productId,
27 | 'id': reference.id,
28 | 'color': cartModel.color,
29 | 'quantity': cartModel.quantity,
30 | 'price': cartModel.price,
31 | 'totalprice': cartModel.totalPrice,
32 | 'email': cartModel.email,
33 | 'size': cartModel.size,
34 | }).then((value) => Navigator.pop(context));
35 | Fluttertoast.showToast(
36 | msg: 'Product Added to Cart',
37 | toastLength: Toast.LENGTH_SHORT,
38 | gravity: ToastGravity.BOTTOM,
39 | timeInSecForIosWeb: 1,
40 | backgroundColor: Colors.black,
41 | textColor: Colors.white,
42 | );
43 | } catch (error) {
44 | Fluttertoast.showToast(
45 | msg: 'Failed to Add to Cart',
46 | toastLength: Toast.LENGTH_SHORT,
47 | gravity: ToastGravity.BOTTOM,
48 | timeInSecForIosWeb: 1,
49 | backgroundColor: Colors.black,
50 | textColor: Colors.white,
51 | );
52 | log("Failed to add product to cart: $error");
53 | }
54 | }
55 |
56 | //get product stream
57 | Stream getCartStream(String email) {
58 | return FirebaseFirestore.instance
59 | .collection('cart')
60 | .where('email', isEqualTo: email)
61 | .snapshots();
62 | }
63 |
64 | //delelte cart item
65 | //delete cart product
66 | Future deleteCart(String id, BuildContext context) {
67 | CollectionReference cartProduct =
68 | FirebaseFirestore.instance.collection('cart');
69 | return cartProduct.doc(id).delete().then((value) {
70 | log("Cart Deleted");
71 | Fluttertoast.showToast(
72 | msg: 'Removed from Cart',
73 | toastLength: Toast.LENGTH_SHORT,
74 | gravity: ToastGravity.BOTTOM,
75 | timeInSecForIosWeb: 1,
76 | backgroundColor: Colors.black,
77 | textColor: Colors.white,
78 | );
79 | }).catchError((error) {
80 | log("Failed to delete Cart: $error");
81 | alertSnackbar(context, "Failed to delete Cart Item");
82 | });
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/lib/presentations/orders/orders_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 | import 'widgets/active_widget.dart';
4 | import 'widgets/delivered_widget.dart';
5 |
6 | class OrderScreen extends StatelessWidget {
7 | const OrderScreen({super.key});
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return SafeArea(
12 | child: Padding(
13 | padding: const EdgeInsets.all(8.0),
14 | child: DefaultTabController(
15 | initialIndex: 0,
16 | length: 2,
17 | child: Scaffold(
18 | appBar: AppBar(
19 | backgroundColor: Colors.white,
20 | elevation: 0,
21 | foregroundColor: Colors.black,
22 | leading: InkWell(
23 | onTap: () {
24 | Navigator.pop(context);
25 | },
26 | child: const CircleAvatar(
27 | radius: 5,
28 | backgroundImage: AssetImage('assets/images/prev.jpg')),
29 | ),
30 | title: Text(
31 | "My Orders",
32 | style: GoogleFonts.nunito(
33 | textStyle: const TextStyle(
34 | letterSpacing: .5,
35 | fontSize: 26,
36 | color: Colors.black,
37 | fontWeight: FontWeight.w700),
38 | ),
39 | ),
40 | bottom: const TabBar(
41 | tabs: [
42 | Tab(
43 | child: Text(
44 | 'Active',
45 | style: TextStyle(
46 | fontWeight: FontWeight.bold,
47 | fontSize: 18,
48 | ),
49 | ),
50 | ),
51 | Tab(
52 | child: Text(
53 | 'Delivered',
54 | style: TextStyle(
55 | fontWeight: FontWeight.bold,
56 | fontSize: 18,
57 | ),
58 | ),
59 | ),
60 | ],
61 | unselectedLabelColor: Colors.grey,
62 | labelColor: Colors.black,
63 | indicator: UnderlineTabIndicator(
64 | borderSide: BorderSide(
65 | color: Colors.black,
66 | width: 3.0,
67 | ),
68 | insets: EdgeInsets.symmetric(horizontal: 16.0),
69 | ),
70 | ),
71 | ),
72 | body: const TabBarView(
73 | children: [
74 | ActiveWidget(),
75 | DeliveredWidget(),
76 | ],
77 | ))),
78 | ),
79 | );
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/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 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: 'com.google.gms.google-services'
26 | apply plugin: 'kotlin-android'
27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
28 | def keystoreProperties = new Properties()
29 | def keystorePropertiesFile = rootProject.file('key.properties')
30 | if (keystorePropertiesFile.exists()) {
31 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
32 | }
33 | android {
34 | compileSdkVersion 33
35 | ndkVersion flutter.ndkVersion
36 |
37 | compileOptions {
38 | sourceCompatibility JavaVersion.VERSION_1_8
39 | targetCompatibility JavaVersion.VERSION_1_8
40 | }
41 |
42 | kotlinOptions {
43 | jvmTarget = '1.8'
44 | }
45 |
46 | sourceSets {
47 | main.java.srcDirs += 'src/main/kotlin'
48 | }
49 |
50 | defaultConfig {
51 | applicationId "in.aslam.fashionstore"
52 | minSdkVersion 21
53 | // You can update the following values to match your application needs.
54 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
55 |
56 | targetSdkVersion 33
57 | versionCode 2 // Change to a higher number
58 | versionName "1.0.2" // Change to a higher number
59 | }
60 | signingConfigs {
61 | release {
62 | keyAlias keystoreProperties['keyAlias']
63 | keyPassword keystoreProperties['keyPassword']
64 | storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
65 | storePassword keystoreProperties['storePassword']
66 | }
67 | }
68 |
69 | buildTypes {
70 | release {
71 | signingConfig signingConfigs.debug
72 | signingConfig signingConfigs.release
73 | }
74 | }
75 | }
76 |
77 | flutter {
78 | source '../..'
79 | }
80 |
81 | dependencies {
82 | implementation platform('com.google.firebase:firebase-bom:32.1.1')
83 | implementation 'com.google.firebase:firebase-analytics'
84 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
85 | implementation 'com.google.android.material:material:1.6.0'
86 | implementation 'com.android.support:multidex:1.0.3'
87 | implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
88 | }
89 |
--------------------------------------------------------------------------------
/linux/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # This file controls Flutter-level build steps. It should not be edited.
2 | cmake_minimum_required(VERSION 3.10)
3 |
4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5 |
6 | # Configuration provided via flutter tool.
7 | include(${EPHEMERAL_DIR}/generated_config.cmake)
8 |
9 | # TODO: Move the rest of this into files in ephemeral. See
10 | # https://github.com/flutter/flutter/issues/57146.
11 |
12 | # Serves the same purpose as list(TRANSFORM ... PREPEND ...),
13 | # which isn't available in 3.10.
14 | function(list_prepend LIST_NAME PREFIX)
15 | set(NEW_LIST "")
16 | foreach(element ${${LIST_NAME}})
17 | list(APPEND NEW_LIST "${PREFIX}${element}")
18 | endforeach(element)
19 | set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE)
20 | endfunction()
21 |
22 | # === Flutter Library ===
23 | # System-level dependencies.
24 | find_package(PkgConfig REQUIRED)
25 | pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
26 | pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0)
27 | pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0)
28 |
29 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so")
30 |
31 | # Published to parent scope for install step.
32 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
33 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
34 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
35 | set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE)
36 |
37 | list(APPEND FLUTTER_LIBRARY_HEADERS
38 | "fl_basic_message_channel.h"
39 | "fl_binary_codec.h"
40 | "fl_binary_messenger.h"
41 | "fl_dart_project.h"
42 | "fl_engine.h"
43 | "fl_json_message_codec.h"
44 | "fl_json_method_codec.h"
45 | "fl_message_codec.h"
46 | "fl_method_call.h"
47 | "fl_method_channel.h"
48 | "fl_method_codec.h"
49 | "fl_method_response.h"
50 | "fl_plugin_registrar.h"
51 | "fl_plugin_registry.h"
52 | "fl_standard_message_codec.h"
53 | "fl_standard_method_codec.h"
54 | "fl_string_codec.h"
55 | "fl_value.h"
56 | "fl_view.h"
57 | "flutter_linux.h"
58 | )
59 | list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/")
60 | add_library(flutter INTERFACE)
61 | target_include_directories(flutter INTERFACE
62 | "${EPHEMERAL_DIR}"
63 | )
64 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}")
65 | target_link_libraries(flutter INTERFACE
66 | PkgConfig::GTK
67 | PkgConfig::GLIB
68 | PkgConfig::GIO
69 | )
70 | add_dependencies(flutter flutter_assemble)
71 |
72 | # === Flutter tool backend ===
73 | # _phony_ is a non-existent file to force this command to run every time,
74 | # since currently there's no way to get a full input/output list from the
75 | # flutter tool.
76 | add_custom_command(
77 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
78 | ${CMAKE_CURRENT_BINARY_DIR}/_phony_
79 | COMMAND ${CMAKE_COMMAND} -E env
80 | ${FLUTTER_TOOL_ENVIRONMENT}
81 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
82 | ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE}
83 | VERBATIM
84 | )
85 | add_custom_target(flutter_assemble DEPENDS
86 | "${FLUTTER_LIBRARY}"
87 | ${FLUTTER_LIBRARY_HEADERS}
88 | )
89 |
--------------------------------------------------------------------------------
/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/presentations/wishlist/wishlist_screen.dart:
--------------------------------------------------------------------------------
1 | import 'dart:developer';
2 | import 'package:cloud_firestore/cloud_firestore.dart';
3 | import 'package:fashionstore/core/constants.dart';
4 | import 'package:fashionstore/presentations/home/widget/shimmer_widget.dart';
5 | import 'package:fashionstore/widgets/appbar.dart';
6 | import 'package:fashionstore/widgets/main_heading_widget.dart';
7 | import 'package:firebase_auth/firebase_auth.dart';
8 | import 'package:flutter/material.dart';
9 | import 'widgets/wishlist_widget.dart';
10 |
11 | class ScreenWishlist extends StatelessWidget {
12 | const ScreenWishlist({Key? key}) : super(key: key);
13 |
14 | @override
15 | Widget build(BuildContext context) {
16 | String email = FirebaseAuth.instance.currentUser!.email!;
17 | var size = MediaQuery.of(context).size;
18 | var height = size.height;
19 | return SafeArea(
20 | child: Scaffold(
21 | body: Padding(
22 | padding: const EdgeInsets.only(left: 12.0, right: 10, top: 10),
23 | child: Column(
24 | crossAxisAlignment: CrossAxisAlignment.start,
25 | children: [
26 | const Appbar(goBack: false),
27 | khieght10,
28 | const MainHeading(
29 | text: 'Wishlist',
30 | ),
31 | khieght10,
32 | SizedBox(
33 | height: height / 1.42,
34 | child: StreamBuilder(
35 | stream: FirebaseFirestore.instance
36 | .collection('wishlist')
37 | .where('email', isEqualTo: email)
38 | .snapshots(),
39 | builder: (context, snapshot) {
40 | if (snapshot.hasData) {
41 | final List documents =
42 | snapshot.data!.docs;
43 | return documents.isNotEmpty
44 | ? ListView.separated(
45 | shrinkWrap: true,
46 | separatorBuilder: (context, index) => khieght20,
47 | itemCount: documents.length,
48 | itemBuilder: (context, index) {
49 | return WishlistProductWidget(
50 | id: documents[index].get('id'),
51 | productId: documents[index].get('productid'),
52 | );
53 | },
54 | )
55 | : const Padding(
56 | padding: EdgeInsets.symmetric(vertical: 250.0),
57 | child: Center(
58 | child: Text('Wishlist is Empty'),
59 | ),
60 | );
61 | } else if (snapshot.hasError) {
62 | Text('Error: ${snapshot.error}');
63 | log(snapshot.error.toString());
64 | } else if (snapshot.connectionState ==
65 | ConnectionState.waiting) {
66 | return const HomeProductShimmerEffect();
67 | }
68 | return const HomeProductShimmerEffect();
69 | },
70 | ),
71 | ),
72 | ],
73 | ),
74 | ),
75 | ));
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/macos/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 |
--------------------------------------------------------------------------------
/windows/runner/Runner.rc:
--------------------------------------------------------------------------------
1 | // Microsoft Visual C++ generated resource script.
2 | //
3 | #pragma code_page(65001)
4 | #include "resource.h"
5 |
6 | #define APSTUDIO_READONLY_SYMBOLS
7 | /////////////////////////////////////////////////////////////////////////////
8 | //
9 | // Generated from the TEXTINCLUDE 2 resource.
10 | //
11 | #include "winres.h"
12 |
13 | /////////////////////////////////////////////////////////////////////////////
14 | #undef APSTUDIO_READONLY_SYMBOLS
15 |
16 | /////////////////////////////////////////////////////////////////////////////
17 | // English (United States) resources
18 |
19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
21 |
22 | #ifdef APSTUDIO_INVOKED
23 | /////////////////////////////////////////////////////////////////////////////
24 | //
25 | // TEXTINCLUDE
26 | //
27 |
28 | 1 TEXTINCLUDE
29 | BEGIN
30 | "resource.h\0"
31 | END
32 |
33 | 2 TEXTINCLUDE
34 | BEGIN
35 | "#include ""winres.h""\r\n"
36 | "\0"
37 | END
38 |
39 | 3 TEXTINCLUDE
40 | BEGIN
41 | "\r\n"
42 | "\0"
43 | END
44 |
45 | #endif // APSTUDIO_INVOKED
46 |
47 |
48 | /////////////////////////////////////////////////////////////////////////////
49 | //
50 | // Icon
51 | //
52 |
53 | // Icon with lowest ID value placed first to ensure application icon
54 | // remains consistent on all systems.
55 | IDI_APP_ICON ICON "resources\\app_icon.ico"
56 |
57 |
58 | /////////////////////////////////////////////////////////////////////////////
59 | //
60 | // Version
61 | //
62 |
63 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD)
64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD
65 | #else
66 | #define VERSION_AS_NUMBER 1,0,0,0
67 | #endif
68 |
69 | #if defined(FLUTTER_VERSION)
70 | #define VERSION_AS_STRING FLUTTER_VERSION
71 | #else
72 | #define VERSION_AS_STRING "1.0.0"
73 | #endif
74 |
75 | VS_VERSION_INFO VERSIONINFO
76 | FILEVERSION VERSION_AS_NUMBER
77 | PRODUCTVERSION VERSION_AS_NUMBER
78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
79 | #ifdef _DEBUG
80 | FILEFLAGS VS_FF_DEBUG
81 | #else
82 | FILEFLAGS 0x0L
83 | #endif
84 | FILEOS VOS__WINDOWS32
85 | FILETYPE VFT_APP
86 | FILESUBTYPE 0x0L
87 | BEGIN
88 | BLOCK "StringFileInfo"
89 | BEGIN
90 | BLOCK "040904e4"
91 | BEGIN
92 | VALUE "CompanyName", "com.example" "\0"
93 | VALUE "FileDescription", "fashionstore" "\0"
94 | VALUE "FileVersion", VERSION_AS_STRING "\0"
95 | VALUE "InternalName", "fashionstore" "\0"
96 | VALUE "LegalCopyright", "Copyright (C) 2023 com.example. All rights reserved." "\0"
97 | VALUE "OriginalFilename", "fashionstore.exe" "\0"
98 | VALUE "ProductName", "fashionstore" "\0"
99 | VALUE "ProductVersion", VERSION_AS_STRING "\0"
100 | END
101 | END
102 | BLOCK "VarFileInfo"
103 | BEGIN
104 | VALUE "Translation", 0x409, 1252
105 | END
106 | END
107 |
108 | #endif // English (United States) resources
109 | /////////////////////////////////////////////////////////////////////////////
110 |
111 |
112 |
113 | #ifndef APSTUDIO_INVOKED
114 | /////////////////////////////////////////////////////////////////////////////
115 | //
116 | // Generated from the TEXTINCLUDE 3 resource.
117 | //
118 |
119 |
120 | /////////////////////////////////////////////////////////////////////////////
121 | #endif // not APSTUDIO_INVOKED
122 |
--------------------------------------------------------------------------------
/lib/presentations/Search/search_screen.dart:
--------------------------------------------------------------------------------
1 | import 'dart:developer';
2 | import 'package:cloud_firestore/cloud_firestore.dart';
3 | import 'package:fashionstore/core/constants.dart';
4 | import 'package:fashionstore/presentations/home/widget/shimmer_widget.dart';
5 | import 'package:fashionstore/presentations/home/widget/product_tile_widget.dart';
6 | import 'package:flutter/material.dart';
7 | import 'widgets/custom_search_widget.dart';
8 |
9 | List availableProducts = [];
10 | List filteredProducts = [];
11 |
12 | class SearchScreen extends StatefulWidget {
13 | const SearchScreen({super.key});
14 |
15 | @override
16 | State createState() => _SearchScreenState();
17 | }
18 |
19 | class _SearchScreenState extends State {
20 | @override
21 | Widget build(BuildContext context) {
22 | var size = MediaQuery.of(context).size;
23 | final double itemHeight = (size.height - kToolbarHeight - 24) / 2.5;
24 | final double itemWidth = size.width / 2;
25 | return SafeArea(
26 | child: Scaffold(
27 | body: Padding(
28 | padding: const EdgeInsets.only(top: 8.0, left: 12, right: 12),
29 | child: Column(
30 | children: [
31 | khieght10,
32 | CustomSearchWidget(
33 | onChanged: filterUsers,
34 | ),
35 | khieght10,
36 | Expanded(
37 | child: StreamBuilder(
38 | stream: FirebaseFirestore.instance
39 | .collection('products')
40 | .snapshots(),
41 | builder: (context, snapshot) {
42 | if (snapshot.hasError) {
43 | return const CircularProgressIndicator();
44 | } else if (snapshot.hasData) {
45 | log('Data Received');
46 | availableProducts = snapshot.data!.docs;
47 | return GridView.builder(
48 | shrinkWrap: true,
49 | itemCount: filteredProducts.length,
50 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
51 | crossAxisCount: 2,
52 | childAspectRatio: (itemWidth / itemHeight),
53 | crossAxisSpacing: 16.0,
54 | mainAxisSpacing: 16.0),
55 | itemBuilder: (context, index) {
56 | final DocumentSnapshot productSnap =
57 | filteredProducts[index];
58 | return ProductTile(
59 | id: productSnap['id'],
60 | name: productSnap['name'],
61 | subname: productSnap['subname'],
62 | rate: productSnap['price'],
63 | image: productSnap['image'],
64 | description: productSnap['description'],
65 | );
66 | },
67 | );
68 | } else if (snapshot.connectionState ==
69 | ConnectionState.waiting) {
70 | return const HomeProductShimmerEffect();
71 | }
72 | return const HomeProductShimmerEffect();
73 | },
74 | ),
75 | )
76 | ],
77 | ),
78 | ),
79 | ));
80 | }
81 |
82 | void filterUsers(String query) {
83 | setState(() {
84 | filteredProducts = availableProducts.where((doc) {
85 | String name = doc.data()['name'].toLowerCase();
86 | String searchLower = query.toLowerCase();
87 | return name.contains(searchLower);
88 | }).toList();
89 | });
90 | }
91 | }
92 |
--------------------------------------------------------------------------------
/lib/presentations/home/home_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:fashionstore/presentations/account/account_screen.dart';
2 | import 'package:fashionstore/presentations/cart/cart_screen.dart';
3 | import 'package:fashionstore/presentations/home/widget/home_widget.dart';
4 | import 'package:fashionstore/presentations/wishlist/wishlist_screen.dart';
5 | import 'package:flutter/cupertino.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:google_fonts/google_fonts.dart';
8 | import 'package:google_nav_bar/google_nav_bar.dart';
9 |
10 | class HomePage extends StatefulWidget {
11 | const HomePage({super.key});
12 |
13 | @override
14 | State createState() => _HomePageState();
15 | }
16 |
17 | class _HomePageState extends State {
18 | int currentselected = 0;
19 | final pages = [
20 | WidgetHome(),
21 | const ScreenCart(),
22 | const ScreenWishlist(),
23 | const ScreenAccount(),
24 | ];
25 | @override
26 | Widget build(BuildContext context) {
27 | return SafeArea(
28 | child: Scaffold(
29 | bottomNavigationBar: Material(
30 | elevation: 50,
31 | child: Container(
32 | decoration: const BoxDecoration(
33 | color: Colors.white,
34 | borderRadius: BorderRadius.only(
35 | topRight: Radius.circular(30), topLeft: Radius.circular(30)),
36 | ),
37 | child: Padding(
38 | padding: const EdgeInsets.symmetric(vertical: 20.0, horizontal: 20),
39 | child: GNav(
40 | gap: 8,
41 | backgroundColor: Colors.white,
42 | color: Colors.white,
43 | activeColor: Colors.white,
44 | tabBackgroundColor: Colors.black,
45 | padding: const EdgeInsets.all(8),
46 | onTabChange: (index) {
47 | setState(() {
48 | currentselected = index;
49 | });
50 | },
51 | tabs: [
52 | GButton(
53 | icon: CupertinoIcons.house_fill,
54 | iconColor: Colors.black,
55 | text: 'Home',
56 | textStyle: GoogleFonts.inconsolata(
57 | textStyle: const TextStyle(
58 | letterSpacing: .5, fontSize: 15, color: Colors.white),
59 | ),
60 | ),
61 | GButton(
62 | icon: CupertinoIcons.cart_fill,
63 | iconColor: Colors.black,
64 | text: 'Cart',
65 | textStyle: GoogleFonts.inconsolata(
66 | textStyle: const TextStyle(
67 | letterSpacing: .5, fontSize: 15, color: Colors.white),
68 | ),
69 | ),
70 | GButton(
71 | icon: CupertinoIcons.heart_fill,
72 | iconColor: Colors.black,
73 | text: 'Wishlist',
74 | textStyle: GoogleFonts.inconsolata(
75 | textStyle: const TextStyle(
76 | letterSpacing: .5, fontSize: 15, color: Colors.white),
77 | ),
78 | ),
79 | GButton(
80 | icon: CupertinoIcons.person_solid,
81 | iconColor: Colors.black,
82 | text: 'Account',
83 | textStyle: GoogleFonts.inconsolata(
84 | textStyle: const TextStyle(
85 | letterSpacing: .5, fontSize: 15, color: Colors.white),
86 | ),
87 | ),
88 | ]),
89 | ),
90 | ),
91 | ),
92 | body: pages[currentselected],
93 | ));
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/lib/presentations/checkout/widget/address_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:fashionstore/model/address_model.dart';
2 | import 'package:fashionstore/presentations/address/update_address.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:fashionstore/core/constants.dart';
5 | import 'package:fashionstore/presentations/checkout/widget/address_field.dart';
6 | import 'package:fashionstore/presentations/checkout/widget/edit_address_button.dart';
7 | import 'package:page_transition/page_transition.dart';
8 |
9 | class AddressWidget extends StatelessWidget {
10 | const AddressWidget({
11 | Key? key,
12 | required this.name,
13 | required this.address,
14 | required this.pincode,
15 | required this.state,
16 | required this.city,
17 | required this.phone,
18 | required this.email,
19 | required this.id,
20 | }) : super(key: key);
21 | final String name;
22 | final String address;
23 | final String pincode;
24 | final String state;
25 | final String city;
26 | final String phone;
27 | final String email;
28 | final String id;
29 |
30 | @override
31 | Widget build(BuildContext context) {
32 | var data = Address(
33 | id: id,
34 | name: name,
35 | pinCode: int.parse(pincode),
36 | permanentAddress: address,
37 | state: state,
38 | city: city,
39 | phone: int.parse(phone),
40 | email: email);
41 | var size = MediaQuery.of(context).size;
42 | return Material(
43 | elevation: 12,
44 | borderRadius: const BorderRadius.all(Radius.circular(20)),
45 | shadowColor: Colors.black,
46 | child: Container(
47 | width: size.width * 0.9,
48 | height: size.height * 0.250,
49 | decoration: const BoxDecoration(
50 | borderRadius: BorderRadius.all(Radius.circular(20)),
51 | ),
52 | child: Padding(
53 | padding: const EdgeInsets.only(right: 16, left: 16, top: 16),
54 | child: Column(
55 | crossAxisAlignment: CrossAxisAlignment.start,
56 | children: [
57 | AddressField(id: 'Name', value: name),
58 | khieght5,
59 | AddressField(id: 'Address', value: address),
60 | khieght5,
61 | AddressField(id: 'Pincode', value: pincode),
62 | khieght5,
63 | AddressField(id: 'City', value: city),
64 | Row(
65 | mainAxisAlignment: MainAxisAlignment.start,
66 | crossAxisAlignment: CrossAxisAlignment.end,
67 | children: [
68 | Column(
69 | children: [
70 | khieght5,
71 | Padding(
72 | padding: const EdgeInsets.only(right: 54.0),
73 | child: AddressField(id: 'State', value: state),
74 | ),
75 | khieght5,
76 | AddressField(id: 'Phone', value: phone),
77 | ],
78 | ),
79 | const Spacer(),
80 | EditButton(
81 | name: 'Edit',
82 | onTap: () {
83 | Navigator.push(
84 | context,
85 | PageTransition(
86 | type: PageTransitionType.bottomToTop,
87 | child: EditAdressScreen(
88 | data: data,
89 | ),
90 | ),
91 | );
92 | })
93 | ],
94 | ),
95 | ],
96 | ),
97 | ),
98 | ),
99 | );
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/lib/presentations/orders/widgets/order_cancel.dart:
--------------------------------------------------------------------------------
1 | import 'dart:developer';
2 | import 'package:cloud_firestore/cloud_firestore.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:fluttertoast/fluttertoast.dart';
5 |
6 | orderCancelConfirm(
7 | BuildContext context,
8 | String orderId,
9 | ) {
10 | showModalBottomSheet(
11 | context: context,
12 | builder: (context) {
13 | return Container(
14 | color: Colors.transparent,
15 | child: Container(
16 | decoration: const BoxDecoration(
17 | color: Colors.white,
18 | borderRadius: BorderRadius.only(
19 | topLeft: Radius.circular(30),
20 | topRight: Radius.circular(30),
21 | ),
22 | ),
23 | child: Column(
24 | mainAxisSize: MainAxisSize.min,
25 | children: [
26 | const Padding(
27 | padding: EdgeInsets.all(16.0),
28 | child: Text(
29 | 'Cancel Order',
30 | style: TextStyle(
31 | fontWeight: FontWeight.bold,
32 | fontSize: 20,
33 | ),
34 | ),
35 | ),
36 | const Padding(
37 | padding: EdgeInsets.all(16.0),
38 | child: Text(
39 | 'Are you sure you want to cancel this order?',
40 | style: TextStyle(fontSize: 16),
41 | ),
42 | ),
43 | Row(
44 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
45 | children: [
46 | ElevatedButton(
47 | style: const ButtonStyle(
48 | backgroundColor:
49 | MaterialStatePropertyAll(Colors.white)),
50 | child: const Text(
51 | 'Cancel',
52 | style: TextStyle(
53 | color: Colors.black,
54 | fontSize: 18,
55 | ),
56 | ),
57 | onPressed: () {
58 | Navigator.pop(context, false);
59 | },
60 | ),
61 | ElevatedButton(
62 | style: const ButtonStyle(
63 | backgroundColor:
64 | MaterialStatePropertyAll(Colors.white)),
65 | child: const Text(
66 | 'Confirm',
67 | style: TextStyle(
68 | color: Colors.red,
69 | fontSize: 18,
70 | ),
71 | ),
72 | onPressed: () async {
73 | Navigator.pop(context);
74 | await deleteOrder(orderId);
75 | },
76 | ),
77 | ],
78 | ),
79 | const SizedBox(height: 25),
80 | ],
81 | ),
82 | ),
83 | );
84 | },
85 | );
86 | }
87 |
88 | Future deleteOrder(String orderId) async {
89 | try {
90 | CollectionReference ordersCollection =
91 | FirebaseFirestore.instance.collection('orders');
92 |
93 | await ordersCollection.doc(orderId).delete();
94 | Fluttertoast.showToast(
95 | msg: 'Order Cancelled successfully',
96 | toastLength: Toast.LENGTH_SHORT,
97 | gravity: ToastGravity.BOTTOM,
98 | timeInSecForIosWeb: 1,
99 | backgroundColor: Colors.black,
100 | textColor: Colors.white,
101 | );
102 | log('Document deleted successfully');
103 | } catch (e) {
104 | log('Error deleting document: $e');
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/windows/runner/win32_window.h:
--------------------------------------------------------------------------------
1 | #ifndef RUNNER_WIN32_WINDOW_H_
2 | #define RUNNER_WIN32_WINDOW_H_
3 |
4 | #include
5 |
6 | #include
7 | #include
8 | #include
9 |
10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be
11 | // inherited from by classes that wish to specialize with custom
12 | // rendering and input handling
13 | class Win32Window {
14 | public:
15 | struct Point {
16 | unsigned int x;
17 | unsigned int y;
18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {}
19 | };
20 |
21 | struct Size {
22 | unsigned int width;
23 | unsigned int height;
24 | Size(unsigned int width, unsigned int height)
25 | : width(width), height(height) {}
26 | };
27 |
28 | Win32Window();
29 | virtual ~Win32Window();
30 |
31 | // Creates a win32 window with |title| that is positioned and sized using
32 | // |origin| and |size|. New windows are created on the default monitor. Window
33 | // sizes are specified to the OS in physical pixels, hence to ensure a
34 | // consistent size this function will scale the inputted width and height as
35 | // as appropriate for the default monitor. The window is invisible until
36 | // |Show| is called. Returns true if the window was created successfully.
37 | bool Create(const std::wstring& title, const Point& origin, const Size& size);
38 |
39 | // Show the current window. Returns true if the window was successfully shown.
40 | bool Show();
41 |
42 | // Release OS resources associated with window.
43 | void Destroy();
44 |
45 | // Inserts |content| into the window tree.
46 | void SetChildContent(HWND content);
47 |
48 | // Returns the backing Window handle to enable clients to set icon and other
49 | // window properties. Returns nullptr if the window has been destroyed.
50 | HWND GetHandle();
51 |
52 | // If true, closing this window will quit the application.
53 | void SetQuitOnClose(bool quit_on_close);
54 |
55 | // Return a RECT representing the bounds of the current client area.
56 | RECT GetClientArea();
57 |
58 | protected:
59 | // Processes and route salient window messages for mouse handling,
60 | // size change and DPI. Delegates handling of these to member overloads that
61 | // inheriting classes can handle.
62 | virtual LRESULT MessageHandler(HWND window,
63 | UINT const message,
64 | WPARAM const wparam,
65 | LPARAM const lparam) noexcept;
66 |
67 | // Called when CreateAndShow is called, allowing subclass window-related
68 | // setup. Subclasses should return false if setup fails.
69 | virtual bool OnCreate();
70 |
71 | // Called when Destroy is called.
72 | virtual void OnDestroy();
73 |
74 | private:
75 | friend class WindowClassRegistrar;
76 |
77 | // OS callback called by message pump. Handles the WM_NCCREATE message which
78 | // is passed when the non-client area is being created and enables automatic
79 | // non-client DPI scaling so that the non-client area automatically
80 | // responsponds to changes in DPI. All other messages are handled by
81 | // MessageHandler.
82 | static LRESULT CALLBACK WndProc(HWND const window,
83 | UINT const message,
84 | WPARAM const wparam,
85 | LPARAM const lparam) noexcept;
86 |
87 | // Retrieves a class instance pointer for |window|
88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept;
89 |
90 | // Update the window frame's theme to match the system theme.
91 | static void UpdateTheme(HWND const window);
92 |
93 | bool quit_on_close_ = false;
94 |
95 | // window handle for top level window.
96 | HWND window_handle_ = nullptr;
97 |
98 | // window handle for hosted content.
99 | HWND child_content_ = nullptr;
100 | };
101 |
102 | #endif // RUNNER_WIN32_WINDOW_H_
103 |
--------------------------------------------------------------------------------
/lib/presentations/Categories/Men/category_men.dart:
--------------------------------------------------------------------------------
1 | import 'package:fashionstore/core/constants.dart';
2 | import 'package:fashionstore/provider/product_provider.dart';
3 | import 'package:fashionstore/widgets/main_heading_widget.dart';
4 | import 'package:flutter/cupertino.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:provider/provider.dart';
7 | import '../../home/widget/shimmer_widget.dart';
8 | import '../../home/widget/product_tile_widget.dart';
9 |
10 | class CategoryMen extends StatelessWidget {
11 | const CategoryMen({super.key});
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | final productProvider =
16 | Provider.of(context, listen: false);
17 | var size = MediaQuery.of(context).size;
18 | final double itemHeight = (size.height - kToolbarHeight - 24) / 2.5;
19 | final double itemWidth = size.width / 2;
20 | return SafeArea(
21 | child: Scaffold(
22 | body: Padding(
23 | padding: const EdgeInsets.only(left: 10.0, right: 10),
24 | child: Column(
25 | crossAxisAlignment: CrossAxisAlignment.start,
26 | children: [
27 | Row(
28 | children: [
29 | InkWell(
30 | onTap: () {
31 | Navigator.pop(context);
32 | },
33 | child: const CircleAvatar(
34 | radius: 18,
35 | backgroundImage: AssetImage('assets/images/prev.jpg')),
36 | ),
37 | const Spacer(),
38 | Padding(
39 | padding: const EdgeInsets.only(top: 10.0, left: 10),
40 | child: IconButton(
41 | onPressed: () {},
42 | icon: const Icon(
43 | CupertinoIcons.bag,
44 | size: 30,
45 | )),
46 | )
47 | ],
48 | ),
49 | MainHeading(
50 | text: 'Men',
51 | ),
52 | khieght10,
53 | StreamBuilder(
54 | stream: productProvider.getCategoryProducts('Men'),
55 | builder: (context, snapshot) {
56 | if (snapshot.hasData) {
57 | final data = snapshot.data;
58 | return Expanded(
59 | child: GridView.builder(
60 | shrinkWrap: true,
61 | itemCount: data.length,
62 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
63 | crossAxisCount: 2,
64 | childAspectRatio: (itemWidth / itemHeight),
65 | crossAxisSpacing: 16.0,
66 | mainAxisSpacing: 16.0),
67 | itemBuilder: (context, index) {
68 | return ProductTile(
69 | name: data[index].get('name'),
70 | subname: data[index].get('subname'),
71 | rate: data[index].get('price'),
72 | image: data[index].get('image'),
73 | id: data[index].get('id'),
74 | description: data[index].get('description'),
75 | );
76 | },
77 | ),
78 | );
79 | } else if (snapshot.hasError) {
80 | return Text('Error: ${snapshot.error}');
81 | } else if (snapshot.connectionState ==
82 | ConnectionState.waiting) {
83 | return const HomeProductShimmerEffect();
84 | } else {
85 | return const HomeProductShimmerEffect();
86 | }
87 | },
88 | )
89 | ],
90 | ),
91 | ),
92 | ),
93 | );
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/windows/flutter/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # This file controls Flutter-level build steps. It should not be edited.
2 | cmake_minimum_required(VERSION 3.14)
3 |
4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral")
5 |
6 | # Configuration provided via flutter tool.
7 | include(${EPHEMERAL_DIR}/generated_config.cmake)
8 |
9 | # TODO: Move the rest of this into files in ephemeral. See
10 | # https://github.com/flutter/flutter/issues/57146.
11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper")
12 |
13 | # === Flutter Library ===
14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll")
15 |
16 | # Published to parent scope for install step.
17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE)
18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE)
19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE)
20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE)
21 |
22 | list(APPEND FLUTTER_LIBRARY_HEADERS
23 | "flutter_export.h"
24 | "flutter_windows.h"
25 | "flutter_messenger.h"
26 | "flutter_plugin_registrar.h"
27 | "flutter_texture_registrar.h"
28 | )
29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/")
30 | add_library(flutter INTERFACE)
31 | target_include_directories(flutter INTERFACE
32 | "${EPHEMERAL_DIR}"
33 | )
34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib")
35 | add_dependencies(flutter flutter_assemble)
36 |
37 | # === Wrapper ===
38 | list(APPEND CPP_WRAPPER_SOURCES_CORE
39 | "core_implementations.cc"
40 | "standard_codec.cc"
41 | )
42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/")
43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN
44 | "plugin_registrar.cc"
45 | )
46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/")
47 | list(APPEND CPP_WRAPPER_SOURCES_APP
48 | "flutter_engine.cc"
49 | "flutter_view_controller.cc"
50 | )
51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/")
52 |
53 | # Wrapper sources needed for a plugin.
54 | add_library(flutter_wrapper_plugin STATIC
55 | ${CPP_WRAPPER_SOURCES_CORE}
56 | ${CPP_WRAPPER_SOURCES_PLUGIN}
57 | )
58 | apply_standard_settings(flutter_wrapper_plugin)
59 | set_target_properties(flutter_wrapper_plugin PROPERTIES
60 | POSITION_INDEPENDENT_CODE ON)
61 | set_target_properties(flutter_wrapper_plugin PROPERTIES
62 | CXX_VISIBILITY_PRESET hidden)
63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter)
64 | target_include_directories(flutter_wrapper_plugin PUBLIC
65 | "${WRAPPER_ROOT}/include"
66 | )
67 | add_dependencies(flutter_wrapper_plugin flutter_assemble)
68 |
69 | # Wrapper sources needed for the runner.
70 | add_library(flutter_wrapper_app STATIC
71 | ${CPP_WRAPPER_SOURCES_CORE}
72 | ${CPP_WRAPPER_SOURCES_APP}
73 | )
74 | apply_standard_settings(flutter_wrapper_app)
75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter)
76 | target_include_directories(flutter_wrapper_app PUBLIC
77 | "${WRAPPER_ROOT}/include"
78 | )
79 | add_dependencies(flutter_wrapper_app flutter_assemble)
80 |
81 | # === Flutter tool backend ===
82 | # _phony_ is a non-existent file to force this command to run every time,
83 | # since currently there's no way to get a full input/output list from the
84 | # flutter tool.
85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_")
86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE)
87 | add_custom_command(
88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS}
89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN}
90 | ${CPP_WRAPPER_SOURCES_APP}
91 | ${PHONY_OUTPUT}
92 | COMMAND ${CMAKE_COMMAND} -E env
93 | ${FLUTTER_TOOL_ENVIRONMENT}
94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat"
95 | windows-x64 $
96 | VERBATIM
97 | )
98 | add_custom_target(flutter_assemble DEPENDS
99 | "${FLUTTER_LIBRARY}"
100 | ${FLUTTER_LIBRARY_HEADERS}
101 | ${CPP_WRAPPER_SOURCES_CORE}
102 | ${CPP_WRAPPER_SOURCES_PLUGIN}
103 | ${CPP_WRAPPER_SOURCES_APP}
104 | )
105 |
--------------------------------------------------------------------------------
/lib/presentations/Categories/Girls/category_women.dart:
--------------------------------------------------------------------------------
1 | import 'package:fashionstore/provider/product_provider.dart';
2 | import 'package:flutter/cupertino.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:provider/provider.dart';
5 | import '../../../core/constants.dart';
6 | import '../../../widgets/main_heading_widget.dart';
7 | import '../../home/widget/shimmer_widget.dart';
8 | import '../../home/widget/product_tile_widget.dart';
9 |
10 | class CategorGirls extends StatelessWidget {
11 | const CategorGirls({super.key});
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | final productProvider =
16 | Provider.of(context, listen: false);
17 | var size = MediaQuery.of(context).size;
18 | /*24 is for notification bar on Android*/
19 | final double itemHeight = (size.height - kToolbarHeight - 24) / 2.5;
20 | final double itemWidth = size.width / 2;
21 | return SafeArea(
22 | child: Scaffold(
23 | body: Padding(
24 | padding: const EdgeInsets.only(left: 15.0, right: 10),
25 | child: Column(
26 | crossAxisAlignment: CrossAxisAlignment.start,
27 | children: [
28 | Row(
29 | children: [
30 | InkWell(
31 | onTap: () {
32 | Navigator.pop(context);
33 | },
34 | child: const CircleAvatar(
35 | radius: 18,
36 | backgroundImage: AssetImage('assets/images/prev.jpg')),
37 | ),
38 | const Spacer(),
39 | Padding(
40 | padding: const EdgeInsets.only(top: 10.0, left: 10),
41 | child: IconButton(
42 | onPressed: () {},
43 | icon: const Icon(
44 | CupertinoIcons.bag,
45 | size: 30,
46 | )),
47 | )
48 | ],
49 | ),
50 | MainHeading(
51 | text: 'Girls',
52 | ),
53 | khieght10,
54 | StreamBuilder(
55 | stream: productProvider.getCategoryProducts('Girl'),
56 | builder: (context, snapshot) {
57 | if (snapshot.hasData) {
58 | final data = snapshot.data;
59 | return Expanded(
60 | child: GridView.builder(
61 | shrinkWrap: true,
62 | itemCount: data.length,
63 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
64 | crossAxisCount: 2,
65 | childAspectRatio: (itemWidth / itemHeight),
66 | crossAxisSpacing: 16.0,
67 | mainAxisSpacing: 16.0),
68 | itemBuilder: (context, index) {
69 | return ProductTile(
70 | name: data[index].get('name'),
71 | subname: data[index].get('subname'),
72 | rate: data[index].get('price'),
73 | image: data[index].get('image'),
74 | id: data[index].get('id'),
75 | description: data[index].get('description'),
76 | );
77 | },
78 | ),
79 | );
80 | } else if (snapshot.hasError) {
81 | return Text('Error: ${snapshot.error}');
82 | } else if (snapshot.connectionState ==
83 | ConnectionState.waiting) {
84 | return const HomeProductShimmerEffect();
85 | } else {
86 | return const HomeProductShimmerEffect();
87 | }
88 | },
89 | )
90 | ],
91 | ),
92 | ),
93 | ),
94 | );
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/lib/presentations/Categories/Women/category_women.dart:
--------------------------------------------------------------------------------
1 | import 'package:fashionstore/provider/product_provider.dart';
2 | import 'package:flutter/cupertino.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:provider/provider.dart';
5 | import '../../../core/constants.dart';
6 | import '../../../widgets/main_heading_widget.dart';
7 | import '../../home/widget/shimmer_widget.dart';
8 | import '../../home/widget/product_tile_widget.dart';
9 |
10 | class CategoryWomen extends StatelessWidget {
11 | const CategoryWomen({super.key});
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | final productProvider =
16 | Provider.of(context, listen: false);
17 | var size = MediaQuery.of(context).size;
18 | /*24 is for notification bar on Android*/
19 | final double itemHeight = (size.height - kToolbarHeight - 24) / 2.5;
20 | final double itemWidth = size.width / 2;
21 | return SafeArea(
22 | child: Scaffold(
23 | body: Padding(
24 | padding: const EdgeInsets.only(left: 10.0, right: 10),
25 | child: Column(
26 | crossAxisAlignment: CrossAxisAlignment.start,
27 | children: [
28 | Row(
29 | children: [
30 | InkWell(
31 | onTap: () {
32 | Navigator.pop(context);
33 | },
34 | child: const CircleAvatar(
35 | radius: 18,
36 | backgroundImage: AssetImage('assets/images/prev.jpg')),
37 | ),
38 | const Spacer(),
39 | Padding(
40 | padding: const EdgeInsets.only(top: 10.0, left: 10),
41 | child: IconButton(
42 | onPressed: () {},
43 | icon: const Icon(
44 | CupertinoIcons.bag,
45 | size: 30,
46 | )),
47 | )
48 | ],
49 | ),
50 | MainHeading(
51 | text: 'Women',
52 | ),
53 | khieght10,
54 | StreamBuilder(
55 | stream: productProvider.getCategoryProducts('Women'),
56 | builder: (context, snapshot) {
57 | if (snapshot.hasData) {
58 | final data = snapshot.data;
59 | return Expanded(
60 | child: GridView.builder(
61 | shrinkWrap: true,
62 | itemCount: data.length,
63 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
64 | crossAxisCount: 2,
65 | childAspectRatio: (itemWidth / itemHeight),
66 | crossAxisSpacing: 16.0,
67 | mainAxisSpacing: 16.0),
68 | itemBuilder: (context, index) {
69 | return ProductTile(
70 | name: data[index].get('name'),
71 | subname: data[index].get('subname'),
72 | rate: data[index].get('price'),
73 | image: data[index].get('image'),
74 | id: data[index].get('id'),
75 | description: data[index].get('description'),
76 | );
77 | },
78 | ),
79 | );
80 | } else if (snapshot.hasError) {
81 | return Text('Error: ${snapshot.error}');
82 | } else if (snapshot.connectionState ==
83 | ConnectionState.waiting) {
84 | return const HomeProductShimmerEffect();
85 | } else {
86 | return const HomeProductShimmerEffect();
87 | }
88 | },
89 | )
90 | ],
91 | ),
92 | ),
93 | ),
94 | );
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/lib/presentations/Categories/Boys/category_boys.dart:
--------------------------------------------------------------------------------
1 | import 'package:fashionstore/provider/product_provider.dart';
2 | import 'package:fashionstore/widgets/main_heading_widget.dart';
3 | import 'package:flutter/cupertino.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:provider/provider.dart';
6 | import '../../../core/constants.dart';
7 | import '../../home/widget/shimmer_widget.dart';
8 | import '../../home/widget/product_tile_widget.dart';
9 |
10 | class CategoryBoys extends StatelessWidget {
11 | const CategoryBoys({super.key});
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | final productProvider =
16 | Provider.of(context, listen: false);
17 | var size = MediaQuery.of(context).size;
18 | /*24 is for notification bar on Android*/
19 | final double itemHeight = (size.height - kToolbarHeight - 24) / 2.5;
20 | final double itemWidth = size.width / 2;
21 | return SafeArea(
22 | child: Scaffold(
23 | body: Padding(
24 | padding: const EdgeInsets.only(left: 15.0, right: 10),
25 | child: Column(
26 | crossAxisAlignment: CrossAxisAlignment.start,
27 | children: [
28 | Row(
29 | children: [
30 | InkWell(
31 | onTap: () {
32 | Navigator.pop(context);
33 | },
34 | child: const CircleAvatar(
35 | radius: 18,
36 | backgroundImage: AssetImage('assets/images/prev.jpg')),
37 | ),
38 | const Spacer(),
39 | Padding(
40 | padding: const EdgeInsets.only(top: 10.0, left: 10),
41 | child: IconButton(
42 | onPressed: () {},
43 | icon: const Icon(
44 | CupertinoIcons.bag,
45 | size: 30,
46 | )),
47 | )
48 | ],
49 | ),
50 | const MainHeading(
51 | text: 'Boys',
52 | ),
53 | khieght10,
54 | StreamBuilder(
55 | stream: productProvider.getCategoryProducts('Boy'),
56 | builder: (context, snapshot) {
57 | if (snapshot.hasData) {
58 | final data = snapshot.data;
59 | return Expanded(
60 | child: GridView.builder(
61 | shrinkWrap: true,
62 | itemCount: data.length,
63 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
64 | crossAxisCount: 2,
65 | childAspectRatio: (itemWidth / itemHeight),
66 | crossAxisSpacing: 16.0,
67 | mainAxisSpacing: 14.0),
68 | itemBuilder: (context, index) {
69 | return ProductTile(
70 | name: data[index].get('name'),
71 | subname: data[index].get('subname'),
72 | rate: data[index].get('price'),
73 | image: data[index].get('image'),
74 | id: data[index].get('id'),
75 | description: data[index].get('description'),
76 | );
77 | },
78 | ),
79 | );
80 | } else if (snapshot.hasError) {
81 | return Text('Error: ${snapshot.error}');
82 | } else if (snapshot.connectionState ==
83 | ConnectionState.waiting) {
84 | return const HomeProductShimmerEffect();
85 | } else {
86 | return const HomeProductShimmerEffect();
87 | }
88 | },
89 | )
90 | ],
91 | ),
92 | ),
93 | ),
94 | );
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/lib/presentations/products/all_products.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:fashionstore/widgets/main_heading_widget.dart';
3 | import 'package:flutter/cupertino.dart';
4 | import 'package:flutter/material.dart';
5 | import '../../../core/constants.dart';
6 | import '../home/widget/shimmer_widget.dart';
7 | import '../home/widget/product_tile_widget.dart';
8 |
9 | class AllProducts extends StatelessWidget {
10 | const AllProducts({super.key});
11 | Stream getCategoryProducts() async* {
12 | final QuerySnapshot querySnapshot =
13 | await FirebaseFirestore.instance.collection('products').get();
14 | final List docs = querySnapshot.docs.toList();
15 | yield docs;
16 | }
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | var size = MediaQuery.of(context).size;
21 | final double itemHeight = (size.height - kToolbarHeight - 24) / 2.5;
22 | final double itemWidth = size.width / 2;
23 | return SafeArea(
24 | child: Scaffold(
25 | body: Padding(
26 | padding: const EdgeInsets.only(left: 10.0, right: 10),
27 | child: Column(
28 | crossAxisAlignment: CrossAxisAlignment.start,
29 | children: [
30 | Row(
31 | children: [
32 | IconButton(
33 | onPressed: () {
34 | Navigator.pop(context);
35 | },
36 | icon: const Icon(
37 | CupertinoIcons.arrow_left_circle_fill,
38 | size: 40,
39 | )),
40 | const Spacer(),
41 | Padding(
42 | padding: const EdgeInsets.only(top: 10.0, left: 10),
43 | child: IconButton(
44 | onPressed: () {},
45 | icon: const Icon(
46 | CupertinoIcons.bag,
47 | size: 30,
48 | )),
49 | )
50 | ],
51 | ),
52 | const MainHeading(
53 | text: 'All Products',
54 | ),
55 | khieght10,
56 | StreamBuilder(
57 | stream: getCategoryProducts(),
58 | builder: (context, snapshot) {
59 | if (snapshot.hasData) {
60 | final data = snapshot.data;
61 | return Expanded(
62 | child: GridView.builder(
63 | shrinkWrap: true,
64 | itemCount: data.length,
65 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
66 | crossAxisCount: 2,
67 | childAspectRatio: (itemWidth / itemHeight),
68 | crossAxisSpacing: 16.0,
69 | mainAxisSpacing: 16.0),
70 | itemBuilder: (context, index) {
71 | return ProductTile(
72 | name: data[index].get('name'),
73 | subname: data[index].get('subname'),
74 | rate: data[index].get('price'),
75 | image: data[index].get('image'),
76 | id: data[index].get('id'),
77 | description: data[index].get('description'),
78 | );
79 | },
80 | ),
81 | );
82 | } else if (snapshot.hasError) {
83 | return Text('Error: ${snapshot.error}');
84 | } else if (snapshot.connectionState ==
85 | ConnectionState.waiting) {
86 | return const HomeProductShimmerEffect();
87 | } else {
88 | return const HomeProductShimmerEffect();
89 | }
90 | },
91 | )
92 | ],
93 | ),
94 | ),
95 | ),
96 | );
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/linux/my_application.cc:
--------------------------------------------------------------------------------
1 | #include "my_application.h"
2 |
3 | #include
4 | #ifdef GDK_WINDOWING_X11
5 | #include
6 | #endif
7 |
8 | #include "flutter/generated_plugin_registrant.h"
9 |
10 | struct _MyApplication {
11 | GtkApplication parent_instance;
12 | char** dart_entrypoint_arguments;
13 | };
14 |
15 | G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION)
16 |
17 | // Implements GApplication::activate.
18 | static void my_application_activate(GApplication* application) {
19 | MyApplication* self = MY_APPLICATION(application);
20 | GtkWindow* window =
21 | GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application)));
22 |
23 | // Use a header bar when running in GNOME as this is the common style used
24 | // by applications and is the setup most users will be using (e.g. Ubuntu
25 | // desktop).
26 | // If running on X and not using GNOME then just use a traditional title bar
27 | // in case the window manager does more exotic layout, e.g. tiling.
28 | // If running on Wayland assume the header bar will work (may need changing
29 | // if future cases occur).
30 | gboolean use_header_bar = TRUE;
31 | #ifdef GDK_WINDOWING_X11
32 | GdkScreen* screen = gtk_window_get_screen(window);
33 | if (GDK_IS_X11_SCREEN(screen)) {
34 | const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen);
35 | if (g_strcmp0(wm_name, "GNOME Shell") != 0) {
36 | use_header_bar = FALSE;
37 | }
38 | }
39 | #endif
40 | if (use_header_bar) {
41 | GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new());
42 | gtk_widget_show(GTK_WIDGET(header_bar));
43 | gtk_header_bar_set_title(header_bar, "fashionstore");
44 | gtk_header_bar_set_show_close_button(header_bar, TRUE);
45 | gtk_window_set_titlebar(window, GTK_WIDGET(header_bar));
46 | } else {
47 | gtk_window_set_title(window, "fashionstore");
48 | }
49 |
50 | gtk_window_set_default_size(window, 1280, 720);
51 | gtk_widget_show(GTK_WIDGET(window));
52 |
53 | g_autoptr(FlDartProject) project = fl_dart_project_new();
54 | fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments);
55 |
56 | FlView* view = fl_view_new(project);
57 | gtk_widget_show(GTK_WIDGET(view));
58 | gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view));
59 |
60 | fl_register_plugins(FL_PLUGIN_REGISTRY(view));
61 |
62 | gtk_widget_grab_focus(GTK_WIDGET(view));
63 | }
64 |
65 | // Implements GApplication::local_command_line.
66 | static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) {
67 | MyApplication* self = MY_APPLICATION(application);
68 | // Strip out the first argument as it is the binary name.
69 | self->dart_entrypoint_arguments = g_strdupv(*arguments + 1);
70 |
71 | g_autoptr(GError) error = nullptr;
72 | if (!g_application_register(application, nullptr, &error)) {
73 | g_warning("Failed to register: %s", error->message);
74 | *exit_status = 1;
75 | return TRUE;
76 | }
77 |
78 | g_application_activate(application);
79 | *exit_status = 0;
80 |
81 | return TRUE;
82 | }
83 |
84 | // Implements GObject::dispose.
85 | static void my_application_dispose(GObject* object) {
86 | MyApplication* self = MY_APPLICATION(object);
87 | g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev);
88 | G_OBJECT_CLASS(my_application_parent_class)->dispose(object);
89 | }
90 |
91 | static void my_application_class_init(MyApplicationClass* klass) {
92 | G_APPLICATION_CLASS(klass)->activate = my_application_activate;
93 | G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line;
94 | G_OBJECT_CLASS(klass)->dispose = my_application_dispose;
95 | }
96 |
97 | static void my_application_init(MyApplication* self) {}
98 |
99 | MyApplication* my_application_new() {
100 | return MY_APPLICATION(g_object_new(my_application_get_type(),
101 | "application-id", APPLICATION_ID,
102 | "flags", G_APPLICATION_NON_UNIQUE,
103 | nullptr));
104 | }
105 |
--------------------------------------------------------------------------------
/lib/presentations/cart/widgets/count_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:cloud_firestore/cloud_firestore.dart';
2 | import 'package:fashionstore/provider/cart_provider.dart';
3 | import 'package:flutter/cupertino.dart';
4 | import 'package:provider/provider.dart';
5 |
6 | class CountWidget extends StatefulWidget {
7 | final String cartId;
8 | final int initialQuantity;
9 |
10 | const CountWidget({
11 | Key? key,
12 | required this.cartId,
13 | required this.initialQuantity,
14 | }) : super(key: key);
15 |
16 | @override
17 | State createState() => _CountWidgetState();
18 | }
19 |
20 | class _CountWidgetState extends State {
21 | late int quantity;
22 | @override
23 | void initState() {
24 | super.initState();
25 | quantity = widget.initialQuantity;
26 | }
27 |
28 | void reduceCount() {
29 | if (quantity > 1) {
30 | setState(() {
31 | quantity--;
32 | });
33 |
34 | // Update the quantity in the cart using the cartId
35 | // ...
36 | updateQuantity();
37 |
38 | final cartProvider = Provider.of(context, listen: false);
39 | // Calculate the price change based on the item's price and quantity
40 | int priceChange = getPriceChange();
41 |
42 | // Update the total price in the cart provider
43 | cartProvider.updateTotalPrice(cartProvider.totalPrice - priceChange);
44 | }
45 | }
46 |
47 | void addCount() {
48 | setState(() {
49 | quantity++;
50 | });
51 |
52 | // Update the quantity in the cart using the cartId
53 | // ...
54 | updateQuantity();
55 |
56 | final cartProvider = Provider.of(context, listen: false);
57 | // Calculate the price change based on the item's price and quantity
58 | int priceChange = getPriceChange();
59 |
60 | // Update the total price in the cart provider
61 | cartProvider.updateTotalPrice(cartProvider.totalPrice + priceChange);
62 | }
63 |
64 | int getPriceChange() {
65 | // Retrieve the item's price from the database or other source
66 | int itemPrice = 0; // Replace with the actual item's price
67 |
68 | // Calculate the price change based on the item's price and quantity
69 | int priceChange = (quantity - widget.initialQuantity) * itemPrice;
70 |
71 | return priceChange;
72 | }
73 |
74 | void updateQuantity() {
75 | final quantityRef =
76 | FirebaseFirestore.instance.collection('cart').doc(widget.cartId);
77 | quantityRef.update({'quantity': quantity});
78 | }
79 |
80 | @override
81 | Widget build(BuildContext context) {
82 | // final ValueNotifier quantity =
83 | // ValueNotifier(widget.initialQuantity);
84 | // void updateQuantity() {
85 | // final quantityRef =
86 | // FirebaseFirestore.instance.collection('cart').doc(widget.cartId);
87 | // quantityRef.update({'quantity': quantity.value});
88 | // }
89 |
90 | // void reduceCount() {
91 | // if (quantity.value > 1) {
92 | // quantity.value--;
93 | // updateQuantity();
94 | // }
95 | // }
96 |
97 | // void addCount() {
98 | // quantity.value++;
99 | // updateQuantity();
100 | // }
101 |
102 | final size = MediaQuery.of(context).size;
103 |
104 | return SizedBox(
105 | width: size.width * 0.2,
106 | child: Row(
107 | mainAxisSize: MainAxisSize.max,
108 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
109 | children: [
110 | IgnorePointer(
111 | ignoring: quantity <= 1,
112 | child: GestureDetector(
113 | onTap: reduceCount,
114 | child: const Icon(
115 | CupertinoIcons.minus,
116 | size: 15,
117 | ),
118 | ),
119 | ),
120 | Text(
121 | quantity.toString(),
122 | style: const TextStyle(fontSize: 20),
123 | ),
124 | GestureDetector(
125 | onTap: addCount,
126 | child: const Icon(
127 | CupertinoIcons.add,
128 | size: 15,
129 | ),
130 | ),
131 | ],
132 | ),
133 | );
134 | }
135 | }
136 |
--------------------------------------------------------------------------------
/windows/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Project-level configuration.
2 | cmake_minimum_required(VERSION 3.14)
3 | project(fashionstore LANGUAGES CXX)
4 |
5 | # The name of the executable created for the application. Change this to change
6 | # the on-disk name of your application.
7 | set(BINARY_NAME "fashionstore")
8 |
9 | # Explicitly opt in to modern CMake behaviors to avoid warnings with recent
10 | # versions of CMake.
11 | cmake_policy(SET CMP0063 NEW)
12 |
13 | # Define build configuration option.
14 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
15 | if(IS_MULTICONFIG)
16 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
17 | CACHE STRING "" FORCE)
18 | else()
19 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
20 | set(CMAKE_BUILD_TYPE "Debug" CACHE
21 | STRING "Flutter build mode" FORCE)
22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
23 | "Debug" "Profile" "Release")
24 | endif()
25 | endif()
26 | # Define settings for the Profile build mode.
27 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
28 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
29 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
30 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
31 |
32 | # Use Unicode for all projects.
33 | add_definitions(-DUNICODE -D_UNICODE)
34 |
35 | # Compilation settings that should be applied to most targets.
36 | #
37 | # Be cautious about adding new options here, as plugins use this function by
38 | # default. In most cases, you should add new options to specific targets instead
39 | # of modifying this function.
40 | function(APPLY_STANDARD_SETTINGS TARGET)
41 | target_compile_features(${TARGET} PUBLIC cxx_std_17)
42 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
43 | target_compile_options(${TARGET} PRIVATE /EHsc)
44 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
45 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>")
46 | endfunction()
47 |
48 | # Flutter library and tool build rules.
49 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
50 | add_subdirectory(${FLUTTER_MANAGED_DIR})
51 |
52 | # Application build; see runner/CMakeLists.txt.
53 | add_subdirectory("runner")
54 |
55 | # Generated plugin build rules, which manage building the plugins and adding
56 | # them to the application.
57 | include(flutter/generated_plugins.cmake)
58 |
59 |
60 | # === Installation ===
61 | # Support files are copied into place next to the executable, so that it can
62 | # run in place. This is done instead of making a separate bundle (as on Linux)
63 | # so that building and running from within Visual Studio will work.
64 | set(BUILD_BUNDLE_DIR "$")
65 | # Make the "install" step default, as it's required to run.
66 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
67 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
68 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
69 | endif()
70 |
71 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
72 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
73 |
74 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
75 | COMPONENT Runtime)
76 |
77 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
78 | COMPONENT Runtime)
79 |
80 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
81 | COMPONENT Runtime)
82 |
83 | if(PLUGIN_BUNDLED_LIBRARIES)
84 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
85 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
86 | COMPONENT Runtime)
87 | endif()
88 |
89 | # Fully re-copy the assets directory on each build to avoid having stale files
90 | # from a previous install.
91 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
92 | install(CODE "
93 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
94 | " COMPONENT Runtime)
95 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
96 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
97 |
98 | # Install the AOT library on non-Debug builds only.
99 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
100 | CONFIGURATIONS Profile;Release
101 | COMPONENT Runtime)
102 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: fashionstore
2 | description: A new Flutter project.
3 | # The following line prevents the package from being accidentally published to
4 | # pub.dev using `flutter pub publish`. This is preferred for private packages.
5 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
6 |
7 | # The following defines the version and build number for your application.
8 | # A version number is three numbers separated by dots, like 1.2.43
9 | # followed by an optional build number separated by a +.
10 | # Both the version and the builder number may be overridden in flutter
11 | # build by specifying --build-name and --build-number, respectively.
12 | # In Android, build-name is used as versionName while build-number used as versionCode.
13 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
14 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
15 | # Read more about iOS versioning at
16 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
17 | # In Windows, build-name is used as the major, minor, and patch parts
18 | # of the product and file versions while build-number is used as the build suffix.
19 | version: 1.0.0+2
20 |
21 | environment:
22 | sdk: '>=2.19.6 <3.0.0'
23 |
24 | # Dependencies specify other packages that your package needs in order to work.
25 | # To automatically upgrade your package dependencies to the latest versions
26 | # consider running `flutter pub upgrade --major-versions`. Alternatively,
27 | # dependencies can be manually updated by changing the version numbers below to
28 | # the latest version available on pub.dev. To see which dependencies have newer
29 | # versions available, run `flutter pub outdated`.
30 | dependencies:
31 | flutter:
32 | sdk: flutter
33 |
34 |
35 | # The following adds the Cupertino Icons font to your application.
36 | # Use with the CupertinoIcons class for iOS style icons.
37 | cupertino_icons: ^1.0.2
38 | google_fonts: ^4.0.4
39 | firebase_core: ^2.13.0
40 | firebase_auth: ^4.6.1
41 | google_sign_in: ^6.1.0
42 | google_nav_bar: ^5.0.6
43 | firebase_storage: ^11.2.1
44 | cloud_firestore: ^4.7.1
45 | shimmer_animation: ^2.1.0+1
46 | shared_preferences: ^2.1.2
47 | flutter_slidable: ^3.0.0
48 | intl: ^0.18.1
49 | page_transition: ^2.0.9
50 | flutter_markdown: ^0.6.15+1
51 | checkmark: ^0.0.2+1
52 | animated_text_kit: ^4.2.2
53 | razorpay_flutter: ^1.3.5
54 | fluttertoast: ^8.2.2
55 | image_picker: ^1.0.0
56 | cached_network_image: 3.3.0
57 | provider: ^6.0.5
58 | carousel_slider: ^4.2.1
59 | connectivity_plus: ^4.0.1
60 | flutter_launcher_icons: ^0.13.1
61 |
62 | dev_dependencies:
63 | flutter_test:
64 | sdk: flutter
65 | flutter_icons:
66 | android: true
67 | ios: true
68 | image_path: "assets/images/logo1.jpg"
69 |
70 | flutter_lints: ^2.0.0
71 |
72 |
73 | flutter:
74 |
75 | # The following line ensures that the Material Icons font is
76 | # included with your application, so that you can use the icons in
77 | # the material Icons class.
78 | uses-material-design: true
79 |
80 | # To add assets to your application, add an assets section, like this:
81 | assets:
82 | - assets/images/
83 | - assets/
84 |
85 | # An image asset can refer to one or more resolution-specific "variants", see
86 | # https://flutter.dev/assets-and-images/#resolution-aware
87 |
88 | # For details regarding adding assets from package dependencies, see
89 | # https://flutter.dev/assets-and-images/#from-packages
90 |
91 | # To add custom fonts to your application, add a fonts section here,
92 | # in this "flutter" section. Each entry in this list should have a
93 | # "family" key with the font family name, and a "fonts" key with a
94 | # list giving the asset and other descriptors for the font. For
95 | # example:
96 | # fonts:
97 | # - family: Schyler
98 | # fonts:
99 | # - asset: fonts/Schyler-Regular.ttf
100 | # - asset: fonts/Schyler-Italic.ttf
101 | # style: italic
102 | # - family: Trajan Pro
103 | # fonts:
104 | # - asset: fonts/TrajanPro.ttf
105 | # - asset: fonts/TrajanPro_Bold.ttf
106 | # weight: 700
107 | #
108 | # For details regarding fonts from package dependencies,
109 | # see https://flutter.dev/custom-fonts/#from-packages
110 |
--------------------------------------------------------------------------------