├── .github └── FUNDING.yml ├── .gitignore ├── .metadata ├── LICENSE ├── README.md ├── analysis_options.yaml ├── android ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── flutter_ecommerce_template │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── launcher_icon.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── Group 444.png ├── Hamburger-menu.png ├── Search.png ├── background.jpg ├── background.png ├── bag_1.png ├── bag_10.png ├── bag_2.png ├── bag_3.png ├── bag_4.png ├── bag_5.png ├── bag_6.png ├── bag_7.png ├── bag_8.png ├── bag_9.png ├── bottom_yellow.png ├── box.png ├── cap_1.png ├── cap_10.png ├── cap_2.png ├── cap_3.png ├── cap_4.png ├── cap_5.png ├── cap_6.png ├── cap_7.png ├── cap_8.png ├── cap_9.png ├── firstScreen.png ├── headphone_10.png ├── headphone_11.png ├── headphone_12.png ├── headphone_13.png ├── headphone_14.png ├── headphone_5.png ├── headphone_6.png ├── headphone_7.png ├── headphone_8.png ├── headphone_9.png ├── headphones.png ├── headphones_2.png ├── headphones_3.png ├── headphones_4.png ├── home.png ├── icons │ ├── 10 usd.png │ ├── 5 usd.png │ ├── Logos.png │ ├── QR_code.png │ ├── about_us.png │ ├── address_home.png │ ├── address_work.png │ ├── card.png │ ├── cart_icon.svg │ ├── category_icon.png │ ├── category_icon.svg │ ├── change_pass.png │ ├── comment.png │ ├── contact_us.png │ ├── country.png │ ├── cut_qr.png │ ├── denied_wallet.png │ ├── faq.png │ ├── home.png │ ├── home_icon.svg │ ├── language.png │ ├── legal.png │ ├── list.png │ ├── notifications.png │ ├── package.png │ ├── profile.png │ ├── profile_icon.png │ ├── profile_icon.svg │ ├── reload_icon.png │ ├── reload_icon.svg │ ├── search_icon.svg │ ├── settings.png │ ├── settings_icon.png │ ├── settings_icon.svg │ ├── shopeLogo.png │ ├── sign_out.png │ ├── support.png │ ├── timer.png │ ├── truck.png │ └── wallet.png ├── jeans_1.png ├── jeans_10.png ├── jeans_2.png ├── jeans_3.png ├── jeans_4.png ├── jeans_5.png ├── jeans_6.png ├── jeans_7.png ├── jeans_8.png ├── jeans_9.png ├── list.png ├── logo.png ├── profile.png ├── promotional │ ├── Mockup Intro.png │ ├── Mockup Screens.png │ ├── google-play-badge.png │ └── youtube.png ├── red_clear.png ├── ring_1.png ├── ring_10.png ├── ring_2.png ├── ring_3.png ├── ring_4.png ├── ring_5.png ├── ring_6.png ├── ring_7.png ├── ring_8.png ├── ring_9.png ├── secondScreen.png ├── shoeman_1.png ├── shoeman_10.png ├── shoeman_2.png ├── shoeman_3.png ├── shoeman_4.png ├── shoeman_5.png ├── shoeman_6.png ├── shoeman_7.png ├── shoeman_8.png ├── shoeman_9.png ├── thirdScreen.png ├── womanshoe_1.png ├── womanshoe_10.png ├── womanshoe_2.png ├── womanshoe_3.png ├── womanshoe_4.png ├── womanshoe_5.png ├── womanshoe_6.png ├── womanshoe_7.png ├── womanshoe_8.png └── womanshoe_9.png ├── fonts ├── Montserrat-Regular.ttf └── NunitoSans-Regular.ttf ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ ├── Flutter.podspec │ ├── Release.xcconfig │ └── flutter_export_environment.sh ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── 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-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── api_service.dart ├── app_properties.dart ├── custom_background.dart ├── main.dart ├── models │ ├── category.dart │ ├── coordinates.dart │ ├── coordinates.g.dart │ ├── dod.dart │ ├── dod.g.dart │ ├── id.dart │ ├── id.g.dart │ ├── location.dart │ ├── location.g.dart │ ├── loging.dart │ ├── loging.g.dart │ ├── name.dart │ ├── name.g.dart │ ├── picture.dart │ ├── picture.g.dart │ ├── product.dart │ ├── registered.dart │ ├── registered.g.dart │ ├── timezone.dart │ ├── timezone.g.dart │ ├── user.dart │ └── user.g.dart └── screens │ ├── address │ ├── add_address_page.dart │ └── address_form.dart │ ├── auth │ ├── confirm_otp_page.dart │ ├── forgot_password_page.dart │ ├── register_page.dart │ └── welcome_back_page.dart │ ├── category │ ├── category_list_page.dart │ └── components │ │ └── staggered_category_card.dart │ ├── faq_page.dart │ ├── intro_page.dart │ ├── main │ ├── components │ │ ├── category_card.dart │ │ ├── custom_bottom_bar.dart │ │ ├── product_list.dart │ │ ├── recommended_list.dart │ │ └── tab_view.dart │ └── main_page.dart │ ├── notifications_page.dart │ ├── payment │ ├── payment_page.dart │ ├── promo_item.dart │ └── unpaid_page.dart │ ├── payment_history_page.dart │ ├── product │ ├── components │ │ ├── color_list.dart │ │ ├── more_products.dart │ │ ├── product_card.dart │ │ ├── product_display.dart │ │ ├── product_options.dart │ │ ├── rating_bottomSheet.dart │ │ ├── shop_bottomSheet.dart │ │ └── shop_product.dart │ ├── product_page.dart │ └── view_product_page.dart │ ├── profile_page.dart │ ├── rating │ ├── rating_dialog.dart │ └── rating_page.dart │ ├── request_money │ ├── receive_page.dart │ ├── request_amount_page.dart │ └── request_page.dart │ ├── search_page.dart │ ├── select_card_page.dart │ ├── send_money │ ├── quick_send_amount_page.dart │ └── send_page.dart │ ├── settings │ ├── change_country.dart │ ├── change_language_page.dart │ ├── change_password_page.dart │ ├── legal_about_page.dart │ ├── notifications_settings_page.dart │ └── settings_page.dart │ ├── shop │ ├── check_out_page.dart │ └── components │ │ ├── credit_card.dart │ │ └── shop_item_list.dart │ ├── splash_page.dart │ ├── tracking_page.dart │ └── wallet │ └── wallet_page.dart ├── linux ├── .gitignore ├── CMakeLists.txt ├── flutter │ ├── CMakeLists.txt │ ├── generated_plugin_registrant.cc │ ├── generated_plugin_registrant.h │ └── generated_plugins.cmake ├── main.cc ├── my_application.cc └── my_application.h ├── macos ├── .gitignore ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── 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 │ ├── Base.lproj │ └── MainMenu.xib │ ├── Configs │ ├── AppInfo.xcconfig │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── Warnings.xcconfig │ ├── DebugProfile.entitlements │ ├── Info.plist │ ├── MainFlutterWindow.swift │ └── Release.entitlements ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ ├── Icon-512.png │ ├── Icon-maskable-192.png │ └── Icon-maskable-512.png ├── index.html └── manifest.json └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources └── app_icon.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | custom: 'https://www.buymeacoffee.com/SaNhE76x9' 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # Visual Studio Code related 19 | .vscode/ 20 | 21 | # Flutter/Dart/Pub related 22 | **/doc/api/ 23 | .dart_tool/ 24 | .flutter-plugins 25 | .packages 26 | .pub-cache/ 27 | .pub/ 28 | /build/ 29 | 30 | # Android related 31 | **/android/**/gradle-wrapper.jar 32 | **/android/.gradle 33 | **/android/captures/ 34 | **/android/gradlew 35 | **/android/gradlew.bat 36 | **/android/local.properties 37 | **/android/**/GeneratedPluginRegistrant.java 38 | 39 | # iOS/XCode related 40 | **/ios/**/*.mode1v3 41 | **/ios/**/*.mode2v3 42 | **/ios/**/*.moved-aside 43 | **/ios/**/*.pbxuser 44 | **/ios/**/*.perspectivev3 45 | **/ios/**/*sync/ 46 | **/ios/**/.sconsign.dblite 47 | **/ios/**/.tags* 48 | **/ios/**/.vagrant/ 49 | **/ios/**/DerivedData/ 50 | **/ios/**/Icon? 51 | **/ios/**/Pods/ 52 | **/ios/**/.symlinks/ 53 | **/ios/**/profile 54 | **/ios/**/xcuserdata 55 | **/ios/.generated/ 56 | **/ios/Flutter/App.framework 57 | **/ios/Flutter/Flutter.framework 58 | **/ios/Flutter/Generated.xcconfig 59 | **/ios/Flutter/app.flx 60 | **/ios/Flutter/app.zip 61 | **/ios/Flutter/flutter_assets/ 62 | **/ios/ServiceDefinitions.json 63 | **/ios/Runner/GeneratedPluginRegistrant.* 64 | 65 | # Exceptions to above rules. 66 | !**/ios/**/default.mode1v3 67 | !**/ios/**/default.mode2v3 68 | !**/ios/**/default.pbxuser 69 | !**/ios/**/default.perspectivev3 70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 71 | -------------------------------------------------------------------------------- /.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: b06b8b2710955028a6b562f5aa6fe62941d6febf 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: b06b8b2710955028a6b562f5aa6fe62941d6febf 17 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 18 | - platform: android 19 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 20 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 21 | - platform: ios 22 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 23 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 24 | - platform: linux 25 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 26 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 27 | - platform: macos 28 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 29 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 30 | - platform: web 31 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 32 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 33 | - platform: windows 34 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 35 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf 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 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Roberto Juarez 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | Buy Me A Coffee 3 |

4 | 5 | # Shope - Free Flutter eCommerce Template ![Twitter URL](https://img.shields.io/twitter/url?style=social&url=https%3A%2F%2Ftwitter.com%2Froberto_devs) [![Open Source Love](https://badges.frapsoft.com/os/v2/open-source.svg?v=103)](https://github.com/robertodevs/flutter_ecommerce_template) 6 | 7 | The “Shope” e-Commerce UI Kit has the goal to help you to save time with the frontend development. You can use this template to build your apps for Android and iOS in Flutter. The UI Kit includes all resources you need to reuse the components, it includes 38 screens, assets, icons, and fonts. 8 | 9 | Flutter is Google’s portable UI toolkit for building beautiful, natively-compiled applications for mobile, web, and desktop from a single codebase. 10 | 11 |
  1. Minimalist Design
  2. Clean and Structured code
  3. Reusable Components
12 | 13 | 14 | mockup-intro 15 | 16 | mockup-screens 17 | 18 | ## Watch the video 19 | youtube-video 20 | 21 | ## Download the Android APK 22 | youtube-video 23 | 24 | ## Support me 25 | If this is template is useful for you and you want to support me [buy me a coffe!](https://www.buymeacoffee.com/SaNhE76x9). This will give me motivation to keep doing more content like this. 26 | 27 | Do you want to add more features? [Reach me out](https://lnk.bio/9dQ4) -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.example.flutter_ecommerce_template" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 50 | minSdkVersion flutter.minSdkVersion 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | } 55 | 56 | buildTypes { 57 | release { 58 | // TODO: Add your own signing config for the release build. 59 | // Signing with the debug keys for now, so `flutter run --release` works. 60 | signingConfig signingConfigs.debug 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 71 | } 72 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/flutter_ecommerce_template/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.flutter_ecommerce_template 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/android/app/src/main/res/mipmap-hdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/android/app/src/main/res/mipmap-mdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/android/app/src/main/res/mipmap-xhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/android/app/src/main/res/mipmap-xxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/android/app/src/main/res/mipmap-xxxhdpi/launcher_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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.android.tools.build:gradle:7.2.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /assets/Group 444.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/Group 444.png -------------------------------------------------------------------------------- /assets/Hamburger-menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/Hamburger-menu.png -------------------------------------------------------------------------------- /assets/Search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/Search.png -------------------------------------------------------------------------------- /assets/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/background.jpg -------------------------------------------------------------------------------- /assets/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/background.png -------------------------------------------------------------------------------- /assets/bag_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/bag_1.png -------------------------------------------------------------------------------- /assets/bag_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/bag_10.png -------------------------------------------------------------------------------- /assets/bag_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/bag_2.png -------------------------------------------------------------------------------- /assets/bag_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/bag_3.png -------------------------------------------------------------------------------- /assets/bag_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/bag_4.png -------------------------------------------------------------------------------- /assets/bag_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/bag_5.png -------------------------------------------------------------------------------- /assets/bag_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/bag_6.png -------------------------------------------------------------------------------- /assets/bag_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/bag_7.png -------------------------------------------------------------------------------- /assets/bag_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/bag_8.png -------------------------------------------------------------------------------- /assets/bag_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/bag_9.png -------------------------------------------------------------------------------- /assets/bottom_yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/bottom_yellow.png -------------------------------------------------------------------------------- /assets/box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/box.png -------------------------------------------------------------------------------- /assets/cap_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/cap_1.png -------------------------------------------------------------------------------- /assets/cap_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/cap_10.png -------------------------------------------------------------------------------- /assets/cap_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/cap_2.png -------------------------------------------------------------------------------- /assets/cap_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/cap_3.png -------------------------------------------------------------------------------- /assets/cap_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/cap_4.png -------------------------------------------------------------------------------- /assets/cap_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/cap_5.png -------------------------------------------------------------------------------- /assets/cap_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/cap_6.png -------------------------------------------------------------------------------- /assets/cap_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/cap_7.png -------------------------------------------------------------------------------- /assets/cap_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/cap_8.png -------------------------------------------------------------------------------- /assets/cap_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/cap_9.png -------------------------------------------------------------------------------- /assets/firstScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/firstScreen.png -------------------------------------------------------------------------------- /assets/headphone_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphone_10.png -------------------------------------------------------------------------------- /assets/headphone_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphone_11.png -------------------------------------------------------------------------------- /assets/headphone_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphone_12.png -------------------------------------------------------------------------------- /assets/headphone_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphone_13.png -------------------------------------------------------------------------------- /assets/headphone_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphone_14.png -------------------------------------------------------------------------------- /assets/headphone_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphone_5.png -------------------------------------------------------------------------------- /assets/headphone_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphone_6.png -------------------------------------------------------------------------------- /assets/headphone_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphone_7.png -------------------------------------------------------------------------------- /assets/headphone_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphone_8.png -------------------------------------------------------------------------------- /assets/headphone_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphone_9.png -------------------------------------------------------------------------------- /assets/headphones.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphones.png -------------------------------------------------------------------------------- /assets/headphones_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphones_2.png -------------------------------------------------------------------------------- /assets/headphones_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphones_3.png -------------------------------------------------------------------------------- /assets/headphones_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/headphones_4.png -------------------------------------------------------------------------------- /assets/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/home.png -------------------------------------------------------------------------------- /assets/icons/10 usd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/10 usd.png -------------------------------------------------------------------------------- /assets/icons/5 usd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/5 usd.png -------------------------------------------------------------------------------- /assets/icons/Logos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/Logos.png -------------------------------------------------------------------------------- /assets/icons/QR_code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/QR_code.png -------------------------------------------------------------------------------- /assets/icons/about_us.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/about_us.png -------------------------------------------------------------------------------- /assets/icons/address_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/address_home.png -------------------------------------------------------------------------------- /assets/icons/address_work.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/address_work.png -------------------------------------------------------------------------------- /assets/icons/card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/card.png -------------------------------------------------------------------------------- /assets/icons/cart_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /assets/icons/category_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/category_icon.png -------------------------------------------------------------------------------- /assets/icons/category_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /assets/icons/change_pass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/change_pass.png -------------------------------------------------------------------------------- /assets/icons/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/comment.png -------------------------------------------------------------------------------- /assets/icons/contact_us.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/contact_us.png -------------------------------------------------------------------------------- /assets/icons/country.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/country.png -------------------------------------------------------------------------------- /assets/icons/cut_qr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/cut_qr.png -------------------------------------------------------------------------------- /assets/icons/denied_wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/denied_wallet.png -------------------------------------------------------------------------------- /assets/icons/faq.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/faq.png -------------------------------------------------------------------------------- /assets/icons/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/home.png -------------------------------------------------------------------------------- /assets/icons/home_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /assets/icons/language.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/language.png -------------------------------------------------------------------------------- /assets/icons/legal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/legal.png -------------------------------------------------------------------------------- /assets/icons/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/list.png -------------------------------------------------------------------------------- /assets/icons/notifications.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/notifications.png -------------------------------------------------------------------------------- /assets/icons/package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/package.png -------------------------------------------------------------------------------- /assets/icons/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/profile.png -------------------------------------------------------------------------------- /assets/icons/profile_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/profile_icon.png -------------------------------------------------------------------------------- /assets/icons/profile_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /assets/icons/reload_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/reload_icon.png -------------------------------------------------------------------------------- /assets/icons/reload_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /assets/icons/search_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/icons/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/settings.png -------------------------------------------------------------------------------- /assets/icons/settings_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/settings_icon.png -------------------------------------------------------------------------------- /assets/icons/settings_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /assets/icons/shopeLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/shopeLogo.png -------------------------------------------------------------------------------- /assets/icons/sign_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/sign_out.png -------------------------------------------------------------------------------- /assets/icons/support.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/support.png -------------------------------------------------------------------------------- /assets/icons/timer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/timer.png -------------------------------------------------------------------------------- /assets/icons/truck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/truck.png -------------------------------------------------------------------------------- /assets/icons/wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/icons/wallet.png -------------------------------------------------------------------------------- /assets/jeans_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/jeans_1.png -------------------------------------------------------------------------------- /assets/jeans_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/jeans_10.png -------------------------------------------------------------------------------- /assets/jeans_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/jeans_2.png -------------------------------------------------------------------------------- /assets/jeans_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/jeans_3.png -------------------------------------------------------------------------------- /assets/jeans_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/jeans_4.png -------------------------------------------------------------------------------- /assets/jeans_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/jeans_5.png -------------------------------------------------------------------------------- /assets/jeans_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/jeans_6.png -------------------------------------------------------------------------------- /assets/jeans_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/jeans_7.png -------------------------------------------------------------------------------- /assets/jeans_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/jeans_8.png -------------------------------------------------------------------------------- /assets/jeans_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/jeans_9.png -------------------------------------------------------------------------------- /assets/list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/list.png -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/logo.png -------------------------------------------------------------------------------- /assets/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/profile.png -------------------------------------------------------------------------------- /assets/promotional/Mockup Intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/promotional/Mockup Intro.png -------------------------------------------------------------------------------- /assets/promotional/Mockup Screens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/promotional/Mockup Screens.png -------------------------------------------------------------------------------- /assets/promotional/google-play-badge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/promotional/google-play-badge.png -------------------------------------------------------------------------------- /assets/promotional/youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/promotional/youtube.png -------------------------------------------------------------------------------- /assets/red_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/red_clear.png -------------------------------------------------------------------------------- /assets/ring_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/ring_1.png -------------------------------------------------------------------------------- /assets/ring_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/ring_10.png -------------------------------------------------------------------------------- /assets/ring_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/ring_2.png -------------------------------------------------------------------------------- /assets/ring_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/ring_3.png -------------------------------------------------------------------------------- /assets/ring_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/ring_4.png -------------------------------------------------------------------------------- /assets/ring_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/ring_5.png -------------------------------------------------------------------------------- /assets/ring_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/ring_6.png -------------------------------------------------------------------------------- /assets/ring_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/ring_7.png -------------------------------------------------------------------------------- /assets/ring_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/ring_8.png -------------------------------------------------------------------------------- /assets/ring_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/ring_9.png -------------------------------------------------------------------------------- /assets/secondScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/secondScreen.png -------------------------------------------------------------------------------- /assets/shoeman_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/shoeman_1.png -------------------------------------------------------------------------------- /assets/shoeman_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/shoeman_10.png -------------------------------------------------------------------------------- /assets/shoeman_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/shoeman_2.png -------------------------------------------------------------------------------- /assets/shoeman_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/shoeman_3.png -------------------------------------------------------------------------------- /assets/shoeman_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/shoeman_4.png -------------------------------------------------------------------------------- /assets/shoeman_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/shoeman_5.png -------------------------------------------------------------------------------- /assets/shoeman_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/shoeman_6.png -------------------------------------------------------------------------------- /assets/shoeman_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/shoeman_7.png -------------------------------------------------------------------------------- /assets/shoeman_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/shoeman_8.png -------------------------------------------------------------------------------- /assets/shoeman_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/shoeman_9.png -------------------------------------------------------------------------------- /assets/thirdScreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/thirdScreen.png -------------------------------------------------------------------------------- /assets/womanshoe_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/womanshoe_1.png -------------------------------------------------------------------------------- /assets/womanshoe_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/womanshoe_10.png -------------------------------------------------------------------------------- /assets/womanshoe_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/womanshoe_2.png -------------------------------------------------------------------------------- /assets/womanshoe_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/womanshoe_3.png -------------------------------------------------------------------------------- /assets/womanshoe_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/womanshoe_4.png -------------------------------------------------------------------------------- /assets/womanshoe_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/womanshoe_5.png -------------------------------------------------------------------------------- /assets/womanshoe_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/womanshoe_6.png -------------------------------------------------------------------------------- /assets/womanshoe_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/womanshoe_7.png -------------------------------------------------------------------------------- /assets/womanshoe_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/womanshoe_8.png -------------------------------------------------------------------------------- /assets/womanshoe_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/assets/womanshoe_9.png -------------------------------------------------------------------------------- /fonts/Montserrat-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/fonts/Montserrat-Regular.ttf -------------------------------------------------------------------------------- /fonts/NunitoSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/fonts/NunitoSans-Regular.ttf -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Flutter.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # NOTE: This podspec is NOT to be published. It is only used as a local source! 3 | # This is a generated file; do not edit or check into version control. 4 | # 5 | 6 | Pod::Spec.new do |s| 7 | s.name = 'Flutter' 8 | s.version = '1.0.0' 9 | s.summary = 'A UI toolkit for beautiful and fast apps.' 10 | s.homepage = 'https://flutter.dev' 11 | s.license = { :type => 'BSD' } 12 | s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } 13 | s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } 14 | s.ios.deployment_target = '11.0' 15 | # Framework linking is handled by Flutter tooling, not CocoaPods. 16 | # Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs. 17 | s.vendored_frameworks = 'path/to/nothing' 18 | end 19 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/flutter_export_environment.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This is a generated file; do not edit or check into version control. 3 | export "FLUTTER_ROOT=/Users/roberto/Documents/flutter" 4 | export "FLUTTER_APPLICATION_PATH=/Users/roberto/Documents/personal/flutter_ecommerce_template" 5 | export "COCOAPODS_PARALLEL_CODE_SIGN=true" 6 | export "FLUTTER_TARGET=/Users/roberto/Documents/personal/flutter_ecommerce_template/lib/main.dart" 7 | export "FLUTTER_BUILD_DIR=build" 8 | export "FLUTTER_BUILD_NAME=1.0.1" 9 | export "FLUTTER_BUILD_NUMBER=1.0.1" 10 | export "DART_DEFINES=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ==" 11 | export "DART_OBFUSCATION=false" 12 | export "TRACK_WIDGET_CREATION=true" 13 | export "TREE_SHAKE_ICONS=false" 14 | export "PACKAGE_CONFIG=/Users/roberto/Documents/personal/flutter_ecommerce_template/.dart_tool/package_config.json" 15 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | platform :ios, '12.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - Flutter (from `Flutter`) 6 | 7 | EXTERNAL SOURCES: 8 | Flutter: 9 | :path: Flutter 10 | 11 | SPEC CHECKSUMS: 12 | Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 13 | 14 | PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048 15 | 16 | COCOAPODS: 1.11.3 17 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.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/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 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/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/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Flutter Ecommerce Template 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | flutter_ecommerce_template 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 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/api_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:http/http.dart' as http; 4 | 5 | import 'models/user.dart'; 6 | 7 | class ApiService { 8 | static String url(int nrResults) { 9 | return 'http://api.randomuser.me/?results=$nrResults'; 10 | } 11 | 12 | static Future> getUsers({int nrUsers = 1}) async { 13 | try { 14 | final response = await http.get( 15 | //TODO flutter 2 migration 16 | Uri( 17 | path: url(nrUsers), 18 | ), 19 | headers: {"Content-Type": "application/json"}); 20 | 21 | if (response.statusCode == 200) { 22 | Map data = json.decode(response.body); 23 | Iterable list = data["results"]; 24 | List users = list.map((l) => User.fromJson(l)).toList(); 25 | return users; 26 | } else { 27 | print(response.body); 28 | return []; 29 | } 30 | } catch (e) { 31 | print(e); 32 | return []; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/app_properties.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | const Color yellow = Color(0xffFDC054); 4 | const Color mediumYellow = Color(0xffFDB846); 5 | const Color darkYellow = Color(0xffE99E22); 6 | const Color transparentYellow = Color.fromRGBO(253, 184, 70, 0.7); 7 | const Color darkGrey = Color(0xff202020); 8 | 9 | const LinearGradient mainButton = LinearGradient(colors: [ 10 | Color.fromRGBO(236, 60, 3, 1), 11 | Color.fromRGBO(234, 60, 3, 1), 12 | Color.fromRGBO(216, 78, 16, 1), 13 | ], begin: FractionalOffset.topCenter, end: FractionalOffset.bottomCenter); 14 | 15 | const List shadow = [ 16 | BoxShadow(color: Colors.black12, offset: Offset(0, 3), blurRadius: 6) 17 | ]; 18 | 19 | screenAwareSize(int size, BuildContext context) { 20 | double baseHeight = 640.0; 21 | return size * MediaQuery.of(context).size.height / baseHeight; 22 | } -------------------------------------------------------------------------------- /lib/custom_background.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/app_properties.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class MainBackground extends CustomPainter { 5 | MainBackground(); 6 | 7 | @override 8 | void paint(Canvas canvas, Size size) { 9 | double height = size.height; 10 | double width = size.width; 11 | canvas.drawRect( 12 | Rect.fromLTRB(0, 0, width, height), Paint()..color = Colors.white); 13 | canvas.drawRect(Rect.fromLTRB(width - (width / 3), 0, width, height), 14 | Paint()..color = transparentYellow); 15 | } 16 | 17 | @override 18 | bool shouldRepaint(CustomPainter oldDelegate) { 19 | return false; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:ecommerce_int2/screens/splash_page.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | 6 | 7 | void main() => runApp(MyApp()); 8 | 9 | class MyApp extends StatelessWidget { 10 | // This widget is the root of your application. 11 | @override 12 | Widget build(BuildContext context) { 13 | return MaterialApp( 14 | title: 'eCommerce int2', 15 | debugShowCheckedModeBanner: false, 16 | theme: ThemeData( 17 | brightness: Brightness.light, 18 | canvasColor: Colors.transparent, 19 | primarySwatch: Colors.blue, 20 | fontFamily: "Montserrat", 21 | ), 22 | home: SplashScreen(), 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/models/category.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Category{ 4 | Color begin; 5 | Color end; 6 | String category; 7 | String image; 8 | 9 | Category(this.begin, this.end, this.category, this.image); 10 | 11 | 12 | } -------------------------------------------------------------------------------- /lib/models/coordinates.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'coordinates.g.dart'; 3 | 4 | @JsonSerializable() 5 | class Coordinates { 6 | String latitude; 7 | String longitude; 8 | 9 | Coordinates({ 10 | required this.latitude, 11 | required this.longitude, 12 | }); 13 | 14 | factory Coordinates.fromJson(Map json) => 15 | _$CoordinatesFromJson(json); 16 | 17 | Map toJson() => _$CoordinatesToJson(this); 18 | } 19 | -------------------------------------------------------------------------------- /lib/models/coordinates.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'coordinates.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Coordinates _$CoordinatesFromJson(Map json) { 10 | return Coordinates( 11 | latitude: json['latitude'] as String, 12 | longitude: json['longitude'] as String, 13 | ); 14 | } 15 | 16 | Map _$CoordinatesToJson(Coordinates instance) => 17 | { 18 | 'latitude': instance.latitude, 19 | 'longitude': instance.longitude, 20 | }; 21 | -------------------------------------------------------------------------------- /lib/models/dod.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'dod.g.dart'; 3 | 4 | @JsonSerializable() 5 | class Dob { 6 | String date; 7 | int age; 8 | 9 | Dob({required this.date, required this.age}); 10 | 11 | factory Dob.fromJson(Map json) => _$DobFromJson(json); 12 | 13 | Map toJson() => _$DobToJson(this); 14 | } 15 | -------------------------------------------------------------------------------- /lib/models/dod.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'dod.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Dob _$DobFromJson(Map json) { 10 | return Dob( 11 | date: json['date'] as String, 12 | age: json['age'] as int, 13 | ); 14 | } 15 | 16 | Map _$DobToJson(Dob instance) => { 17 | 'date': instance.date, 18 | 'age': instance.age, 19 | }; 20 | -------------------------------------------------------------------------------- /lib/models/id.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'id.g.dart'; 3 | 4 | @JsonSerializable() 5 | class Id { 6 | String name; 7 | String value; 8 | 9 | Id({ 10 | required this.name, 11 | required this.value, 12 | }); 13 | 14 | factory Id.fromJson(Map json) => _$IdFromJson(json); 15 | 16 | Map toJson() => _$IdToJson(this); 17 | } 18 | -------------------------------------------------------------------------------- /lib/models/id.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'id.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Id _$IdFromJson(Map json) { 10 | return Id( 11 | name: json['name'] as String, 12 | value: json['value'] as String, 13 | ); 14 | } 15 | 16 | Map _$IdToJson(Id instance) => { 17 | 'name': instance.name, 18 | 'value': instance.value, 19 | }; 20 | -------------------------------------------------------------------------------- /lib/models/location.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/models/coordinates.dart'; 2 | import 'package:ecommerce_int2/models/timezone.dart'; 3 | import 'package:json_annotation/json_annotation.dart'; 4 | part 'location.g.dart'; 5 | 6 | @JsonSerializable() 7 | class Location { 8 | String street; 9 | String city; 10 | String state; 11 | String postcode; 12 | Coordinates coordinates; 13 | Timezone timezone; 14 | 15 | Location({ 16 | required this.street, 17 | required this.city, 18 | required this.state, 19 | required this.postcode, 20 | required this.coordinates, 21 | required this.timezone, 22 | }); 23 | 24 | factory Location.fromJson(Map json) => 25 | _$LocationFromJson(json); 26 | 27 | Map toJson() => _$LocationToJson(this); 28 | } 29 | -------------------------------------------------------------------------------- /lib/models/location.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'location.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Location _$LocationFromJson(Map json) { 10 | return Location( 11 | street: json['street'] as String, 12 | city: json['city'] as String, 13 | state: json['state'] as String, 14 | postcode: json['postcode'] as String, 15 | coordinates: 16 | Coordinates.fromJson(json['coordinates'] as Map), 17 | timezone: Timezone.fromJson(json['timezone'] as Map), 18 | ); 19 | } 20 | 21 | Map _$LocationToJson(Location instance) => { 22 | 'street': instance.street, 23 | 'city': instance.city, 24 | 'state': instance.state, 25 | 'postcode': instance.postcode, 26 | 'coordinates': instance.coordinates, 27 | 'timezone': instance.timezone, 28 | }; 29 | -------------------------------------------------------------------------------- /lib/models/loging.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'loging.g.dart'; 3 | 4 | @JsonSerializable() 5 | class Login { 6 | String uuid; 7 | String username; 8 | String password; 9 | String salt; 10 | String md5; 11 | String sha1; 12 | String sha256; 13 | 14 | Login({ 15 | required this.uuid, 16 | required this.username, 17 | required this.password, 18 | required this.salt, 19 | required this.md5, 20 | required this.sha1, 21 | required this.sha256, 22 | }); 23 | 24 | factory Login.fromJson(Map json) => _$LoginFromJson(json); 25 | 26 | Map toJson() => _$LoginToJson(this); 27 | } 28 | -------------------------------------------------------------------------------- /lib/models/loging.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'loging.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Login _$LoginFromJson(Map json) { 10 | return Login( 11 | uuid: json['uuid'] as String, 12 | username: json['username'] as String, 13 | password: json['password'] as String, 14 | salt: json['salt'] as String, 15 | md5: json['md5'] as String, 16 | sha1: json['sha1'] as String, 17 | sha256: json['sha256'] as String, 18 | ); 19 | } 20 | 21 | Map _$LoginToJson(Login instance) => { 22 | 'uuid': instance.uuid, 23 | 'username': instance.username, 24 | 'password': instance.password, 25 | 'salt': instance.salt, 26 | 'md5': instance.md5, 27 | 'sha1': instance.sha1, 28 | 'sha256': instance.sha256, 29 | }; 30 | -------------------------------------------------------------------------------- /lib/models/name.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'name.g.dart'; 3 | 4 | @JsonSerializable() 5 | class Name { 6 | String title; 7 | String first; 8 | String last; 9 | 10 | Name({ 11 | required this.title, 12 | required this.first, 13 | required this.last, 14 | }); 15 | 16 | factory Name.fromJson(Map json) => _$NameFromJson(json); 17 | 18 | Map toJson() => _$NameToJson(this); 19 | } 20 | -------------------------------------------------------------------------------- /lib/models/name.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'name.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Name _$NameFromJson(Map json) { 10 | return Name( 11 | title: json['title'] as String, 12 | first: json['first'] as String, 13 | last: json['last'] as String, 14 | ); 15 | } 16 | 17 | Map _$NameToJson(Name instance) => { 18 | 'title': instance.title, 19 | 'first': instance.first, 20 | 'last': instance.last, 21 | }; 22 | -------------------------------------------------------------------------------- /lib/models/picture.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'picture.g.dart'; 3 | 4 | @JsonSerializable() 5 | class Picture { 6 | String large; 7 | String medium; 8 | String thumbnail; 9 | 10 | Picture({ 11 | required this.large, 12 | required this.medium, 13 | required this.thumbnail, 14 | }); 15 | 16 | factory Picture.fromJson(Map json) => 17 | _$PictureFromJson(json); 18 | 19 | Map toJson() => _$PictureToJson(this); 20 | } 21 | -------------------------------------------------------------------------------- /lib/models/picture.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'picture.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Picture _$PictureFromJson(Map json) { 10 | return Picture( 11 | large: json['large'] as String, 12 | medium: json['medium'] as String, 13 | thumbnail: json['thumbnail'] as String, 14 | ); 15 | } 16 | 17 | Map _$PictureToJson(Picture instance) => { 18 | 'large': instance.large, 19 | 'medium': instance.medium, 20 | 'thumbnail': instance.thumbnail, 21 | }; 22 | -------------------------------------------------------------------------------- /lib/models/product.dart: -------------------------------------------------------------------------------- 1 | class Product{ 2 | String image; 3 | String name; 4 | String description; 5 | double price; 6 | 7 | Product(this.image, this.name, this.description, this.price); 8 | } -------------------------------------------------------------------------------- /lib/models/registered.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'registered.g.dart'; 3 | 4 | @JsonSerializable() 5 | class Registered { 6 | String date; 7 | int age; 8 | 9 | Registered({ 10 | required this.date, 11 | required this.age, 12 | }); 13 | 14 | factory Registered.fromJson(Map json) => 15 | _$RegisteredFromJson(json); 16 | 17 | Map toJson() => _$RegisteredToJson(this); 18 | } 19 | -------------------------------------------------------------------------------- /lib/models/registered.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'registered.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Registered _$RegisteredFromJson(Map json) { 10 | return Registered( 11 | date: json['date'] as String, 12 | age: json['age'] as int, 13 | ); 14 | } 15 | 16 | Map _$RegisteredToJson(Registered instance) => 17 | { 18 | 'date': instance.date, 19 | 'age': instance.age, 20 | }; 21 | -------------------------------------------------------------------------------- /lib/models/timezone.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'timezone.g.dart'; 3 | 4 | @JsonSerializable() 5 | class Timezone { 6 | String offset; 7 | String description; 8 | 9 | Timezone({ 10 | required this.offset, 11 | required this.description, 12 | }); 13 | 14 | factory Timezone.fromJson(Map json) => 15 | _$TimezoneFromJson(json); 16 | 17 | Map toJson() => _$TimezoneToJson(this); 18 | } 19 | -------------------------------------------------------------------------------- /lib/models/timezone.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'timezone.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Timezone _$TimezoneFromJson(Map json) { 10 | return Timezone( 11 | offset: json['offset'] as String, 12 | description: json['description'] as String, 13 | ); 14 | } 15 | 16 | Map _$TimezoneToJson(Timezone instance) => { 17 | 'offset': instance.offset, 18 | 'description': instance.description, 19 | }; 20 | -------------------------------------------------------------------------------- /lib/models/user.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/models/dod.dart'; 2 | import 'package:ecommerce_int2/models/id.dart'; 3 | import 'package:ecommerce_int2/models/location.dart'; 4 | import 'package:ecommerce_int2/models/loging.dart'; 5 | import 'package:ecommerce_int2/models/name.dart'; 6 | import 'package:ecommerce_int2/models/picture.dart'; 7 | import 'package:ecommerce_int2/models/registered.dart'; 8 | import 'package:json_annotation/json_annotation.dart'; 9 | part 'user.g.dart'; 10 | 11 | @JsonSerializable() 12 | class User { 13 | String gender; 14 | Name name; 15 | Location location; 16 | String email; 17 | Login login; 18 | Dob dob; 19 | Registered registered; 20 | String phone; 21 | String cell; 22 | Id id; 23 | Picture picture; 24 | String nat; 25 | 26 | User( 27 | {required this.gender, 28 | required this.name, 29 | required this.location, 30 | required this.email, 31 | required this.login, 32 | required this.dob, 33 | required this.registered, 34 | required this.phone, 35 | required this.cell, 36 | required this.id, 37 | required this.picture, 38 | required this.nat}); 39 | 40 | factory User.fromJson(Map json) => _$UserFromJson(json); 41 | 42 | Map toJson() => _$UserToJson(this); 43 | } 44 | -------------------------------------------------------------------------------- /lib/models/user.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | User _$UserFromJson(Map json) { 10 | return User( 11 | gender: json['gender'] as String, 12 | name: Name.fromJson(json['name'] as Map), 13 | location: Location.fromJson(json['location'] as Map), 14 | email: json['email'] as String, 15 | login: Login.fromJson(json['login'] as Map), 16 | dob: Dob.fromJson(json['dob'] as Map), 17 | registered: Registered.fromJson(json['registered'] as Map), 18 | phone: json['phone'] as String, 19 | cell: json['cell'] as String, 20 | id: Id.fromJson(json['id'] as Map), 21 | picture: Picture.fromJson(json['picture'] as Map), 22 | nat: json['nat'] as String, 23 | ); 24 | } 25 | 26 | Map _$UserToJson(User instance) => { 27 | 'gender': instance.gender, 28 | 'name': instance.name, 29 | 'location': instance.location, 30 | 'email': instance.email, 31 | 'login': instance.login, 32 | 'dob': instance.dob, 33 | 'registered': instance.registered, 34 | 'phone': instance.phone, 35 | 'cell': instance.cell, 36 | 'id': instance.id, 37 | 'picture': instance.picture, 38 | 'nat': instance.nat, 39 | }; 40 | -------------------------------------------------------------------------------- /lib/screens/main/components/category_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/models/category.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class CategoryCard extends StatelessWidget { 5 | final Category category; 6 | 7 | const CategoryCard({ 8 | required this.category, 9 | }); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Padding( 14 | padding: const EdgeInsets.symmetric(horizontal: 8.0), 15 | child: Card( 16 | child: ClipRRect( 17 | borderRadius: BorderRadius.all(Radius.circular(5)), 18 | child: Row( 19 | mainAxisSize: MainAxisSize.min, 20 | children: [ 21 | Container( 22 | height: 80, 23 | width: 90, 24 | padding: EdgeInsets.all(8.0), 25 | child: Center( 26 | child: Text( 27 | category.category, 28 | textAlign: TextAlign.right, 29 | ), 30 | ), 31 | ), 32 | Container( 33 | height: 80, 34 | width: 90, 35 | decoration: BoxDecoration( 36 | gradient: RadialGradient( 37 | colors: [category.begin, category.end], 38 | center: Alignment(0, 0), 39 | radius: 0.8, 40 | focal: Alignment(0, 0), 41 | focalRadius: 0.1)), 42 | padding: EdgeInsets.all(8.0), 43 | child: Center( 44 | child: Image.asset(category.image), 45 | ), 46 | ) 47 | ], 48 | ), 49 | ), 50 | ), 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /lib/screens/main/components/custom_bottom_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | 4 | class CustomBottomBar extends StatelessWidget { 5 | final TabController controller; 6 | 7 | const CustomBottomBar({ 8 | required this.controller, 9 | }); 10 | @override 11 | Widget build(BuildContext context) { 12 | return BottomAppBar( 13 | child: Row( 14 | mainAxisAlignment: MainAxisAlignment.spaceAround, 15 | children: [ 16 | IconButton( 17 | icon: SvgPicture.asset( 18 | 'assets/icons/home_icon.svg', 19 | fit: BoxFit.fitWidth, 20 | ), 21 | onPressed: () { 22 | controller.animateTo(0); 23 | }, 24 | ), 25 | IconButton( 26 | icon: Image.asset('assets/icons/category_icon.png'), 27 | onPressed: () { 28 | controller.animateTo(1); 29 | }, 30 | ), 31 | IconButton( 32 | icon: SvgPicture.asset('assets/icons/cart_icon.svg'), 33 | onPressed: () { 34 | controller.animateTo(2); 35 | }, 36 | ), 37 | IconButton( 38 | icon: Image.asset('assets/icons/profile_icon.png'), 39 | onPressed: () { 40 | controller.animateTo(3); 41 | }, 42 | ) 43 | ], 44 | ), 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/screens/main/components/recommended_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/app_properties.dart'; 2 | import 'package:ecommerce_int2/models/product.dart'; 3 | import 'package:ecommerce_int2/screens/product/product_page.dart'; 4 | import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class RecommendedList extends StatelessWidget { 8 | List products = [ 9 | Product('assets/bag_1.png', 'Bag', 'Beautiful bag', 2.33), 10 | Product('assets/cap_5.png', 'Cap', 'Cap with beautiful design', 10), 11 | Product('assets/jeans_1.png', 'Jeans', 'Jeans for you', 20), 12 | Product('assets/womanshoe_3.png', 'Woman Shoes', 13 | 'Shoes with special discount', 30), 14 | Product('assets/bag_10.png', 'Bag Express', 'Bag for your shops', 40), 15 | Product('assets/jeans_3.png', 'Jeans', 'Beautiful Jeans', 102.33), 16 | Product('assets/ring_1.png', 'Silver Ring', 'Description', 52.33), 17 | Product('assets/shoeman_7.png', 'Shoes', 'Description', 62.33), 18 | Product('assets/headphone_9.png', 'Headphones', 'Description', 72.33), 19 | ]; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Column( 24 | children: [ 25 | SizedBox( 26 | height: 20, 27 | child: Row( 28 | crossAxisAlignment: CrossAxisAlignment.stretch, 29 | children: [ 30 | IntrinsicHeight( 31 | child: Container( 32 | margin: const EdgeInsets.only(left: 16.0, right: 8.0), 33 | width: 4, 34 | color: mediumYellow, 35 | ), 36 | ), 37 | Center( 38 | child: Text( 39 | 'Recommended', 40 | style: TextStyle( 41 | color: darkGrey, 42 | fontSize: 16.0, 43 | fontWeight: FontWeight.bold), 44 | )), 45 | ], 46 | ), 47 | ), 48 | Flexible( 49 | child: Container( 50 | padding: EdgeInsets.only(top: 16.0, right: 16.0, left: 16.0), 51 | child: MasonryGridView.count( 52 | physics: NeverScrollableScrollPhysics(), 53 | padding: EdgeInsets.zero, 54 | crossAxisCount: 4, 55 | itemCount: products.length, 56 | itemBuilder: (BuildContext context, int index) => new ClipRRect( 57 | borderRadius: BorderRadius.all(Radius.circular(5.0)), 58 | child: InkWell( 59 | onTap: () => Navigator.of(context).push(MaterialPageRoute( 60 | builder: (_) => ProductPage(product: products[index]))), 61 | child: Container( 62 | decoration: BoxDecoration( 63 | gradient: RadialGradient( 64 | colors: [ 65 | Colors.grey.withOpacity(0.3), 66 | Colors.grey.withOpacity(0.7), 67 | ], 68 | center: Alignment(0, 0), 69 | radius: 0.6, 70 | focal: Alignment(0, 0), 71 | focalRadius: 0.1), 72 | ), 73 | child: Hero( 74 | tag: products[index].image, 75 | child: Image.asset(products[index].image))), 76 | ), 77 | ), 78 | mainAxisSpacing: 4.0, 79 | crossAxisSpacing: 4.0, 80 | ), 81 | ), 82 | ), 83 | ], 84 | ); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /lib/screens/main/components/tab_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/models/category.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'category_card.dart'; 4 | import 'recommended_list.dart'; 5 | 6 | class TabView extends StatelessWidget { 7 | List categories = [ 8 | Category( 9 | Color(0xffFCE183), 10 | Color(0xffF68D7F), 11 | 'Gadgets', 12 | 'assets/jeans_5.png', 13 | ), 14 | Category( 15 | Color(0xffF749A2), 16 | Color(0xffFF7375), 17 | 'Clothes', 18 | 'assets/jeans_5.png', 19 | ), 20 | Category( 21 | Color(0xff00E9DA), 22 | Color(0xff5189EA), 23 | 'Fashion', 24 | 'assets/jeans_5.png', 25 | ), 26 | Category( 27 | Color(0xffAF2D68), 28 | Color(0xff632376), 29 | 'Home', 30 | 'assets/jeans_5.png', 31 | ), 32 | Category( 33 | Color(0xff36E892), 34 | Color(0xff33B2B9), 35 | 'Beauty', 36 | 'assets/jeans_5.png', 37 | ), 38 | Category( 39 | Color(0xffF123C4), 40 | Color(0xff668CEA), 41 | 'Appliances', 42 | 'assets/jeans_5.png', 43 | ), 44 | ]; 45 | 46 | final TabController tabController; 47 | 48 | TabView({ 49 | required this.tabController, 50 | }); 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | print(MediaQuery.of(context).size.height / 9); 55 | return TabBarView( 56 | physics: NeverScrollableScrollPhysics(), 57 | controller: tabController, 58 | children: [ 59 | Container( 60 | child: Column( 61 | mainAxisSize: MainAxisSize.min, 62 | children: [ 63 | Container( 64 | margin: EdgeInsets.all(8.0), 65 | height: MediaQuery.of(context).size.height / 9, 66 | width: MediaQuery.of(context).size.width, 67 | child: ListView.builder( 68 | scrollDirection: Axis.horizontal, 69 | itemCount: categories.length, 70 | itemBuilder: (_, index) => CategoryCard( 71 | category: categories[index], 72 | ))), 73 | SizedBox( 74 | height: 16.0, 75 | ), 76 | Flexible(child: RecommendedList()), 77 | ], 78 | ), 79 | ), 80 | Column(children: [ 81 | SizedBox( 82 | height: 16.0, 83 | ), 84 | Flexible(child: RecommendedList()) 85 | ]), 86 | Column(children: [ 87 | SizedBox( 88 | height: 16.0, 89 | ), 90 | Flexible(child: RecommendedList()) 91 | ]), 92 | Column(children: [ 93 | SizedBox( 94 | height: 16.0, 95 | ), 96 | Flexible(child: RecommendedList()) 97 | ]), 98 | Column(children: [ 99 | SizedBox( 100 | height: 16.0, 101 | ), 102 | Flexible(child: RecommendedList()) 103 | ]), 104 | ]); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /lib/screens/product/components/color_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/app_properties.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ColorList extends StatefulWidget { 5 | final List colorList; 6 | 7 | ColorList(this.colorList); 8 | 9 | @override 10 | _ColorListState createState() => _ColorListState(); 11 | } 12 | 13 | class _ColorListState extends State { 14 | int active = 0; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return SizedBox( 19 | height: 75, 20 | child: Column( 21 | mainAxisSize: MainAxisSize.min, 22 | crossAxisAlignment: CrossAxisAlignment.start, 23 | children: [ 24 | Padding( 25 | padding: const EdgeInsets.only(bottom: 8.0), 26 | child: Text( 27 | 'Color', 28 | style: TextStyle(color: Colors.white, shadows: shadow), 29 | ), 30 | ), 31 | Flexible( 32 | child: ListView.builder( 33 | scrollDirection: Axis.horizontal, 34 | itemCount: widget.colorList.length, 35 | 36 | /// list of button colors based on colorList 37 | itemBuilder: (_, index) => InkWell( 38 | onTap: () { 39 | setState(() { 40 | active = index; 41 | }); 42 | }, 43 | child: Padding( 44 | padding: const EdgeInsets.symmetric( 45 | horizontal: 4.0, vertical: 8.0), 46 | 47 | ///scale based on active color 48 | child: Transform.scale( 49 | scale: active == index ? 1.2 : 1, 50 | child: ColorOption(widget.colorList[index]), 51 | ), 52 | ), 53 | ), 54 | ), 55 | ), 56 | ], 57 | ), 58 | ); 59 | } 60 | } 61 | 62 | class ColorOption extends StatelessWidget { 63 | final Color color; 64 | 65 | const ColorOption(this.color); 66 | 67 | @override 68 | Widget build(BuildContext context) { 69 | return Container( 70 | width: 32, 71 | height: 32, 72 | decoration: BoxDecoration( 73 | borderRadius: BorderRadius.all(Radius.circular(5)), color: color), 74 | ); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /lib/screens/product/components/product_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/models/product.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ProductCard extends StatelessWidget { 5 | final Product product; 6 | 7 | ProductCard(this.product); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return InkWell( 12 | onTap: null, 13 | child: Container( 14 | height: 250, 15 | width: MediaQuery.of(context).size.width / 2 - 29, 16 | decoration: BoxDecoration( 17 | borderRadius: BorderRadius.all(Radius.circular(10)), 18 | color: Color(0xfffbd085).withOpacity(0.46)), 19 | child: Column( 20 | crossAxisAlignment: CrossAxisAlignment.end, 21 | children: [ 22 | Align( 23 | alignment: Alignment.topCenter, 24 | child: Container( 25 | padding: EdgeInsets.all(16.0), 26 | width: MediaQuery.of(context).size.width / 2 - 64, 27 | height: MediaQuery.of(context).size.width / 2 - 64, 28 | child: Image.asset( 29 | product.image, 30 | ), 31 | ), 32 | ), 33 | Flexible( 34 | child: Align( 35 | alignment: Alignment(1, 0.5), 36 | child: Container( 37 | margin: const EdgeInsets.only(left: 16.0), 38 | padding: const EdgeInsets.all(8.0), 39 | decoration: BoxDecoration( 40 | color: Color(0xffe0450a).withOpacity(0.51), 41 | borderRadius: BorderRadius.only( 42 | topLeft: Radius.circular(10), 43 | bottomLeft: Radius.circular(10))), 44 | child: Text( 45 | product.name, 46 | textAlign: TextAlign.right, 47 | style: TextStyle( 48 | fontSize: 12.0, 49 | color: Colors.white, 50 | ), 51 | )), 52 | ), 53 | ) 54 | ], 55 | ))); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/screens/product/components/product_display.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/app_properties.dart'; 2 | import 'package:ecommerce_int2/models/product.dart'; 3 | import 'package:ecommerce_int2/screens/rating/rating_page.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class ProductDisplay extends StatelessWidget { 7 | final Product product; 8 | 9 | const ProductDisplay({ 10 | required this.product, 11 | }); 12 | @override 13 | Widget build(BuildContext context) { 14 | return Stack( 15 | children: [ 16 | Positioned( 17 | top: 30.0, 18 | right: 0, 19 | child: Container( 20 | width: MediaQuery.of(context).size.width / 1.5, 21 | height: 85, 22 | padding: EdgeInsets.only(right: 24), 23 | decoration: new BoxDecoration( 24 | color: darkGrey, 25 | borderRadius: BorderRadius.only( 26 | topLeft: Radius.circular(8.0), 27 | bottomLeft: Radius.circular(8.0)), 28 | boxShadow: [ 29 | BoxShadow( 30 | color: Color.fromRGBO(0, 0, 0, 0.16), 31 | offset: Offset(0, 3), 32 | blurRadius: 6.0), 33 | ]), 34 | child: Align( 35 | alignment: Alignment(1, 0), 36 | child: RichText( 37 | text: TextSpan(children: [ 38 | TextSpan( 39 | text: '\$ ${product.price}', 40 | style: const TextStyle( 41 | color: const Color(0xFFFFFFFF), 42 | fontWeight: FontWeight.w400, 43 | fontFamily: "Montserrat", 44 | fontSize: 36.0)), 45 | TextSpan( 46 | text: '.58', 47 | style: const TextStyle( 48 | color: const Color(0xFFFFFFFF), 49 | fontWeight: FontWeight.w400, 50 | fontFamily: "Montserrat", 51 | fontSize: 18.0)) 52 | ])), 53 | ))), 54 | Align( 55 | alignment: Alignment(-1, 0), 56 | child: Padding( 57 | padding: const EdgeInsets.only(right: 20.0, left: 20.0), 58 | child: Container( 59 | height: screenAwareSize(220, context), 60 | child: Stack( 61 | children: [ 62 | Padding( 63 | padding: const EdgeInsets.only( 64 | bottom: 18.0, 65 | ), 66 | child: Container( 67 | child: Hero( 68 | tag: product.image, 69 | child: Image.asset( 70 | product.image, 71 | fit: BoxFit.contain, 72 | height: 230, 73 | width: 230, 74 | ), 75 | ), 76 | ), 77 | ) 78 | ], 79 | ), 80 | ), 81 | ), 82 | ), 83 | Positioned( 84 | left: 20.0, 85 | bottom: 0.0, 86 | child: RawMaterialButton( 87 | onPressed: () => Navigator.of(context) 88 | .push(MaterialPageRoute(builder: (_) => RatingPage())), 89 | constraints: const BoxConstraints(minWidth: 45, minHeight: 45), 90 | child: 91 | Icon(Icons.favorite, color: Color.fromRGBO(255, 137, 147, 1)), 92 | elevation: 0.0, 93 | shape: CircleBorder(), 94 | fillColor: Color.fromRGBO(255, 255, 255, 0.4), 95 | ), 96 | ) 97 | ], 98 | ); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /lib/screens/product/components/shop_product.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/app_properties.dart'; 2 | import 'package:ecommerce_int2/models/product.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class ShopProduct extends StatelessWidget { 6 | final Product product; 7 | final VoidCallback onRemove; 8 | 9 | const ShopProduct( 10 | this.product, { 11 | required this.onRemove, 12 | }); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Container( 17 | padding: EdgeInsets.symmetric(vertical: 16.0), 18 | width: MediaQuery.of(context).size.width / 2, 19 | child: Column( 20 | children: [ 21 | ShopProductDisplay( 22 | product, 23 | onPressed: onRemove, 24 | ), 25 | Padding( 26 | padding: const EdgeInsets.all(8.0), 27 | child: Text( 28 | product.name, 29 | textAlign: TextAlign.center, 30 | style: TextStyle( 31 | color: darkGrey, 32 | ), 33 | ), 34 | ), 35 | Text( 36 | '\$${product.price}', 37 | textAlign: TextAlign.center, 38 | style: TextStyle( 39 | color: darkGrey, fontWeight: FontWeight.bold, fontSize: 18.0), 40 | ), 41 | ], 42 | )); 43 | } 44 | } 45 | 46 | class ShopProductDisplay extends StatelessWidget { 47 | final Product product; 48 | final VoidCallback onPressed; 49 | 50 | const ShopProductDisplay(this.product, {required this.onPressed}); 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | return SizedBox( 55 | height: 150, 56 | width: 200, 57 | child: Stack(children: [ 58 | Positioned( 59 | left: 25, 60 | child: SizedBox( 61 | height: 150, 62 | width: 150, 63 | child: Transform.scale( 64 | scale: 1.2, 65 | child: Image.asset('assets/bottom_yellow.png'), 66 | ), 67 | ), 68 | ), 69 | Positioned( 70 | left: 50, 71 | top: 5, 72 | child: SizedBox( 73 | height: 80, 74 | width: 80, 75 | child: Image.asset( 76 | '${product.image}', 77 | fit: BoxFit.contain, 78 | )), 79 | ), 80 | Positioned( 81 | right: 30, 82 | bottom: 25, 83 | child: Align( 84 | child: IconButton( 85 | icon: Image.asset('assets/red_clear.png'), 86 | onPressed: onPressed, 87 | ), 88 | ), 89 | ) 90 | ]), 91 | ); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /lib/screens/settings/change_country.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/app_properties.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ChangeCountryPage extends StatefulWidget { 5 | @override 6 | _ChangeCountryPageState createState() => _ChangeCountryPageState(); 7 | } 8 | 9 | class _ChangeCountryPageState extends State { 10 | List languages = [ 11 | 'China', 12 | 'Spain', 13 | 'United Kindom', 14 | 'Romania', 15 | 'Germany', 16 | 'Portugal', 17 | 'Bengal', 18 | 'Russia', 19 | 'Japan', 20 | 'France', 21 | ]; 22 | 23 | String currentCountry = ''; 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Scaffold( 28 | backgroundColor: Colors.white, 29 | appBar: AppBar( 30 | iconTheme: IconThemeData( 31 | color: Colors.black, 32 | ), 33 | brightness: Brightness.light, 34 | backgroundColor: Colors.transparent, 35 | title: Text( 36 | 'Settings', 37 | style: TextStyle(color: darkGrey), 38 | ), 39 | elevation: 0, 40 | ), 41 | body: SafeArea( 42 | bottom: true, 43 | child: Padding( 44 | padding: const EdgeInsets.only(top: 24.0, left: 24.0, right: 24.0), 45 | child: Column( 46 | crossAxisAlignment: CrossAxisAlignment.start, 47 | children: [ 48 | Padding( 49 | padding: const EdgeInsets.only(bottom: 16.0), 50 | child: Text( 51 | 'Change Country', 52 | style: TextStyle( 53 | color: Colors.black, 54 | fontWeight: FontWeight.bold, 55 | fontSize: 18.0), 56 | ), 57 | ), 58 | Flexible( 59 | child: ListView( 60 | children: languages 61 | .map((l) => ListTile( 62 | onTap: () { 63 | setState(() { 64 | currentCountry = l; 65 | }); 66 | }, 67 | title: Text( 68 | l, 69 | style: TextStyle(fontSize: 14), 70 | ), 71 | trailing: l == currentCountry 72 | ? Icon( 73 | Icons.check_circle, 74 | color: yellow, 75 | size: 16, 76 | ) 77 | : SizedBox(), 78 | )) 79 | .toList(), 80 | ), 81 | ), 82 | ], 83 | ), 84 | ), 85 | ), 86 | ); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /lib/screens/settings/change_language_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/app_properties.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ChangeLanguagePage extends StatefulWidget { 5 | @override 6 | _ChangeCountryPageState createState() => _ChangeCountryPageState(); 7 | } 8 | 9 | class _ChangeCountryPageState extends State { 10 | List languages = [ 11 | 'Chinesse', 12 | 'Spanish', 13 | 'English', 14 | 'Romanian', 15 | 'German', 16 | 'Portuguese', 17 | 'Bengali', 18 | 'Russian', 19 | 'Japanese', 20 | 'French', 21 | ]; 22 | 23 | String currentLanguage = ''; 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | return Scaffold( 28 | backgroundColor: Colors.white, 29 | appBar: AppBar( 30 | brightness: Brightness.light, 31 | iconTheme: IconThemeData( 32 | color: Colors.black, //change your color here 33 | ), 34 | backgroundColor: Colors.transparent, 35 | title: Text( 36 | 'Settings', 37 | style: TextStyle(color: darkGrey), 38 | ), 39 | elevation: 0, 40 | ), 41 | body: SafeArea( 42 | bottom: true, 43 | child: Padding( 44 | padding: const EdgeInsets.only(top: 24.0, left: 24.0, right: 24.0), 45 | child: Column( 46 | crossAxisAlignment: CrossAxisAlignment.start, 47 | children: [ 48 | Padding( 49 | padding: const EdgeInsets.only(bottom: 16.0), 50 | child: Text( 51 | 'Language A / का', 52 | style: TextStyle( 53 | color: Colors.black, 54 | fontWeight: FontWeight.bold, 55 | fontSize: 18.0), 56 | ), 57 | ), 58 | Flexible( 59 | child: ListView( 60 | children: languages 61 | .map((l) => ListTile( 62 | onTap: () { 63 | setState(() { 64 | currentLanguage = l; 65 | }); 66 | }, 67 | title: Text( 68 | l, 69 | style: TextStyle(fontSize: 14), 70 | ), 71 | trailing: l == currentLanguage 72 | ? Icon( 73 | Icons.check_circle, 74 | color: yellow, 75 | size: 16, 76 | ) 77 | : SizedBox(), 78 | )) 79 | .toList(), 80 | ), 81 | ), 82 | ], 83 | ), 84 | ), 85 | ), 86 | ); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /lib/screens/settings/legal_about_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:ecommerce_int2/app_properties.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class LegalAboutPage extends StatefulWidget { 8 | @override 9 | _LegalAboutPageState createState() => _LegalAboutPageState(); 10 | } 11 | 12 | class _LegalAboutPageState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | backgroundColor: Colors.white, 17 | appBar: AppBar( 18 | iconTheme: IconThemeData( 19 | color: Colors.black, 20 | ), 21 | brightness: Brightness.light, 22 | backgroundColor: Colors.transparent, 23 | title: Text( 24 | 'Settings', 25 | style: TextStyle(color: darkGrey), 26 | ), 27 | elevation: 0, 28 | ), 29 | body: SafeArea( 30 | bottom: true, 31 | child: Padding( 32 | padding: const EdgeInsets.only(top:24.0,left: 24.0, right: 24.0), 33 | child: Column( 34 | crossAxisAlignment: CrossAxisAlignment.start, 35 | children: [ 36 | Padding( 37 | padding: const EdgeInsets.only(bottom: 16.0), 38 | child: Text( 39 | 'Legal & About', 40 | style: TextStyle( 41 | color: Colors.black, 42 | fontWeight: FontWeight.bold, 43 | fontSize: 18.0), 44 | ), 45 | ), 46 | Flexible( 47 | child: ListView( 48 | children: [ 49 | ListTile( 50 | title: Text('Terms of Use'), 51 | trailing: Icon(Icons.chevron_right), 52 | ), 53 | ListTile( 54 | title: Text('Privacy Policy'), 55 | trailing: Icon(Icons.chevron_right), 56 | ), 57 | ListTile( 58 | title: Text('License'), 59 | trailing: Icon(Icons.chevron_right), 60 | ), 61 | ListTile( 62 | title: Text('Seller Policy'), 63 | trailing: Icon(Icons.chevron_right), 64 | ), 65 | ListTile( 66 | title: Text('Return Policy'), 67 | trailing: Icon(Icons.chevron_right), 68 | ), 69 | ], 70 | ), 71 | ), 72 | ], 73 | ), 74 | ), 75 | ), 76 | ); 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /lib/screens/settings/notifications_settings_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:ecommerce_int2/app_properties.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class NotificationSettingsPage extends StatefulWidget { 8 | @override 9 | _NotificationSettingsPageState createState() => 10 | _NotificationSettingsPageState(); 11 | } 12 | 13 | class _NotificationSettingsPageState extends State { 14 | bool myOrders = true; 15 | bool reminders = true; 16 | bool newOffers = true; 17 | bool feedbackReviews = true; 18 | bool updates = true; 19 | 20 | Widget platformSwitch(bool val) { 21 | if (Platform.isIOS) { 22 | return CupertinoSwitch( 23 | onChanged: (value) { 24 | setState(() { 25 | val = value; 26 | }); 27 | }, 28 | value: true, 29 | activeColor: yellow, 30 | ); 31 | } else { 32 | return Switch( 33 | onChanged: (value) { 34 | setState(() { 35 | val = value; 36 | }); 37 | }, 38 | value: val, 39 | activeColor: yellow, 40 | ); 41 | } 42 | } 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | return Scaffold( 47 | backgroundColor: Colors.white, 48 | appBar: AppBar( 49 | iconTheme: IconThemeData( 50 | color: Colors.black, 51 | ), 52 | brightness: Brightness.light, 53 | backgroundColor: Colors.transparent, 54 | title: Text( 55 | 'Settings', 56 | style: TextStyle(color: darkGrey), 57 | ), 58 | elevation: 0, 59 | ), 60 | body: SafeArea( 61 | bottom: true, 62 | child: Padding( 63 | padding: const EdgeInsets.only(top:24.0,left: 24.0, right: 24.0), 64 | child: Column( 65 | crossAxisAlignment: CrossAxisAlignment.start, 66 | children: [ 67 | Padding( 68 | padding: const EdgeInsets.only(bottom: 16.0), 69 | child: Text( 70 | 'Notifications', 71 | style: TextStyle( 72 | color: Colors.black, 73 | fontWeight: FontWeight.bold, 74 | fontSize: 18.0), 75 | ), 76 | ), 77 | Flexible( 78 | child: ListView( 79 | children: [ 80 | ListTile( 81 | title: Text('My orders'), 82 | trailing: platformSwitch(myOrders), 83 | ), 84 | ListTile( 85 | title: Text('Reminders'), 86 | trailing: platformSwitch(reminders), 87 | ), 88 | ListTile( 89 | title: Text('New Offers'), 90 | trailing: platformSwitch(newOffers), 91 | ), 92 | ListTile( 93 | title: Text('Feedbacks and Reviews'), 94 | trailing: platformSwitch(feedbackReviews,) 95 | ), 96 | ListTile( 97 | title: Text('Updates'), 98 | trailing: platformSwitch(updates), 99 | ), 100 | ], 101 | ), 102 | ), 103 | ], 104 | ), 105 | ), 106 | ), 107 | ); 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /lib/screens/shop/components/credit_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CreditCard extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return Container( 7 | height: 200, 8 | width: 250, 9 | padding: EdgeInsets.all(16.0), 10 | decoration: BoxDecoration( 11 | color: Colors.deepPurple[700], 12 | borderRadius: BorderRadius.all(Radius.circular(10))), 13 | child: Column( 14 | mainAxisSize: MainAxisSize.min, 15 | crossAxisAlignment: CrossAxisAlignment.start, 16 | mainAxisAlignment: MainAxisAlignment.spaceAround, 17 | children: [ 18 | Text( 19 | 'CREDIT CARD', 20 | style: TextStyle(color: Colors.white), 21 | ), 22 | Container( 23 | height: 25, 24 | width: 40, 25 | color: Colors.white, 26 | ), 27 | Text( 28 | 'xxxx - xxxx - xxxx - 4951', 29 | style: TextStyle(color: Colors.white), 30 | ), 31 | Column( 32 | crossAxisAlignment: CrossAxisAlignment.start, 33 | children: [ 34 | Text( 35 | 'Name', 36 | style: TextStyle(color: Colors.grey), 37 | ), 38 | Text( 39 | 'GEORGE W BUSH', 40 | style: TextStyle(color: Colors.white), 41 | ), 42 | ], 43 | ) 44 | ], 45 | ), 46 | ); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/screens/splash_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:ecommerce_int2/app_properties.dart'; 2 | import 'package:ecommerce_int2/screens/auth/welcome_back_page.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class SplashScreen extends StatefulWidget { 6 | @override 7 | _SplashScreenState createState() => _SplashScreenState(); 8 | } 9 | 10 | class _SplashScreenState extends State 11 | with SingleTickerProviderStateMixin { 12 | late Animation opacity; 13 | late AnimationController controller; 14 | 15 | @override 16 | void initState() { 17 | super.initState(); 18 | controller = AnimationController( 19 | duration: Duration(milliseconds: 2500), vsync: this); 20 | opacity = Tween(begin: 1.0, end: 0.0).animate(controller) 21 | ..addListener(() { 22 | setState(() {}); 23 | }); 24 | controller.forward().then((_) { 25 | navigationPage(); 26 | }); 27 | } 28 | 29 | @override 30 | void dispose() { 31 | controller.dispose(); 32 | super.dispose(); 33 | } 34 | 35 | void navigationPage() { 36 | Navigator.of(context) 37 | .pushReplacement(MaterialPageRoute(builder: (_) => WelcomeBackPage())); 38 | } 39 | 40 | Widget build(BuildContext context) { 41 | return Container( 42 | decoration: BoxDecoration( 43 | image: DecorationImage( 44 | image: AssetImage('assets/background.jpg'), fit: BoxFit.cover)), 45 | child: Container( 46 | decoration: BoxDecoration(color: transparentYellow), 47 | child: SafeArea( 48 | child: new Scaffold( 49 | body: Column( 50 | children: [ 51 | Expanded( 52 | child: Opacity( 53 | opacity: opacity.value, 54 | child: new Image.asset('assets/logo.png')), 55 | ), 56 | Padding( 57 | padding: const EdgeInsets.all(8.0), 58 | child: RichText( 59 | text: TextSpan( 60 | style: TextStyle(color: Colors.black), 61 | children: [ 62 | TextSpan(text: 'Powered by '), 63 | TextSpan( 64 | text: 'int2.io', 65 | style: TextStyle(fontWeight: FontWeight.bold)) 66 | ]), 67 | ), 68 | ) 69 | ], 70 | ), 71 | ), 72 | ), 73 | ), 74 | ); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /linux/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral 2 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 10 | void fl_register_plugins(FlPluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /linux/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/dgph 7 | **/xcuserdata/ 8 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "ephemeral/Flutter-Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | 9 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 10 | } 11 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /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 = flutter_ecommerce_template 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.int2.flutterEcommerceTemplate 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2023 com.int2. All rights reserved. 15 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: ecommerce_int2 2 | description: It is about a complete ecommerce app for Android and iOS. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.1 15 | 16 | environment: 17 | sdk: '>=2.19.0 <3.0.0' 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^1.0.5 26 | card_swiper: ^2.0.4 27 | flutter_staggered_grid_view: ^0.6.2 28 | rubber: ^1.0.1 29 | pin_code_text_field: ^1.8.0 30 | http: ^0.13.4 31 | flutter_rating_bar: ^4.0.0 32 | intl: ^0.18.0 33 | numberpicker: ^2.1.1 34 | flutter_svg: ^2.0.2 35 | 36 | 37 | dev_dependencies: 38 | flutter_test: 39 | sdk: flutter 40 | flutter_launcher_icons: ^0.12.0 41 | build_runner: ^2.0.4 42 | json_serializable: ^6.6.1 43 | 44 | flutter_icons: 45 | android: "launcher_icon" 46 | ios: true 47 | image_path: "assets/icons/shopeLogo.png" 48 | 49 | 50 | # For information on the generic Dart part of this file, see the 51 | # following page: https://www.dartlang.org/tools/pub/pubspec 52 | 53 | # The following section is specific to Flutter. 54 | flutter: 55 | 56 | # The following line ensures that the Material Icons font is 57 | # included with your application, so that you can use the icons in 58 | # the material Icons class. 59 | uses-material-design: true 60 | 61 | assets: 62 | - assets/ 63 | - assets/icons/ 64 | 65 | # An image asset can refer to one or more resolution-specific "variants", see 66 | # https://flutter.io/assets-and-images/#resolution-aware. 67 | 68 | # For details regarding adding assets from package dependencies, see 69 | # https://flutter.io/assets-and-images/#from-packages 70 | 71 | # To add custom fonts to your application, add a fonts section here, 72 | # in this "flutter" section. Each entry in this list should have a 73 | # "family" key with the font family name, and a "fonts" key with a 74 | # list giving the asset and other descriptors for the font. For 75 | # example: 76 | fonts: 77 | - family: Montserrat 78 | fonts: 79 | - asset: fonts/Montserrat-Regular.ttf 80 | - family: NunitoSans 81 | fonts: 82 | - asset: fonts/NunitoSans-Regular.ttf 83 | 84 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:ecommerce_int2/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(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 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | flutter_ecommerce_template 33 | 34 | 35 | 39 | 40 | 41 | 42 | 43 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flutter_ecommerce_template", 3 | "short_name": "flutter_ecommerce_template", 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 10 | void RegisterPlugins(flutter::PluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /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/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.int2" "\0" 93 | VALUE "FileDescription", "flutter_ecommerce_template" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "flutter_ecommerce_template" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2023 com.int2. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "flutter_ecommerce_template.exe" "\0" 98 | VALUE "ProductName", "flutter_ecommerce_template" "\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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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"flutter_ecommerce_template", 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/robertodevs/flutter_ecommerce_template/cbe4b6ba309453fa84db6f1553467febf601a5ac/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------