├── .gitignore
├── .metadata
├── README.md
├── android
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── shopping_cart
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── fonts
├── helvetica
│ ├── HelveticaNeue Thin.ttf
│ ├── HelveticaNeue-Bold.ttf
│ ├── HelveticaNeue_BlackCond.ttf
│ ├── HelveticaNeue_Light.ttf
│ ├── HelveticaNeue_Medium.ttf
│ └── HelveticaNeue_Regular.ttf
├── lato_black.ttf
├── lato_bold.ttf
├── lato_light.ttf
├── lato_medium.ttf
├── lato_regular.ttf
└── lato_semibold.ttf
├── images
├── details_shoes_image.webp
├── ic_about_us.png
├── ic_chair.png
├── ic_chair1.png
├── ic_chair2.png
├── ic_chair4.png
├── ic_invite_friends.png
├── ic_logo.png
├── ic_logout.png
├── ic_notification.png
├── ic_payment.png
├── ic_promo_code.png
├── ic_qr_code.png
├── ic_qr_code.svg
├── ic_refer_friends_bg.jpg
├── ic_reward_credits.png
├── ic_search.png
├── ic_settings.png
├── ic_shopping_cart.png
├── ic_support.png
├── ic_table.png
├── ic_table1.png
├── ic_thank_you.png
├── ic_user_profile.png
├── shoes_1.png
├── shoes_2.png
├── shoes_3.png
├── shoes_4.png
├── shoes_5.png
├── shoes_6.png
├── shoes_7.png
└── slider_img.webp
├── ios
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
└── 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-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.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
├── clipper
│ └── CustomClipper.dart
├── home.dart
├── login.dart
├── main.dart
├── model
│ └── list_profile_section.dart
├── pages
│ ├── AboutUsPage.dart
│ ├── CartPage.dart
│ ├── CheckOutPage.dart
│ ├── EditProfilePage.dart
│ ├── HomePage.dart
│ ├── InviteFriendsPage.dart
│ ├── NotificationPage.dart
│ ├── OrderPlacePage.dart
│ ├── ProductDetailsPage.dart
│ ├── ProfilePage.dart
│ ├── ProfilePage1.dart
│ ├── SearchPage.dart
│ └── SeeAllProductPage.dart
├── signup.dart
└── utils
│ ├── BottomNavigationBarProvider.dart
│ ├── CustomBorder.dart
│ ├── CustomColors.dart
│ ├── CustomRoutes.dart
│ ├── CustomTextStyle.dart
│ └── CustomUtils.dart
├── pubspec.lock
├── pubspec.yaml
├── screenshot
├── Checkout.png
├── Edit Profile.png
├── Filter Bottom Sheet.png
├── Grid Item List.png
├── Home.png
├── Invite Friends.png
├── Login.png
├── Notification.png
├── Order Placed.png
├── Product Details.png
├── Profile.png
├── Search.png
├── Share App.png
├── Signup.png
└── cart.png
└── test
└── widget_test.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 |
32 | # Android related
33 | **/android/**/gradle-wrapper.jar
34 | **/android/.gradle
35 | **/android/captures/
36 | **/android/gradlew
37 | **/android/gradlew.bat
38 | **/android/local.properties
39 | **/android/**/GeneratedPluginRegistrant.java
40 |
41 | # iOS/XCode related
42 | **/ios/**/*.mode1v3
43 | **/ios/**/*.mode2v3
44 | **/ios/**/*.moved-aside
45 | **/ios/**/*.pbxuser
46 | **/ios/**/*.perspectivev3
47 | **/ios/**/*sync/
48 | **/ios/**/.sconsign.dblite
49 | **/ios/**/.tags*
50 | **/ios/**/.vagrant/
51 | **/ios/**/DerivedData/
52 | **/ios/**/Icon?
53 | **/ios/**/Pods/
54 | **/ios/**/.symlinks/
55 | **/ios/**/profile
56 | **/ios/**/xcuserdata
57 | **/ios/.generated/
58 | **/ios/Flutter/App.framework
59 | **/ios/Flutter/Flutter.framework
60 | **/ios/Flutter/Generated.xcconfig
61 | **/ios/Flutter/app.flx
62 | **/ios/Flutter/app.zip
63 | **/ios/Flutter/flutter_assets/
64 | **/ios/ServiceDefinitions.json
65 | **/ios/Runner/GeneratedPluginRegistrant.*
66 |
67 | # Exceptions to above rules.
68 | !**/ios/**/default.mode1v3
69 | !**/ios/**/default.mode2v3
70 | !**/ios/**/default.pbxuser
71 | !**/ios/**/default.perspectivev3
72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
73 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 09c09bf14b2323d176bb0355188d0d2b0b983bd6
8 | channel: master
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter Shopping Cart
2 |
3 | Migrate to the android embedding V2
4 |
5 | # Screenshot
6 |
7 |

8 |

9 |

10 |

11 |

12 |

13 |

14 |

15 |

16 |

17 |

18 |

19 |

20 |

21 |
22 |
--------------------------------------------------------------------------------
/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 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.shopping_cart"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | ndkVersion "22.1.7171670"
47 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
48 | }
49 |
50 | buildTypes {
51 | release {
52 | // TODO: Add your own signing config for the release build.
53 | // Signing with the debug keys for now, so `flutter run --release` works.
54 | signingConfig signingConfigs.debug
55 | }
56 | }
57 | }
58 |
59 | flutter {
60 | source '../..'
61 | }
62 |
63 | dependencies {
64 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
65 | testImplementation 'junit:junit:4.12'
66 | implementation 'com.google.android.material:material:1.2.1'
67 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
68 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
69 | }
70 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
13 |
20 |
24 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/shopping_cart/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.shopping_cart
2 |
3 | import android.content.Intent
4 | import android.os.Bundle
5 | import android.util.Log
6 |
7 | import io.flutter.embedding.android.FlutterActivity
8 | import io.flutter.embedding.engine.FlutterEngine
9 | import io.flutter.plugin.common.MethodChannel
10 | import io.flutter.plugins.GeneratedPluginRegistrant
11 |
12 | class MainActivity : FlutterActivity() {
13 | private val REQUEST_SHARE: Int = 101
14 | val CHANNEL = "flutter.native/helper"
15 |
16 | override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
17 | super.configureFlutterEngine(flutterEngine)
18 | GeneratedPluginRegistrant.registerWith(flutterEngine)
19 | MethodChannel(
20 | flutterEngine.dartExecutor.binaryMessenger,
21 | CHANNEL
22 | ).setMethodCallHandler { methodCall, result ->
23 | if (methodCall.method.equals("shareApp", true)) {
24 | Log.d("SHARE", "true")
25 | shareApp()
26 | result.success("Shared")
27 | }
28 | }
29 | }
30 |
31 | private fun shareApp() {
32 | val intent = Intent()
33 | intent.action = Intent.ACTION_SEND_MULTIPLE
34 | intent.type = "*/*"
35 | intent.putExtra(Intent.EXTRA_TEXT, "Share App Link")
36 | startActivityForResult(intent, REQUEST_SHARE)
37 |
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.5.30'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.6.1'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | 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 | #Sat Jan 08 17:05:50 IST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/fonts/helvetica/HelveticaNeue Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/fonts/helvetica/HelveticaNeue Thin.ttf
--------------------------------------------------------------------------------
/fonts/helvetica/HelveticaNeue-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/fonts/helvetica/HelveticaNeue-Bold.ttf
--------------------------------------------------------------------------------
/fonts/helvetica/HelveticaNeue_BlackCond.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/fonts/helvetica/HelveticaNeue_BlackCond.ttf
--------------------------------------------------------------------------------
/fonts/helvetica/HelveticaNeue_Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/fonts/helvetica/HelveticaNeue_Light.ttf
--------------------------------------------------------------------------------
/fonts/helvetica/HelveticaNeue_Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/fonts/helvetica/HelveticaNeue_Medium.ttf
--------------------------------------------------------------------------------
/fonts/helvetica/HelveticaNeue_Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/fonts/helvetica/HelveticaNeue_Regular.ttf
--------------------------------------------------------------------------------
/fonts/lato_black.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/fonts/lato_black.ttf
--------------------------------------------------------------------------------
/fonts/lato_bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/fonts/lato_bold.ttf
--------------------------------------------------------------------------------
/fonts/lato_light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/fonts/lato_light.ttf
--------------------------------------------------------------------------------
/fonts/lato_medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/fonts/lato_medium.ttf
--------------------------------------------------------------------------------
/fonts/lato_regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/fonts/lato_regular.ttf
--------------------------------------------------------------------------------
/fonts/lato_semibold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/fonts/lato_semibold.ttf
--------------------------------------------------------------------------------
/images/details_shoes_image.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/details_shoes_image.webp
--------------------------------------------------------------------------------
/images/ic_about_us.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_about_us.png
--------------------------------------------------------------------------------
/images/ic_chair.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_chair.png
--------------------------------------------------------------------------------
/images/ic_chair1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_chair1.png
--------------------------------------------------------------------------------
/images/ic_chair2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_chair2.png
--------------------------------------------------------------------------------
/images/ic_chair4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_chair4.png
--------------------------------------------------------------------------------
/images/ic_invite_friends.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_invite_friends.png
--------------------------------------------------------------------------------
/images/ic_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_logo.png
--------------------------------------------------------------------------------
/images/ic_logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_logout.png
--------------------------------------------------------------------------------
/images/ic_notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_notification.png
--------------------------------------------------------------------------------
/images/ic_payment.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_payment.png
--------------------------------------------------------------------------------
/images/ic_promo_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_promo_code.png
--------------------------------------------------------------------------------
/images/ic_qr_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_qr_code.png
--------------------------------------------------------------------------------
/images/ic_qr_code.svg:
--------------------------------------------------------------------------------
1 |
2 |
52 |
--------------------------------------------------------------------------------
/images/ic_refer_friends_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_refer_friends_bg.jpg
--------------------------------------------------------------------------------
/images/ic_reward_credits.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_reward_credits.png
--------------------------------------------------------------------------------
/images/ic_search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_search.png
--------------------------------------------------------------------------------
/images/ic_settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_settings.png
--------------------------------------------------------------------------------
/images/ic_shopping_cart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_shopping_cart.png
--------------------------------------------------------------------------------
/images/ic_support.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_support.png
--------------------------------------------------------------------------------
/images/ic_table.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_table.png
--------------------------------------------------------------------------------
/images/ic_table1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_table1.png
--------------------------------------------------------------------------------
/images/ic_thank_you.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_thank_you.png
--------------------------------------------------------------------------------
/images/ic_user_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/ic_user_profile.png
--------------------------------------------------------------------------------
/images/shoes_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/shoes_1.png
--------------------------------------------------------------------------------
/images/shoes_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/shoes_2.png
--------------------------------------------------------------------------------
/images/shoes_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/shoes_3.png
--------------------------------------------------------------------------------
/images/shoes_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/shoes_4.png
--------------------------------------------------------------------------------
/images/shoes_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/shoes_5.png
--------------------------------------------------------------------------------
/images/shoes_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/shoes_6.png
--------------------------------------------------------------------------------
/images/shoes_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/shoes_7.png
--------------------------------------------------------------------------------
/images/slider_img.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/images/slider_img.webp
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
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 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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: [UIApplicationLaunchOptionsKey: 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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/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 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | shopping_cart
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/lib/clipper/CustomClipper.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CustomArcClipper extends CustomClipper {
4 | @override
5 | Path getClip(Size size) {
6 | Path path = new Path();
7 | path.lineTo(0, size.height);
8 | path.arcToPoint(Offset(size.width, size.height),
9 | radius: Radius.elliptical(30, 10));
10 | path.lineTo(size.width, 0);
11 | path.close();
12 | return path;
13 | }
14 |
15 | @override
16 | bool shouldReclip(CustomClipper oldClipper) {
17 | return true;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/home.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/pages/CartPage.dart';
3 | import 'package:shopping_cart/pages/HomePage.dart';
4 | import 'package:shopping_cart/pages/ProfilePage.dart';
5 | import 'package:shopping_cart/pages/ProfilePage1.dart';
6 | import 'package:shopping_cart/pages/SearchPage.dart';
7 |
8 | class Home extends StatefulWidget {
9 | @override
10 | _HomeState createState() => _HomeState();
11 | }
12 |
13 | class _HomeState extends State {
14 | int selectedPosition = 0;
15 | List listBottomWidget = new List();
16 |
17 | @override
18 | void initState() {
19 | // TODO: implement initState
20 | super.initState();
21 | addHomePage();
22 | }
23 |
24 | @override
25 | Widget build(BuildContext context) {
26 | return Scaffold(
27 | backgroundColor: Colors.grey.shade100,
28 | bottomNavigationBar: BottomNavigationBar(
29 | items: [
30 | BottomNavigationBarItem(icon: Icon(Icons.home), title: Text("Home")),
31 | BottomNavigationBarItem(
32 | icon: Icon(Icons.search), title: Text("Search")),
33 | BottomNavigationBarItem(
34 | icon: Icon(Icons.shopping_cart), title: Text("Cart")),
35 | BottomNavigationBarItem(
36 | icon: Icon(Icons.person), title: Text("Account")),
37 | ],
38 | currentIndex: selectedPosition,
39 | type: BottomNavigationBarType.fixed,
40 | backgroundColor: Colors.grey.shade100,
41 | selectedItemColor: Colors.blue,
42 | unselectedItemColor: Colors.black,
43 | onTap: (position) {
44 | setState(() {
45 | selectedPosition = position;
46 | });
47 | },
48 | ),
49 | body: Builder(builder: (context) {
50 | return listBottomWidget[selectedPosition];
51 | }),
52 | );
53 | }
54 |
55 | void addHomePage() {
56 | listBottomWidget.add(HomePage());
57 | listBottomWidget.add(SearchPage());
58 | listBottomWidget.add(CartPage());
59 | listBottomWidget.add(ProfilePage1());
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/lib/login.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/signup.dart';
3 | import 'package:shopping_cart/utils/CustomBorder.dart';
4 | import 'package:shopping_cart/utils/CustomColors.dart';
5 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
6 | import 'package:shopping_cart/utils/CustomUtils.dart';
7 |
8 | import 'home.dart';
9 |
10 | class Login extends StatefulWidget {
11 | @override
12 | _LoginState createState() => _LoginState();
13 | }
14 |
15 | class _LoginState extends State {
16 | @override
17 | Widget build(BuildContext context) {
18 | return Scaffold(
19 | backgroundColor: Colors.white,
20 | resizeToAvoidBottomInset: false,
21 | body: Builder(builder: (context) {
22 | return Container(
23 | width: double.infinity,
24 | child: Column(
25 | children: [
26 | Expanded(
27 | child: Image(
28 | image: AssetImage("images/ic_logo.png"),
29 | color: Colors.blue,
30 | height: 140,
31 | alignment: Alignment.center,
32 | width: 200),
33 | flex: 40,
34 | ),
35 | Expanded(
36 | child: Container(
37 | margin: EdgeInsets.all(16),
38 | child: Column(
39 | children: [
40 | TextFormField(
41 | decoration: InputDecoration(
42 | contentPadding: EdgeInsets.fromLTRB(16, 16, 16, 12),
43 | border: CustomBorder.enabledBorder,
44 | labelText: "Mobile No. or Email",
45 | focusedBorder: CustomBorder.focusBorder,
46 | errorBorder: CustomBorder.errorBorder,
47 | enabledBorder: CustomBorder.enabledBorder,
48 | labelStyle: CustomTextStyle.textFormFieldMedium
49 | .copyWith(fontSize: MediaQuery.of(context).textScaleFactor * 16, color: Colors.black)),
50 | ),
51 | Utils.getSizedBox(height: 20),
52 | TextFormField(
53 | decoration: InputDecoration(
54 | contentPadding: EdgeInsets.fromLTRB(16, 16, 16, 12),
55 | border: CustomBorder.enabledBorder,
56 | labelText: "Password",
57 | focusedBorder: CustomBorder.focusBorder,
58 | errorBorder: CustomBorder.errorBorder,
59 | enabledBorder: CustomBorder.enabledBorder,
60 | labelStyle: CustomTextStyle.textFormFieldMedium
61 | .copyWith(fontSize: MediaQuery.of(context).textScaleFactor * 16, color: Colors.black)),
62 | obscureText: true,
63 | ),
64 | Utils.getSizedBox(height: 20),
65 | Container(
66 | width: double.infinity,
67 | child: RaisedButton(
68 | onPressed: () {
69 | Navigator.pushReplacement(context, new MaterialPageRoute(builder: (context) => Home()));
70 | },
71 | child: Text(
72 | "LOGIN",
73 | style: CustomTextStyle.textFormFieldRegular.copyWith(color: Colors.white, fontSize: 14),
74 | ),
75 | color: Colors.blue,
76 | textColor: Colors.white,
77 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4))),
78 | ),
79 | ),
80 | Utils.getSizedBox(height: 10),
81 | Container(
82 | alignment: Alignment.centerRight,
83 | child: GestureDetector(
84 | child: Text(
85 | "Forget Password?",
86 | style: CustomTextStyle.textFormFieldBold.copyWith(color: Colors.blue, fontSize: 14),
87 | ),
88 | ),
89 | ),
90 | Utils.getSizedBox(height: 10),
91 | Row(
92 | children: [
93 | Expanded(
94 | child: Container(
95 | color: Colors.grey.shade200,
96 | margin: EdgeInsets.only(right: 16),
97 | height: 1,
98 | ),
99 | flex: 40,
100 | ),
101 | Text(
102 | "Or",
103 | style: CustomTextStyle.textFormFieldMedium.copyWith(fontSize: 14),
104 | ),
105 | Expanded(
106 | child: Container(
107 | color: Colors.grey.shade200,
108 | margin: EdgeInsets.only(left: 16),
109 | height: 1,
110 | ),
111 | flex: 40,
112 | )
113 | ],
114 | ),
115 | Utils.getSizedBox(height: 14),
116 | Container(
117 | width: double.infinity,
118 | child: RaisedButton(
119 | onPressed: () {},
120 | child: Text(
121 | "FACEBOOK LOGIN",
122 | style: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.white, fontSize: 14),
123 | ),
124 | color: CustomColors.COLOR_FB,
125 | textColor: Colors.white,
126 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4))),
127 | ),
128 | ),
129 | Utils.getSizedBox(height: 10),
130 | Row(
131 | mainAxisAlignment: MainAxisAlignment.center,
132 | children: [
133 | Text(
134 | "Don't have an account?",
135 | style: CustomTextStyle.textFormFieldMedium.copyWith(fontSize: 14),
136 | ),
137 | Utils.getSizedBox(width: 4),
138 | GestureDetector(
139 | child: Text(
140 | "Sign Up",
141 | style: CustomTextStyle.textFormFieldBold.copyWith(fontSize: 14, color: Colors.blue),
142 | ),
143 | onTap: () {
144 | Navigator.of(context).push(new MaterialPageRoute(builder: (context) => SignUp()));
145 | },
146 | ),
147 | ],
148 | )
149 | ],
150 | ),
151 | ),
152 | flex: 60,
153 | )
154 | ],
155 | ),
156 | );
157 | }),
158 | );
159 | }
160 | }
161 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | import 'login.dart';
6 |
7 | void main() => runApp(new MaterialApp(
8 | home: MyApp(),
9 | debugShowCheckedModeBanner: false,
10 | routes: {},
11 | ));
12 |
13 | class MyApp extends StatefulWidget {
14 | @override
15 | _MyAppState createState() => _MyAppState();
16 | }
17 |
18 | class _MyAppState extends State {
19 | navigatePage() {
20 | Navigator.of(context).pushReplacement(new MaterialPageRoute(builder: (context) => Login()));
21 | }
22 |
23 | splashMove() {
24 | return Timer(Duration(seconds: 4), navigatePage);
25 | }
26 |
27 | @override
28 | void initState() {
29 | super.initState();
30 | splashMove();
31 | }
32 |
33 | @override
34 | Widget build(BuildContext context) {
35 | return Scaffold(
36 | resizeToAvoidBottomInset: false,
37 | body: Container(
38 | color: Colors.white,
39 | child: Center(
40 | child: Image(
41 | image: AssetImage("images/ic_logo.png"),
42 | height: 140,
43 | width: 140,
44 | ),
45 | )),
46 | );
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/lib/model/list_profile_section.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:flutter/material.dart';
4 |
5 | class ListProfileSection {
6 | String title;
7 | String icon;
8 | Color color;
9 | Widget widget;
10 |
11 | ListProfileSection(this.title, this.icon, this.color, this.widget);
12 | }
13 |
--------------------------------------------------------------------------------
/lib/pages/AboutUsPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
3 |
4 | class AboutPage extends StatefulWidget {
5 | @override
6 | _AboutPageState createState() => _AboutPageState();
7 | }
8 |
9 | class _AboutPageState extends State {
10 | @override
11 | Widget build(BuildContext context) {
12 | return Scaffold(
13 | backgroundColor: Colors.white,
14 | appBar: AppBar(
15 | backgroundColor: Colors.white,
16 | title: Text(
17 | "About Us",
18 | style: CustomTextStyle.textFormFieldBold.copyWith(fontSize: 18),
19 | ),
20 | leading: IconButton(
21 | icon: Icon(
22 | Icons.arrow_back,
23 | color: Colors.black,
24 | ),
25 | onPressed: () {
26 | Navigator.of(context).pop();
27 | }),
28 | ),
29 | body: SingleChildScrollView(
30 | child: Container(
31 | color: Colors.white,
32 | padding: EdgeInsets.all(8),
33 | child: Text(
34 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry.\n\nLorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \nIt has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.\n \nIt was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. \nIt is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. \n\nThe point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page \neditors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy.\n Various versions have evolved over the years, sometimes by accident, sometimes on purpose\n (injected humour and the like).",
35 | style: CustomTextStyle.textFormFieldMedium
36 | .copyWith(fontSize: 16, color: Colors.grey.shade800),
37 | ),
38 | ),
39 | ),
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/pages/CartPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
3 | import 'package:shopping_cart/utils/CustomUtils.dart';
4 |
5 | import 'CheckOutPage.dart';
6 |
7 | class CartPage extends StatefulWidget {
8 | @override
9 | _CartPageState createState() => _CartPageState();
10 | }
11 |
12 | class _CartPageState extends State {
13 | @override
14 | Widget build(BuildContext context) {
15 | return Scaffold(
16 | resizeToAvoidBottomInset: false,
17 | backgroundColor: Colors.grey.shade100,
18 | body: Builder(
19 | builder: (context) {
20 | return ListView(
21 | children: [createHeader(), createSubTitle(), createCartList(), footer(context)],
22 | );
23 | },
24 | ),
25 | );
26 | }
27 |
28 | footer(BuildContext context) {
29 | return Container(
30 | child: Column(
31 | crossAxisAlignment: CrossAxisAlignment.center,
32 | mainAxisAlignment: MainAxisAlignment.end,
33 | children: [
34 | Row(
35 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
36 | children: [
37 | Container(
38 | margin: EdgeInsets.only(left: 30),
39 | child: Text(
40 | "Total",
41 | style: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.grey, fontSize: 12),
42 | ),
43 | ),
44 | Container(
45 | margin: EdgeInsets.only(right: 30),
46 | child: Text(
47 | "\$299.00",
48 | style: CustomTextStyle.textFormFieldBlack.copyWith(color: Colors.greenAccent.shade700, fontSize: 14),
49 | ),
50 | ),
51 | ],
52 | ),
53 | Utils.getSizedBox(height: 8),
54 | RaisedButton(
55 | onPressed: () {
56 | Navigator.push(context, new MaterialPageRoute(builder: (context) => CheckOutPage()));
57 | },
58 | color: Colors.green,
59 | padding: EdgeInsets.only(top: 12, left: 60, right: 60, bottom: 12),
60 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(24))),
61 | child: Text(
62 | "Checkout",
63 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(color: Colors.white),
64 | ),
65 | ),
66 | Utils.getSizedBox(height: 8),
67 | ],
68 | ),
69 | margin: EdgeInsets.only(top: 16),
70 | );
71 | }
72 |
73 | createHeader() {
74 | return Container(
75 | alignment: Alignment.topLeft,
76 | child: Text(
77 | "SHOPPING CART",
78 | style: CustomTextStyle.textFormFieldBold.copyWith(fontSize: 16, color: Colors.black),
79 | ),
80 | margin: EdgeInsets.only(left: 12, top: 12),
81 | );
82 | }
83 |
84 | createSubTitle() {
85 | return Container(
86 | alignment: Alignment.topLeft,
87 | child: Text(
88 | "Total(3) Items",
89 | style: CustomTextStyle.textFormFieldBold.copyWith(fontSize: 12, color: Colors.grey),
90 | ),
91 | margin: EdgeInsets.only(left: 12, top: 4),
92 | );
93 | }
94 |
95 | createCartList() {
96 | return ListView.builder(
97 | shrinkWrap: true,
98 | primary: false,
99 | itemBuilder: (context, position) {
100 | return createCartListItem();
101 | },
102 | itemCount: 5,
103 | );
104 | }
105 |
106 | createCartListItem() {
107 | return Stack(
108 | children: [
109 | Container(
110 | margin: EdgeInsets.only(left: 16, right: 16, top: 16),
111 | decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(16))),
112 | child: Row(
113 | children: [
114 | Container(
115 | margin: EdgeInsets.only(right: 8, left: 8, top: 8, bottom: 8),
116 | width: 80,
117 | height: 80,
118 | decoration: BoxDecoration(
119 | borderRadius: BorderRadius.all(Radius.circular(14)),
120 | color: Colors.blue.shade200,
121 | image: DecorationImage(image: AssetImage("images/shoes_1.png"))),
122 | ),
123 | Expanded(
124 | child: Container(
125 | padding: const EdgeInsets.all(8.0),
126 | child: Column(
127 | mainAxisSize: MainAxisSize.max,
128 | crossAxisAlignment: CrossAxisAlignment.start,
129 | children: [
130 | Container(
131 | padding: EdgeInsets.only(right: 8, top: 4),
132 | child: Text(
133 | "NIKE XTM Basketball Shoeas",
134 | maxLines: 2,
135 | softWrap: true,
136 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(fontSize: 14),
137 | ),
138 | ),
139 | Utils.getSizedBox(height: 6),
140 | Text(
141 | "Green M",
142 | style: CustomTextStyle.textFormFieldRegular.copyWith(color: Colors.grey, fontSize: 14),
143 | ),
144 | Container(
145 | child: Row(
146 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
147 | children: [
148 | Text(
149 | "\$299.00",
150 | style: CustomTextStyle.textFormFieldBlack.copyWith(color: Colors.green),
151 | ),
152 | Padding(
153 | padding: const EdgeInsets.all(8.0),
154 | child: Row(
155 | mainAxisAlignment: MainAxisAlignment.center,
156 | crossAxisAlignment: CrossAxisAlignment.end,
157 | children: [
158 | Icon(
159 | Icons.remove,
160 | size: 24,
161 | color: Colors.grey.shade700,
162 | ),
163 | Container(
164 | color: Colors.grey.shade200,
165 | padding: const EdgeInsets.only(bottom: 2, right: 12, left: 12),
166 | child: Text(
167 | "1",
168 | style: CustomTextStyle.textFormFieldSemiBold,
169 | ),
170 | ),
171 | Icon(
172 | Icons.add,
173 | size: 24,
174 | color: Colors.grey.shade700,
175 | )
176 | ],
177 | ),
178 | )
179 | ],
180 | ),
181 | ),
182 | ],
183 | ),
184 | ),
185 | flex: 100,
186 | )
187 | ],
188 | ),
189 | ),
190 | Align(
191 | alignment: Alignment.topRight,
192 | child: Container(
193 | width: 24,
194 | height: 24,
195 | alignment: Alignment.center,
196 | margin: EdgeInsets.only(right: 10, top: 8),
197 | child: Icon(
198 | Icons.close,
199 | color: Colors.white,
200 | size: 20,
201 | ),
202 | decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(4)), color: Colors.green),
203 | ),
204 | )
205 | ],
206 | );
207 | }
208 | }
209 |
--------------------------------------------------------------------------------
/lib/pages/CheckOutPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:money_formatter/money_formatter.dart';
3 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
4 |
5 | class CheckOutPage extends StatefulWidget {
6 | @override
7 | _CheckOutPageState createState() => _CheckOutPageState();
8 | }
9 |
10 | class _CheckOutPageState extends State {
11 | GlobalKey _scaffoldKey = new GlobalKey();
12 |
13 | @override
14 | Widget build(BuildContext context) {
15 | return MaterialApp(
16 | home: Scaffold(
17 | key: _scaffoldKey,
18 | resizeToAvoidBottomInset: false,
19 | appBar: AppBar(
20 | backgroundColor: Colors.white,
21 | leading: IconButton(
22 | icon: Icon(Icons.arrow_back,color: Colors.black,),
23 | onPressed: () {
24 | Navigator.pop(context);
25 | }),
26 | title: Text(
27 | "ADDRESS",
28 | style: TextStyle(color: Colors.black, fontSize: 14),
29 | ),
30 | ),
31 | body: Builder(builder: (context) {
32 | return Column(
33 | children: [
34 | Expanded(
35 | child: Container(
36 | child: ListView(
37 | children: [selectedAddressSection(), standardDelivery(), checkoutItem(), priceSection()],
38 | ),
39 | ),
40 | flex: 90,
41 | ),
42 | Expanded(
43 | child: Container(
44 | width: double.infinity,
45 | margin: EdgeInsets.symmetric(vertical: 8, horizontal: 12),
46 | child: RaisedButton(
47 | onPressed: () {
48 | /*Navigator.of(context).push(new MaterialPageRoute(
49 | builder: (context) => OrderPlacePage()));*/
50 | showThankYouBottomSheet(context);
51 | },
52 | child: Text(
53 | "Place Order",
54 | style: CustomTextStyle.textFormFieldMedium
55 | .copyWith(color: Colors.white, fontSize: 14, fontWeight: FontWeight.bold),
56 | ),
57 | color: Colors.pink,
58 | textColor: Colors.white,
59 | ),
60 | ),
61 | flex: 10,
62 | )
63 | ],
64 | );
65 | }),
66 | ),
67 | );
68 | }
69 |
70 | showThankYouBottomSheet(BuildContext context) {
71 | return _scaffoldKey.currentState.showBottomSheet((context) {
72 | return Container(
73 | height: 400,
74 | decoration: BoxDecoration(
75 | color: Colors.white,
76 | border: Border.all(color: Colors.grey.shade200, width: 2),
77 | borderRadius: BorderRadius.only(topRight: Radius.circular(16), topLeft: Radius.circular(16))),
78 | child: Column(
79 | children: [
80 | Expanded(
81 | child: Container(
82 | child: Align(
83 | alignment: Alignment.bottomCenter,
84 | child: Image(
85 | image: AssetImage("images/ic_thank_you.png"),
86 | width: 300,
87 | ),
88 | ),
89 | ),
90 | flex: 5,
91 | ),
92 | Expanded(
93 | child: Container(
94 | margin: EdgeInsets.only(left: 16, right: 16),
95 | child: Column(
96 | children: [
97 | RichText(
98 | textAlign: TextAlign.center,
99 | text: TextSpan(children: [
100 | TextSpan(
101 | text:
102 | "\n\nThank you for your purchase. Our company values each and every customer. We strive to provide state-of-the-art devices that respond to our clients’ individual needs. If you have any questions or feedback, please don’t hesitate to reach out.",
103 | style:
104 | CustomTextStyle.textFormFieldMedium.copyWith(fontSize: 14, color: Colors.grey.shade800),
105 | )
106 | ])),
107 | SizedBox(
108 | height: 24,
109 | ),
110 | RaisedButton(
111 | onPressed: () {},
112 | padding: EdgeInsets.only(left: 48, right: 48),
113 | child: Text(
114 | "Track Order",
115 | style: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.white),
116 | ),
117 | color: Colors.pink,
118 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(24))),
119 | )
120 | ],
121 | ),
122 | ),
123 | flex: 5,
124 | )
125 | ],
126 | ),
127 | );
128 | },
129 | shape: RoundedRectangleBorder(
130 | borderRadius: BorderRadius.only(topLeft: Radius.circular(16), topRight: Radius.circular(16))),
131 | backgroundColor: Colors.white,
132 | elevation: 2);
133 | }
134 |
135 | selectedAddressSection() {
136 | return Container(
137 | margin: EdgeInsets.all(4),
138 | decoration: BoxDecoration(
139 | borderRadius: BorderRadius.all(Radius.circular(4)),
140 | ),
141 | child: Card(
142 | elevation: 0,
143 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4))),
144 | child: Container(
145 | decoration: BoxDecoration(
146 | borderRadius: BorderRadius.all(Radius.circular(4)), border: Border.all(color: Colors.grey.shade200)),
147 | padding: EdgeInsets.only(left: 12, top: 8, right: 12),
148 | child: Column(
149 | crossAxisAlignment: CrossAxisAlignment.start,
150 | children: [
151 | SizedBox(
152 | height: 6,
153 | ),
154 | Row(
155 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
156 | children: [
157 | Text(
158 | "James Francois (Default)",
159 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(fontSize: 14),
160 | ),
161 | Container(
162 | padding: EdgeInsets.only(left: 8, right: 8, top: 4, bottom: 4),
163 | decoration: BoxDecoration(
164 | shape: BoxShape.rectangle,
165 | color: Colors.grey.shade300,
166 | borderRadius: BorderRadius.all(Radius.circular(16))),
167 | child: Text(
168 | "HOME",
169 | style:
170 | CustomTextStyle.textFormFieldBlack.copyWith(color: Colors.indigoAccent.shade200, fontSize: 8),
171 | ),
172 | )
173 | ],
174 | ),
175 | createAddressText("431, Commerce House, Nagindas Master, Fort", 16),
176 | createAddressText("Mumbai - 400023", 6),
177 | createAddressText("Maharashtra", 6),
178 | SizedBox(
179 | height: 6,
180 | ),
181 | RichText(
182 | text: TextSpan(children: [
183 | TextSpan(
184 | text: "Mobile : ",
185 | style: CustomTextStyle.textFormFieldMedium.copyWith(fontSize: 12, color: Colors.grey.shade800)),
186 | TextSpan(
187 | text: "02222673745",
188 | style: CustomTextStyle.textFormFieldBold.copyWith(color: Colors.black, fontSize: 12)),
189 | ]),
190 | ),
191 | SizedBox(
192 | height: 16,
193 | ),
194 | Container(
195 | color: Colors.grey.shade300,
196 | height: 1,
197 | width: double.infinity,
198 | ),
199 | addressAction()
200 | ],
201 | ),
202 | ),
203 | ),
204 | );
205 | }
206 |
207 | createAddressText(String strAddress, double topMargin) {
208 | return Container(
209 | margin: EdgeInsets.only(top: topMargin),
210 | child: Text(
211 | strAddress,
212 | style: CustomTextStyle.textFormFieldMedium.copyWith(fontSize: 12, color: Colors.grey.shade800),
213 | ),
214 | );
215 | }
216 |
217 | addressAction() {
218 | return Container(
219 | child: Row(
220 | children: [
221 | Spacer(
222 | flex: 2,
223 | ),
224 | FlatButton(
225 | onPressed: () {},
226 | child: Text(
227 | "Edit / Change",
228 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(fontSize: 12, color: Colors.indigo.shade700),
229 | ),
230 | splashColor: Colors.transparent,
231 | highlightColor: Colors.transparent,
232 | ),
233 | Spacer(
234 | flex: 3,
235 | ),
236 | Container(
237 | height: 20,
238 | width: 1,
239 | color: Colors.grey,
240 | ),
241 | Spacer(
242 | flex: 3,
243 | ),
244 | FlatButton(
245 | onPressed: () {},
246 | child: Text("Add New Address",
247 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(fontSize: 12, color: Colors.indigo.shade700)),
248 | splashColor: Colors.transparent,
249 | highlightColor: Colors.transparent,
250 | ),
251 | Spacer(
252 | flex: 2,
253 | ),
254 | ],
255 | ),
256 | );
257 | }
258 |
259 | standardDelivery() {
260 | return Container(
261 | decoration: BoxDecoration(
262 | borderRadius: BorderRadius.all(Radius.circular(4)),
263 | border: Border.all(color: Colors.tealAccent.withOpacity(0.4), width: 1),
264 | color: Colors.tealAccent.withOpacity(0.2)),
265 | margin: EdgeInsets.all(8),
266 | child: Row(
267 | mainAxisAlignment: MainAxisAlignment.start,
268 | children: [
269 | Radio(
270 | value: 1,
271 | groupValue: 1,
272 | onChanged: (isChecked) {},
273 | activeColor: Colors.tealAccent.shade400,
274 | ),
275 | Column(
276 | crossAxisAlignment: CrossAxisAlignment.start,
277 | mainAxisAlignment: MainAxisAlignment.center,
278 | children: [
279 | Text(
280 | "Standard Delivery",
281 | style: CustomTextStyle.textFormFieldMedium
282 | .copyWith(color: Colors.black, fontSize: 14, fontWeight: FontWeight.w600),
283 | ),
284 | SizedBox(
285 | height: 5,
286 | ),
287 | Text(
288 | "Get it by 20 jul - 27 jul | Free Delivery",
289 | style: CustomTextStyle.textFormFieldMedium.copyWith(
290 | color: Colors.black,
291 | fontSize: 12,
292 | ),
293 | )
294 | ],
295 | ),
296 | ],
297 | ),
298 | );
299 | }
300 |
301 | checkoutItem() {
302 | return Container(
303 | margin: EdgeInsets.all(4),
304 | decoration: BoxDecoration(
305 | borderRadius: BorderRadius.all(Radius.circular(4)),
306 | ),
307 | child: Card(
308 | elevation: 0,
309 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4))),
310 | child: Container(
311 | decoration: BoxDecoration(
312 | borderRadius: BorderRadius.all(Radius.circular(4)), border: Border.all(color: Colors.grey.shade200)),
313 | padding: EdgeInsets.only(left: 12, top: 8, right: 12, bottom: 8),
314 | child: ListView.builder(
315 | itemBuilder: (context, position) {
316 | return checkoutListItem();
317 | },
318 | itemCount: 3,
319 | shrinkWrap: true,
320 | primary: false,
321 | scrollDirection: Axis.vertical,
322 | ),
323 | ),
324 | ),
325 | );
326 | }
327 |
328 | checkoutListItem() {
329 | return Container(
330 | margin: EdgeInsets.symmetric(vertical: 4),
331 | child: Row(
332 | children: [
333 | Container(
334 | child: Image(
335 | image: AssetImage(
336 | "images/details_shoes_image.webp",
337 | ),
338 | width: 35,
339 | height: 45,
340 | fit: BoxFit.fitHeight,
341 | ),
342 | decoration: BoxDecoration(border: Border.all(color: Colors.grey, width: 1)),
343 | ),
344 | SizedBox(
345 | width: 8,
346 | ),
347 | RichText(
348 | text: TextSpan(children: [
349 | TextSpan(
350 | text: "Estimated Delivery : ", style: CustomTextStyle.textFormFieldMedium.copyWith(fontSize: 12)),
351 | TextSpan(
352 | text: "21 Jul 2019 ",
353 | style: CustomTextStyle.textFormFieldMedium.copyWith(fontSize: 12, fontWeight: FontWeight.w600))
354 | ]),
355 | )
356 | ],
357 | ),
358 | );
359 | }
360 |
361 | priceSection() {
362 | return Container(
363 | margin: EdgeInsets.all(4),
364 | decoration: BoxDecoration(
365 | borderRadius: BorderRadius.all(Radius.circular(4)),
366 | ),
367 | child: Card(
368 | elevation: 0,
369 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4))),
370 | child: Container(
371 | decoration: BoxDecoration(
372 | borderRadius: BorderRadius.all(Radius.circular(4)), border: Border.all(color: Colors.grey.shade200)),
373 | padding: EdgeInsets.only(left: 12, top: 8, right: 12, bottom: 8),
374 | child: Column(
375 | crossAxisAlignment: CrossAxisAlignment.start,
376 | children: [
377 | SizedBox(
378 | height: 4,
379 | ),
380 | Text(
381 | "PRICE DETAILS",
382 | style: CustomTextStyle.textFormFieldMedium
383 | .copyWith(fontSize: 12, color: Colors.black, fontWeight: FontWeight.w600),
384 | ),
385 | SizedBox(
386 | height: 4,
387 | ),
388 | Container(
389 | width: double.infinity,
390 | height: 0.5,
391 | margin: EdgeInsets.symmetric(vertical: 4),
392 | color: Colors.grey.shade400,
393 | ),
394 | SizedBox(
395 | height: 8,
396 | ),
397 | createPriceItem("Total MRP", getFormattedCurrency(5197), Colors.grey.shade700),
398 | createPriceItem("Bag discount", getFormattedCurrency(3280), Colors.teal.shade300),
399 | createPriceItem("Tax", getFormattedCurrency(96), Colors.grey.shade700),
400 | createPriceItem("Order Total", getFormattedCurrency(2013), Colors.grey.shade700),
401 | createPriceItem("Delievery Charges", "FREE", Colors.teal.shade300),
402 | SizedBox(
403 | height: 8,
404 | ),
405 | Container(
406 | width: double.infinity,
407 | height: 0.5,
408 | margin: EdgeInsets.symmetric(vertical: 4),
409 | color: Colors.grey.shade400,
410 | ),
411 | SizedBox(
412 | height: 8,
413 | ),
414 | Row(
415 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
416 | crossAxisAlignment: CrossAxisAlignment.start,
417 | children: [
418 | Text(
419 | "Total",
420 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(color: Colors.black, fontSize: 12),
421 | ),
422 | Text(
423 | getFormattedCurrency(2013),
424 | style: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.black, fontSize: 12),
425 | )
426 | ],
427 | )
428 | ],
429 | ),
430 | ),
431 | ),
432 | );
433 | }
434 |
435 | String getFormattedCurrency(double amount) {
436 | MoneyFormatter fmf = MoneyFormatter(amount: amount);
437 | fmf.settings
438 | ..symbol = "₹"
439 | ..thousandSeparator = ","
440 | ..decimalSeparator = "."
441 | ..fractionDigits = 2;
442 | return fmf.output.symbolOnLeft;
443 | }
444 |
445 | createPriceItem(String key, String value, Color color) {
446 | return Container(
447 | padding: EdgeInsets.symmetric(horizontal: 0, vertical: 3),
448 | child: Row(
449 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
450 | children: [
451 | Text(
452 | key,
453 | style: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.grey.shade700, fontSize: 12),
454 | ),
455 | Text(
456 | value,
457 | style: CustomTextStyle.textFormFieldMedium.copyWith(color: color, fontSize: 12),
458 | )
459 | ],
460 | ),
461 | );
462 | }
463 | }
464 |
--------------------------------------------------------------------------------
/lib/pages/EditProfilePage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/utils/CustomColors.dart';
3 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
4 |
5 | class EditProfilePage extends StatefulWidget {
6 | @override
7 | _EditProfilePageState createState() => _EditProfilePageState();
8 | }
9 |
10 | class _EditProfilePageState extends State {
11 | @override
12 | Widget build(BuildContext context) {
13 | return Scaffold(
14 | appBar: AppBar(
15 | backgroundColor: Colors.white,
16 | leading: IconButton(
17 | icon: Icon(
18 | Icons.arrow_back,
19 | color: Colors.black,
20 | ),
21 | onPressed: () {
22 | Navigator.pop(context);
23 | }),
24 | title: Text(
25 | "Edit Profile",
26 | style: CustomTextStyle.textFormFieldBlack.copyWith(
27 | color: Colors.black, fontSize: 18, fontWeight: FontWeight.bold),
28 | ),
29 | ),
30 | body: Container(
31 | child: Column(
32 | children: [
33 | SizedBox(
34 | height: 24,
35 | ),
36 | Stack(
37 | children: [
38 | Align(
39 | alignment: Alignment.center,
40 | child: Container(
41 | width: 120,
42 | height: 120,
43 | decoration: BoxDecoration(
44 | shape: BoxShape.circle,
45 | gradient: LinearGradient(colors: [
46 | CustomColors.EDIT_PROFILE_PIC_FIRST_GRADIENT,
47 | CustomColors.EDIT_PROFILE_PIC_SECOND_GRADIENT
48 | ])),
49 | ),
50 | ),
51 | Align(
52 | alignment: Alignment.center,
53 | child: Container(
54 | width: 120,
55 | height: 120,
56 | child: Column(
57 | mainAxisAlignment: MainAxisAlignment.center,
58 | children: [
59 | IconButton(
60 | icon: Icon(
61 | Icons.image,
62 | color: Colors.white,
63 | ),
64 | onPressed: () {}),
65 | Text(
66 | "Choose Image",
67 | style: CustomTextStyle.textFormFieldMedium
68 | .copyWith(color: Colors.white, fontSize: 12),
69 | )
70 | ],
71 | ),
72 | ),
73 | )
74 | ],
75 | ),
76 | Container(
77 | child: TextFormField(
78 | keyboardType: TextInputType.text,
79 | decoration: InputDecoration(
80 | contentPadding: EdgeInsets.all(12),
81 | border: border,
82 | hintText: "Name",
83 | focusedBorder: border.copyWith(
84 | borderSide: BorderSide(color: Colors.blue)),
85 | ),
86 | ),
87 | margin: EdgeInsets.only(left: 12, right: 12, top: 24),
88 | ),
89 | Container(
90 | child: TextFormField(
91 | keyboardType: TextInputType.emailAddress,
92 | decoration: InputDecoration(
93 | contentPadding: EdgeInsets.all(12),
94 | border: border,
95 | hintText: "Email",
96 | focusedBorder: border.copyWith(
97 | borderSide: BorderSide(color: Colors.blue))),
98 | ),
99 | margin: EdgeInsets.only(left: 12, right: 12, top: 12),
100 | ),
101 | Container(
102 | child: TextFormField(
103 | keyboardType: TextInputType.phone,
104 | decoration: InputDecoration(
105 | contentPadding: EdgeInsets.all(12),
106 | border: border,
107 | hintText: "Mobile Number",
108 | focusedBorder: border.copyWith(
109 | borderSide: BorderSide(color: Colors.blue))),
110 | ),
111 | margin: EdgeInsets.only(left: 12, right: 12, top: 12),
112 | ),
113 | SizedBox(
114 | height: 24,
115 | ),
116 | Container(
117 | width: double.infinity,
118 | margin: EdgeInsets.only(left: 48, right: 48),
119 | child: RaisedButton(
120 | color: Colors.blue,
121 | textColor: Colors.white,
122 | onPressed: () {},
123 | child: Text(
124 | "Save",
125 | style: CustomTextStyle.textFormFieldBlack
126 | .copyWith(color: Colors.white, fontSize: 16),
127 | ),
128 | ),
129 | )
130 | ],
131 | ),
132 | ),
133 | );
134 | }
135 |
136 | var border = OutlineInputBorder(
137 | borderRadius: BorderRadius.all(Radius.circular(4)),
138 | borderSide: BorderSide(width: 1, color: Colors.grey));
139 | }
140 |
--------------------------------------------------------------------------------
/lib/pages/HomePage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/utils/CustomBorder.dart';
3 | import 'package:shopping_cart/utils/CustomColors.dart';
4 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
5 | import 'package:shopping_cart/utils/CustomUtils.dart';
6 |
7 | import 'ProductDetailsPage.dart';
8 | import 'SeeAllProductPage.dart';
9 |
10 | class HomePage extends StatefulWidget {
11 | @override
12 | _HomePageState createState() => _HomePageState();
13 | }
14 |
15 | class _HomePageState extends State {
16 | List listImage = new List();
17 | List listShoesImage = new List();
18 | int selectedSliderPosition = 0;
19 |
20 | @override
21 | void initState() {
22 | // TODO: implement initState
23 | super.initState();
24 | sliderImage();
25 | shoesImage();
26 | }
27 |
28 | void sliderImage() {
29 | listImage.add("images/slider_img.webp");
30 | listImage.add("images/slider_img.webp");
31 | listImage.add("images/slider_img.webp");
32 | }
33 |
34 | void shoesImage() {
35 | listShoesImage.add("images/shoes_1.png");
36 | listShoesImage.add("images/shoes_2.png");
37 | listShoesImage.add("images/shoes_3.png");
38 | listShoesImage.add("images/shoes_4.png");
39 | listShoesImage.add("images/shoes_5.png");
40 | listShoesImage.add("images/shoes_6.png");
41 | listShoesImage.add("images/shoes_7.png");
42 | }
43 |
44 | @override
45 | Widget build(BuildContext context) {
46 | var height = MediaQuery.of(context).size.height;
47 | return Scaffold(
48 | backgroundColor: Colors.grey.shade100,
49 | body: Builder(
50 | builder: (context) {
51 | return SingleChildScrollView(
52 | child: Column(
53 | children: [
54 | Stack(
55 | children: [
56 | Container(
57 | color: CustomColors.COLOR_GREEN,
58 | height: height / 4,
59 | ),
60 | /*Search Section*/
61 | Container(
62 | margin:
63 | const EdgeInsets.only(top: 48, right: 24, left: 24),
64 | child: TextField(
65 | decoration: InputDecoration(
66 | fillColor: Colors.white,
67 | hintText: "Search",
68 | enabledBorder: CustomBorder.enabledBorder.copyWith(
69 | borderSide: BorderSide(color: Colors.white),
70 | borderRadius:
71 | BorderRadius.all(Radius.circular(24))),
72 | contentPadding: EdgeInsets.only(
73 | top: 16, left: 12, right: 12, bottom: 8),
74 | border: CustomBorder.enabledBorder.copyWith(
75 | borderSide: BorderSide(color: Colors.white),
76 | borderRadius:
77 | BorderRadius.all(Radius.circular(24))),
78 | enabled: false,
79 | filled: true,
80 | ),
81 | ),
82 | ),
83 | /*Slider Section*/
84 | Container(
85 | height: (height / 4) + 75,
86 | alignment: Alignment.bottomCenter,
87 | child: Container(
88 | height: height / 5,
89 | child: PageView.builder(
90 | itemBuilder: (context, position) {
91 | return createSlider(listImage[position]);
92 | },
93 | controller: PageController(viewportFraction: .8),
94 | itemCount: listImage.length,
95 | onPageChanged: (position) {
96 | /*setState(() {
97 | selectedSliderPosition = position;
98 | });*/
99 | },
100 | ),
101 | ))
102 | ],
103 | ),
104 | Utils.getSizedBox(height: 30),
105 | GestureDetector(
106 | onTap: () {
107 | Navigator.of(context).push(new MaterialPageRoute(
108 | builder: (context) => SeeAllProductPage()));
109 | },
110 | child: Row(
111 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
112 | children: [
113 | Padding(
114 | padding: const EdgeInsets.only(top: 16, left: 16),
115 | child: Text(
116 | "GROUP BY",
117 | style: CustomTextStyle.textFormFieldSemiBold
118 | .copyWith(color: Colors.black),
119 | ),
120 | ),
121 | Container(
122 | margin: EdgeInsets.only(top: 10),
123 | child: Row(
124 | children: [
125 | Text("SEE ALL",
126 | style: CustomTextStyle.textFormFieldSemiBold
127 | .copyWith(color: Colors.grey.shade700)),
128 | Icon(Icons.arrow_forward),
129 | Utils.getSizedBox(width: 16),
130 | ],
131 | ),
132 | )
133 | ],
134 | ),
135 | ),
136 | Utils.getSizedBox(height: 10),
137 | /*Group By Product Listing*/
138 | ConstrainedBox(
139 | constraints: BoxConstraints(maxHeight: 200),
140 | child: ListView.builder(
141 | scrollDirection: Axis.horizontal,
142 | itemBuilder: (context, index) {
143 | return createGroupBuyListItem(
144 | listShoesImage[index], index);
145 | },
146 | itemCount: listShoesImage.length,
147 | ),
148 | ),
149 |
150 | /*Most Big Product Listing*/
151 | Utils.getSizedBox(height: 30),
152 | Row(
153 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
154 | children: [
155 | Padding(
156 | padding: const EdgeInsets.only(top: 16, left: 16),
157 | child: Text(
158 | "MOST BIG",
159 | style: CustomTextStyle.textFormFieldSemiBold
160 | .copyWith(color: Colors.black),
161 | ),
162 | ),
163 | Container(
164 | margin: EdgeInsets.only(top: 10),
165 | child: Row(
166 | children: [
167 | Text("SEE ALL",
168 | style: CustomTextStyle.textFormFieldSemiBold
169 | .copyWith(color: Colors.grey.shade700)),
170 | Icon(Icons.arrow_forward),
171 | Utils.getSizedBox(width: 16),
172 | ],
173 | ),
174 | )
175 | ],
176 | ),
177 | Utils.getSizedBox(height: 10),
178 | ConstrainedBox(
179 | constraints: BoxConstraints(maxHeight: 200),
180 | child: ListView.builder(
181 | scrollDirection: Axis.horizontal,
182 | itemBuilder: (context, index) {
183 | return createMostBigListItem(
184 | listShoesImage[index], index, context);
185 | },
186 | itemCount: listShoesImage.length,
187 | ),
188 | ),
189 | Utils.getSizedBox(height: 10),
190 | ],
191 | ),
192 | );
193 | },
194 | ),
195 | );
196 | }
197 |
198 | createSlider(String image) {
199 | return Card(
200 | margin: EdgeInsets.all(10),
201 | shape: RoundedRectangleBorder(
202 | borderRadius: BorderRadius.all(Radius.circular(14))),
203 | child: Container(
204 | decoration: BoxDecoration(
205 | borderRadius: BorderRadius.all(Radius.circular(14)),
206 | image:
207 | DecorationImage(image: AssetImage(image), fit: BoxFit.cover)),
208 | ),
209 | );
210 | }
211 |
212 | createGroupBuyListItem(String image, int index) {
213 | double leftMargin = 0;
214 | double rightMargin = 0;
215 | if (index != listShoesImage.length - 1) {
216 | leftMargin = 10;
217 | } else {
218 | leftMargin = 10;
219 | rightMargin = 10;
220 | }
221 | return Container(
222 | margin: EdgeInsets.only(left: leftMargin, right: rightMargin),
223 | decoration:
224 | BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(8))),
225 | child: Column(
226 | children: [
227 | Expanded(
228 | child: Container(
229 | width: 200,
230 | height: 200,
231 | decoration: BoxDecoration(
232 | image: DecorationImage(
233 | image: AssetImage(image),
234 | ),
235 | color: Colors.blue.shade200,
236 | borderRadius: BorderRadius.only(
237 | topLeft: Radius.circular(8),
238 | topRight: Radius.circular(8))),
239 | ),
240 | flex: 75,
241 | ),
242 | Expanded(
243 | flex: 25,
244 | child: Container(
245 | padding: EdgeInsets.only(left: leftMargin, right: rightMargin),
246 | width: 200,
247 | child: Column(
248 | mainAxisAlignment: MainAxisAlignment.start,
249 | crossAxisAlignment: CrossAxisAlignment.start,
250 | children: [
251 | Utils.getSizedBox(height: 8),
252 | Text(
253 | "NIKE Kyire II",
254 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(
255 | color: Colors.black.withOpacity(.7), fontSize: 12),
256 | ),
257 | Utils.getSizedBox(height: 4),
258 | Text(
259 | "Exquisite you need him",
260 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(
261 | color: Colors.black.withOpacity(.7), fontSize: 10),
262 | )
263 | ],
264 | ),
265 | decoration: BoxDecoration(
266 | color: Colors.white,
267 | borderRadius: BorderRadius.only(
268 | bottomLeft: Radius.circular(8),
269 | bottomRight: Radius.circular(8))),
270 | ),
271 | )
272 | ],
273 | ),
274 | );
275 | }
276 |
277 | createMostBigListItem(String image, int index, BuildContext context) {
278 | double leftMargin = 0;
279 | double rightMargin = 0;
280 | double radius = 16;
281 | if (index != listShoesImage.length - 1) {
282 | leftMargin = 10;
283 | } else {
284 | leftMargin = 10;
285 | rightMargin = 10;
286 | }
287 | return GestureDetector(
288 | child: Container(
289 | margin: EdgeInsets.only(left: leftMargin, right: rightMargin),
290 | decoration: BoxDecoration(
291 | borderRadius: BorderRadius.all(Radius.circular(radius))),
292 | child: Column(
293 | children: [
294 | Expanded(
295 | child: Hero(
296 | tag: "$image,$index",
297 | child: Container(
298 | width: 160,
299 | height: 200,
300 | decoration: BoxDecoration(
301 | image: DecorationImage(
302 | image: AssetImage(image),
303 | ),
304 | color: Colors.teal.shade200,
305 | borderRadius: BorderRadius.only(
306 | topLeft: Radius.circular(radius),
307 | topRight: Radius.circular(radius))),
308 | ),
309 | transitionOnUserGestures: true,
310 | ),
311 | flex: 75,
312 | ),
313 | Expanded(
314 | flex: 25,
315 | child: Container(
316 | padding: EdgeInsets.only(left: leftMargin, right: rightMargin),
317 | width: 160,
318 | child: Column(
319 | mainAxisAlignment: MainAxisAlignment.start,
320 | crossAxisAlignment: CrossAxisAlignment.start,
321 | children: [
322 | Utils.getSizedBox(height: 8),
323 | Text(
324 | "NIKE Kyire II",
325 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(
326 | color: Colors.black.withOpacity(.7), fontSize: 12),
327 | ),
328 | Utils.getSizedBox(height: 4),
329 | Text(
330 | "Exquisite you need him",
331 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(
332 | color: Colors.black.withOpacity(.7), fontSize: 10),
333 | )
334 | ],
335 | ),
336 | decoration: BoxDecoration(
337 | color: Colors.white,
338 | borderRadius: BorderRadius.only(
339 | bottomLeft: Radius.circular(radius),
340 | bottomRight: Radius.circular(radius))),
341 | ),
342 | )
343 | ],
344 | ),
345 | ),
346 | onTap: () {
347 | Navigator.of(context).push(new MaterialPageRoute(
348 | builder: (context) => ProductDetailsPage("$image,$index")));
349 | },
350 | );
351 | }
352 | }
353 |
--------------------------------------------------------------------------------
/lib/pages/InviteFriendsPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 | import 'dart:async';
4 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
5 | import 'package:shopping_cart/utils/CustomUtils.dart';
6 |
7 | class InviteFriendsPage extends StatefulWidget {
8 | @override
9 | _InviteFriendsPageState createState() => _InviteFriendsPageState();
10 | }
11 |
12 | class _InviteFriendsPageState extends State {
13 | static const platform = MethodChannel('flutter.native/helper');
14 | String shareResponse = "Sharing";
15 |
16 | Future shareApp() async {
17 | String response = "";
18 | try {
19 | String result = await platform.invokeMethod("shareApp");
20 | print("METHOD : " + result);
21 | response = result;
22 | } on PlatformException catch (e) {
23 | response = "Failed "
24 | "to shared app";
25 | }
26 | setState(() {
27 | shareResponse = response;
28 | });
29 | return shareResponse;
30 | }
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | return Scaffold(
35 | backgroundColor: Colors.grey.shade50,
36 | appBar: AppBar(
37 | backgroundColor: Colors.white,
38 | title: Text(
39 | "Invite Friends",
40 | style: CustomTextStyle.textFormFieldBold.copyWith(fontSize: 18),
41 | ),
42 | leading: IconButton(
43 | icon: Icon(
44 | Icons.arrow_back,
45 | color: Colors.black,
46 | ),
47 | onPressed: () {
48 | Navigator.of(context).pop();
49 | }),
50 | ),
51 | body: Builder(
52 | builder: (context) {
53 | return Column(
54 | children: [
55 | Expanded(
56 | child: ListView(
57 | children: [createHeader(), createMiddle()],
58 | ),
59 | flex: 90,
60 | ),
61 | createFooter(context)
62 | ],
63 | );
64 | },
65 | ),
66 | );
67 | }
68 |
69 | Expanded createFooter(BuildContext context) {
70 | return Expanded(
71 | child: Row(
72 | children: [
73 | Expanded(
74 | child: Container(
75 | margin: EdgeInsets.only(left: 4, right: 4, bottom: 4),
76 | child: RaisedButton(
77 | padding: EdgeInsets.symmetric(vertical: 16),
78 | onPressed: () {
79 | shareApp();
80 | Scaffold.of(context)
81 | .showSnackBar(SnackBar(content: Text(shareResponse)));
82 | },
83 | color: Colors.blue,
84 | child: Text(
85 | "Share Link",
86 | style: CustomTextStyle.textFormFieldMedium
87 | .copyWith(color: Colors.white),
88 | ),
89 | ),
90 | ),
91 | flex: 85,
92 | ),
93 | Expanded(
94 | child: Container(
95 | margin: EdgeInsets.only(right: 4, bottom: 8, top: 6),
96 | child: RaisedButton(
97 | padding: EdgeInsets.symmetric(vertical: 14),
98 | onPressed: () {},
99 | child: Image(
100 | image: AssetImage("images/ic_qr_code.png"),
101 | color: Colors.white,
102 | ),
103 | color: Colors.blue,
104 | ),
105 | ),
106 | flex: 15,
107 | )
108 | ],
109 | ),
110 | flex: 10,
111 | );
112 | }
113 |
114 | createHeader() {
115 | return Container(
116 | color: Colors.white,
117 | child: Column(
118 | crossAxisAlignment: CrossAxisAlignment.start,
119 | children: [
120 | Container(
121 | height: 160,
122 | margin: EdgeInsets.all(8),
123 | width: double.infinity,
124 | decoration: BoxDecoration(
125 | image: DecorationImage(
126 | image: AssetImage("images/ic_refer_friends_bg.jpg"),
127 | fit: BoxFit.cover)),
128 | ),
129 | Container(
130 | margin: EdgeInsets.symmetric(horizontal: 16, vertical: 10),
131 | child: Text(
132 | "Invite Friends & Earn Points",
133 | style: CustomTextStyle.textFormFieldBold,
134 | )),
135 | Container(
136 | margin: EdgeInsets.symmetric(horizontal: 16, vertical: 10),
137 | child: Text(
138 | "When you invite friends to join Carter, you can 100 points to each friends.Whenever your friends consume through Carter, you will get a 5% bonus",
139 | style: CustomTextStyle.textFormFieldBold
140 | .copyWith(color: Colors.black.withOpacity(0.8)),
141 | ))
142 | ],
143 | ),
144 | );
145 | }
146 |
147 | createMiddle() {
148 | return Container(
149 | margin: EdgeInsets.only(top: 14),
150 | color: Colors.white,
151 | child: Column(
152 | children: [
153 | Container(
154 | padding: EdgeInsets.only(left: 20, right: 20, top: 20, bottom: 20),
155 | child: Row(
156 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
157 | children: [
158 | Text(
159 | "My Invitation",
160 | style: CustomTextStyle.textFormFieldBold.copyWith(
161 | fontSize: 14, color: Colors.black.withOpacity(0.9)),
162 | ),
163 | Text(
164 | "Details",
165 | style: CustomTextStyle.textFormFieldBold
166 | .copyWith(fontSize: 14, color: Colors.blue),
167 | ),
168 | ],
169 | ),
170 | ),
171 | Container(
172 | color: Colors.grey.shade200,
173 | height: 1,
174 | width: double.infinity,
175 | ),
176 | Container(
177 | height: 60,
178 | child: GridView.builder(
179 | gridDelegate:
180 | SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2),
181 | itemBuilder: (context, index) {
182 | return gridItem();
183 | },
184 | itemCount: 2,
185 | shrinkWrap: true,
186 | ),
187 | )
188 | ],
189 | ),
190 | );
191 | }
192 |
193 | gridItem() {
194 | return Container(
195 | padding: EdgeInsets.all(10),
196 | margin: EdgeInsets.only(
197 | top: 8,
198 | ),
199 | height: 40,
200 | child: Row(
201 | mainAxisSize: MainAxisSize.min,
202 | crossAxisAlignment: CrossAxisAlignment.start,
203 | children: [
204 | Utils.getSizedBox(width: 8),
205 | Icon(
206 | Icons.menu,
207 | color: Colors.blue,
208 | ),
209 | Utils.getSizedBox(width: 6),
210 | Column(
211 | crossAxisAlignment: CrossAxisAlignment.start,
212 | children: [
213 | Text(
214 | "0.34123205",
215 | style: CustomTextStyle.textFormFieldBold
216 | .copyWith(color: Colors.blue),
217 | ),
218 | Utils.getSizedBox(width: 4),
219 | Container(
220 | child: Text(
221 | "Today Reward",
222 | style: CustomTextStyle.textFormFieldMedium
223 | .copyWith(color: Colors.grey.shade500, fontSize: 12),
224 | ),
225 | )
226 | ],
227 | ),
228 | ],
229 | ),
230 | );
231 | }
232 | }
233 |
--------------------------------------------------------------------------------
/lib/pages/NotificationPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
3 | import 'package:shopping_cart/utils/CustomUtils.dart';
4 |
5 | class NotificationPage extends StatefulWidget {
6 | @override
7 | _NotificationPageState createState() => _NotificationPageState();
8 | }
9 |
10 | class _NotificationPageState extends State {
11 | @override
12 | Widget build(BuildContext context) {
13 | return Scaffold(
14 | appBar: AppBar(
15 | backgroundColor: Colors.white,
16 | title: Text(
17 | "Notifications",
18 | style: CustomTextStyle.textFormFieldBold.copyWith(fontSize: 18),
19 | ),
20 | leading: IconButton(
21 | icon: Icon(
22 | Icons.arrow_back,
23 | color: Colors.black,
24 | ),
25 | onPressed: () {
26 | Navigator.of(context).pop();
27 | }),
28 | ),
29 | body: ListView.builder(
30 | itemBuilder: (context, index) {
31 | return createNotificationListItem(index);
32 | },
33 | itemCount: getDummyList().length,
34 | ),
35 | );
36 | }
37 |
38 | /*createItem(){
39 | return ListTile(
40 | title: Text(
41 | "Payment Complete",
42 | style: CustomTextStyle.textFormFieldBlack
43 | .copyWith(color: Colors.black, fontSize: 16),
44 | ),
45 | isThreeLine: true,
46 | trailing: IconButton(icon: Icon(Icons.close), onPressed: () {}),
47 | subtitle: Text(
48 | "Thank you for your recent payment. Your monthly subscription has been activated until June 2020.",
49 | softWrap: true,
50 | style: CustomTextStyle.textFormFieldMedium
51 | .copyWith(color: Colors.grey,fontSize: 14),
52 | ),
53 | );
54 | }*/
55 |
56 | createNotificationListItem(int index) {
57 | return Dismissible(
58 | child: Container(
59 | margin: EdgeInsets.symmetric(vertical: 4, horizontal: 4),
60 | width: double.infinity,
61 | decoration: BoxDecoration(
62 | borderRadius: BorderRadius.only(
63 | topLeft: Radius.circular(10), bottomLeft: Radius.circular(10))),
64 | child: Row(
65 | mainAxisSize: MainAxisSize.min,
66 | children: [
67 | Expanded(
68 | child: Container(
69 | width: 4,
70 | margin: EdgeInsets.only(right: 4),
71 | decoration: BoxDecoration(
72 | borderRadius: BorderRadius.only(
73 | topLeft: Radius.circular(10),
74 | bottomLeft: Radius.circular(10)),
75 | color: Colors.green,
76 | ),
77 | ),
78 | flex: 02,
79 | ),
80 | Expanded(
81 | child: Column(
82 | children: [
83 | Row(
84 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
85 | mainAxisSize: MainAxisSize.max,
86 | children: [
87 | Text(
88 | "Payment Complete",
89 | style: CustomTextStyle.textFormFieldBlack
90 | .copyWith(color: Colors.black, fontSize: 16),
91 | ),
92 | IconButton(icon: Icon(Icons.close), onPressed: () {})
93 | ],
94 | ),
95 | Container(
96 | margin: EdgeInsets.only(right: 6),
97 | child: Text(
98 | "Thank you for your recent payment. Your monthly subscription has been activated until June 2020.",
99 | softWrap: true,
100 | textAlign: TextAlign.start,
101 | style: CustomTextStyle.textFormFieldMedium
102 | .copyWith(color: Colors.grey, fontSize: 12),
103 | ),
104 | )
105 | ],
106 | ),
107 | flex: 98,
108 | )
109 | ],
110 | ),
111 | ),
112 | key: Key("key_1"),
113 | direction: DismissDirection.endToStart,
114 | onDismissed: (DismissDirection direction) {
115 | getDummyList().removeAt(index);
116 | },
117 | background: Container(
118 | color: Colors.green,
119 | child: Row(
120 | mainAxisSize: MainAxisSize.max,
121 | mainAxisAlignment: MainAxisAlignment.end,
122 | crossAxisAlignment: CrossAxisAlignment.center,
123 | children: [
124 | Icon(
125 | Icons.delete,
126 | color: Colors.white,
127 | ),
128 | Utils.getSizedBox(width: 16)
129 | ],
130 | ),
131 | ),
132 | );
133 | }
134 |
135 | static List getDummyList() {
136 | List list = List.generate(10, (i) {
137 | return "Item ${i + 1}";
138 | });
139 | return list;
140 | }
141 | }
142 |
--------------------------------------------------------------------------------
/lib/pages/OrderPlacePage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
3 |
4 | class OrderPlacePage extends StatefulWidget {
5 | @override
6 | _OrderPlacePageState createState() => _OrderPlacePageState();
7 | }
8 |
9 | class _OrderPlacePageState extends State {
10 | @override
11 | Widget build(BuildContext context) {
12 | return MaterialApp(
13 | home: Scaffold(
14 | resizeToAvoidBottomInset: false,
15 | backgroundColor: Colors.white,
16 | appBar: AppBar(
17 | elevation: 0,
18 | backgroundColor: Colors.white,
19 | leading: IconButton(
20 | icon: Icon(
21 | Icons.arrow_back,
22 | color: Colors.black,
23 | ),
24 | onPressed: () {
25 | Navigator.pop(context);
26 | }),
27 | ),
28 | body: Container(
29 | child: Column(
30 | children: [
31 | Expanded(
32 | child: Container(
33 | child: Align(
34 | alignment: Alignment.bottomCenter,
35 | child: Image(
36 | image: AssetImage("images/ic_thank_you.png"),
37 | width: 300,
38 | ),
39 | ),
40 | ),
41 | flex: 5,
42 | ),
43 | Expanded(
44 | child: Container(
45 | margin: EdgeInsets.only(left: 8, right: 8),
46 | child: Column(
47 | children: [
48 | RichText(
49 | textAlign: TextAlign.center,
50 | text: TextSpan(children: [
51 | TextSpan(
52 | text:
53 | "\n\nThank you for your purchase. Our company values each and every customer. We strive to provide state-of-the-art devices that respond to our clients’ individual needs. If you have any questions or feedback, please don’t hesitate to reach out.",
54 | style: CustomTextStyle.textFormFieldMedium.copyWith(fontSize: 12, color: Colors.grey),
55 | )
56 | ])),
57 | SizedBox(
58 | height: 24,
59 | ),
60 | RaisedButton(
61 | onPressed: () {},
62 | child: Text(
63 | "View Order",
64 | style: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.white),
65 | ),
66 | color: Colors.pink,
67 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(24))),
68 | )
69 | ],
70 | ),
71 | ),
72 | flex: 5,
73 | )
74 | ],
75 | ),
76 | ),
77 | ),
78 | );
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/lib/pages/ProductDetailsPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
3 | import 'package:shopping_cart/utils/CustomUtils.dart';
4 |
5 | import 'CartPage.dart';
6 |
7 | class ProductDetailsPage extends StatefulWidget {
8 | String heroTag;
9 |
10 | ProductDetailsPage(this.heroTag);
11 |
12 | @override
13 | _ProductDetailsPageState createState() => _ProductDetailsPageState(heroTag);
14 | }
15 |
16 | class _ProductDetailsPageState extends State with TickerProviderStateMixin {
17 | List listColor = new List();
18 | List listSize = new List();
19 | int selectedColor = -1;
20 |
21 | var selectedSize = -1;
22 |
23 | var heroTag;
24 |
25 | _ProductDetailsPageState(this.heroTag);
26 |
27 | @override
28 | void initState() {
29 | // TODO: implement initState
30 | super.initState();
31 | addColor();
32 | addSize();
33 | }
34 |
35 | void addColor() {
36 | listColor.add(Colors.red);
37 | listColor.add(Colors.green);
38 | listColor.add(Colors.yellow);
39 | listColor.add(Colors.black);
40 | listColor.add(Colors.teal);
41 | listColor.add(Colors.blue);
42 | }
43 |
44 | @override
45 | Widget build(BuildContext context) {
46 | var halfOfScreen = MediaQuery.of(context).size.height / 1.5;
47 | return Scaffold(
48 | backgroundColor: Colors.white,
49 | resizeToAvoidBottomInset: false,
50 | body: Builder(builder: (context) {
51 | return Container(
52 | height: double.infinity,
53 | child: Stack(
54 | alignment: Alignment.topRight,
55 | children: [
56 | Hero(
57 | tag: heroTag,
58 | child: Image(
59 | image: AssetImage("images/details_shoes_image.webp"),
60 | height: halfOfScreen,
61 | width: double.infinity,
62 | fit: BoxFit.cover,
63 | )),
64 | Container(
65 | margin: EdgeInsets.symmetric(vertical: 36),
66 | child: Row(
67 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
68 | children: [
69 | Container(
70 | margin: EdgeInsets.only(left: 8),
71 | height: 28,
72 | width: 32,
73 | child: IconButton(
74 | icon: Icon(
75 | Icons.arrow_back,
76 | color: Colors.white,
77 | ),
78 | alignment: Alignment.center,
79 | onPressed: () {
80 | Navigator.pop(context);
81 | },
82 | iconSize: 14,
83 | ),
84 | decoration: BoxDecoration(
85 | shape: BoxShape.circle,
86 | color: Colors.grey.shade400,
87 | ),
88 | ),
89 | Container(
90 | margin: EdgeInsets.only(right: 8),
91 | child: Stack(
92 | children: [
93 | Container(
94 | height: 4,
95 | width: 4,
96 | decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.red),
97 | ),
98 | Container(
99 | height: 28,
100 | width: 32,
101 | child: IconButton(
102 | icon: Icon(
103 | Icons.shopping_cart,
104 | color: Colors.white,
105 | ),
106 | alignment: Alignment.center,
107 | onPressed: () {
108 | Navigator.of(context).push(new MaterialPageRoute(builder: (context) => CartPage()));
109 | },
110 | iconSize: 14,
111 | ),
112 | decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.grey.shade400),
113 | ),
114 | ],
115 | ),
116 | )
117 | ],
118 | ),
119 | ),
120 | Align(
121 | alignment: Alignment.bottomCenter,
122 | child: productDetailsSection(),
123 | )
124 | ],
125 | ),
126 | );
127 | }),
128 | );
129 | }
130 |
131 | productDetailsSection() {
132 | return Container(
133 | padding: EdgeInsets.all(8),
134 | height: 320,
135 | child: Column(
136 | children: [
137 | Row(
138 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
139 | children: [
140 | Container(
141 | margin: EdgeInsets.only(left: 8),
142 | child: Text(
143 | "NIKE XTM Basketball Shoes",
144 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(color: Colors.black),
145 | ),
146 | ),
147 | IconButton(icon: Icon(Icons.close), onPressed: () {})
148 | ],
149 | ),
150 | Container(
151 | margin: EdgeInsets.only(left: 8),
152 | alignment: Alignment.topLeft,
153 | child: Text(
154 | "Colour",
155 | textAlign: TextAlign.start,
156 | style: CustomTextStyle.textFormFieldBold.copyWith(color: Colors.black.withOpacity(0.8), fontSize: 12),
157 | ),
158 | ),
159 | Utils.getSizedBox(height: 8),
160 | ConstrainedBox(
161 | constraints: BoxConstraints(maxHeight: 40),
162 | child: ListView.builder(
163 | scrollDirection: Axis.horizontal,
164 | itemBuilder: (context, index) {
165 | return createColorItem(index);
166 | },
167 | itemCount: listColor.length,
168 | ),
169 | ),
170 | Utils.getSizedBox(height: 16),
171 | Container(
172 | alignment: Alignment.topLeft,
173 | margin: EdgeInsets.only(left: 8),
174 | child: Text(
175 | "Size",
176 | style: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.black.withOpacity(0.8), fontSize: 12),
177 | ),
178 | ),
179 | Utils.getSizedBox(height: 8),
180 | ConstrainedBox(
181 | constraints: BoxConstraints(maxHeight: 40),
182 | child: ListView.builder(
183 | scrollDirection: Axis.horizontal,
184 | itemBuilder: (context, index) {
185 | return createSizeItem(index);
186 | },
187 | itemCount: listSize.length,
188 | ),
189 | ),
190 | Utils.getSizedBox(height: 16),
191 | Row(
192 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
193 | children: [
194 | Container(
195 | margin: EdgeInsets.only(left: 8),
196 | child: Text(
197 | "Total",
198 | style: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.grey, fontSize: 12),
199 | ),
200 | ),
201 | Container(
202 | margin: EdgeInsets.only(right: 8),
203 | child: Text(
204 | "\$299.00",
205 | style: CustomTextStyle.textFormFieldBlack.copyWith(color: Colors.greenAccent.shade700, fontSize: 14),
206 | ),
207 | ),
208 | ],
209 | ),
210 | Utils.getSizedBox(height: 16),
211 | RaisedButton(
212 | onPressed: () {},
213 | color: Colors.green,
214 | padding: EdgeInsets.only(top: 12, left: 60, right: 60, bottom: 12),
215 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(24))),
216 | child: Text(
217 | "Add To Cart",
218 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(color: Colors.white),
219 | ),
220 | )
221 | ],
222 | ),
223 | decoration: BoxDecoration(
224 | shape: BoxShape.rectangle,
225 | color: Colors.white,
226 | borderRadius: BorderRadius.only(topLeft: Radius.circular(30), topRight: Radius.circular(30))),
227 | );
228 | }
229 |
230 | Container createSizeItem(int index) {
231 | return Container(
232 | width: 28,
233 | margin: EdgeInsets.all(4),
234 | height: 28,
235 | padding: EdgeInsets.only(top: 8),
236 | child: Text(
237 | listSize[index],
238 | style: CustomTextStyle.textFormFieldSemiBold.copyWith(fontSize: 12, color: Colors.black.withOpacity(0.8)),
239 | textAlign: TextAlign.center,
240 | ),
241 | decoration: BoxDecoration(
242 | color: Colors.white,
243 | border: Border.all(color: selectedSize == index ? Colors.blue : Colors.grey, width: 1),
244 | shape: BoxShape.circle),
245 | );
246 | }
247 |
248 | GestureDetector createColorItem(int index) {
249 | return GestureDetector(
250 | child: Container(
251 | width: 24,
252 | margin: EdgeInsets.all(4),
253 | height: 24,
254 | decoration: BoxDecoration(
255 | color: listColor[index],
256 | border: Border.all(color: Colors.grey, width: selectedColor == index ? 2 : 0),
257 | shape: BoxShape.circle),
258 | ),
259 | onTap: () {
260 | setState(() {
261 | selectedColor = index;
262 | });
263 | },
264 | );
265 | }
266 |
267 | void addSize() {
268 | listSize.add("4");
269 | listSize.add("5");
270 | listSize.add("6");
271 | listSize.add("7");
272 | listSize.add("8");
273 | listSize.add("9");
274 | listSize.add("10");
275 | }
276 | }
277 |
--------------------------------------------------------------------------------
/lib/pages/ProfilePage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/model/list_profile_section.dart';
3 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
4 | import 'package:shopping_cart/utils/CustomUtils.dart';
5 |
6 | import 'AboutUsPage.dart';
7 | import 'InviteFriendsPage.dart';
8 | import 'NotificationPage.dart';
9 |
10 | class ProfilePage extends StatefulWidget {
11 | @override
12 | _ProfilePageState createState() => _ProfilePageState();
13 | }
14 |
15 | class _ProfilePageState extends State {
16 | List listSection = new List();
17 |
18 | @override
19 | void initState() {
20 | // TODO: implement initState
21 | super.initState();
22 | createListItem();
23 | }
24 |
25 | void createListItem() {
26 | listSection.add(createSection("Notifications", "images/ic_notification.png",
27 | Colors.blue.shade800, NotificationPage()));
28 | listSection.add(createSection(
29 | "Payment Method", "images/ic_payment.png", Colors.teal.shade800, null));
30 | listSection.add(createSection(
31 | "Settings", "images/ic_settings.png", Colors.red.shade800, null));
32 | listSection.add(createSection(
33 | "Invite Friends",
34 | "images/ic_invite_friends.png",
35 | Colors.indigo.shade800,
36 | InviteFriendsPage()));
37 | listSection.add(createSection("About Us", "images/ic_about_us.png",
38 | Colors.black.withOpacity(0.8), AboutPage()));
39 | listSection.add(createSection(
40 | "Logout", "images/ic_logout.png", Colors.red.withOpacity(0.7), null));
41 | }
42 |
43 | createSection(String title, String icon, Color color, Widget widget) {
44 | return ListProfileSection(title, icon, color, widget);
45 | }
46 |
47 | @override
48 | Widget build(BuildContext context) {
49 | return Scaffold(
50 | body: ListView(
51 | children: [
52 | Utils.getSizedBox(height: 24),
53 | buildHeader(),
54 | Utils.getSizedBox(height: 24),
55 | buildListView()
56 | ],
57 | ),
58 | );
59 | }
60 |
61 | Container buildHeader() {
62 | return Container(
63 | child: Row(
64 | children: [
65 | Utils.getSizedBox(width: 14),
66 | Container(
67 | width: 60,
68 | margin: EdgeInsets.only(top: 8),
69 | height: 60,
70 | decoration: BoxDecoration(
71 | image: DecorationImage(
72 | image: AssetImage("images/ic_user_profile.png")),
73 | borderRadius: BorderRadius.all(Radius.circular(24))),
74 | ),
75 | Utils.getSizedBox(width: 10),
76 | Expanded(
77 | child: Row(
78 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
79 | children: [
80 | Column(
81 | crossAxisAlignment: CrossAxisAlignment.start,
82 | children: [
83 | Text(
84 | "Riya Patel",
85 | textAlign: TextAlign.start,
86 | style: CustomTextStyle.textFormFieldBlack
87 | .copyWith(color: Colors.blue.shade900, fontSize: 14),
88 | ),
89 | Utils.getSizedBox(height: 2),
90 | Text(
91 | "riya@gmail.com",
92 | style: CustomTextStyle.textFormFieldMedium
93 | .copyWith(color: Colors.grey.shade400, fontSize: 12),
94 | ),
95 | ],
96 | ),
97 | Padding(
98 | padding: const EdgeInsets.symmetric(horizontal: 12),
99 | child: Icon(
100 | Icons.keyboard_arrow_right,
101 | color: Colors.grey,
102 | ),
103 | )
104 | ],
105 | ),
106 | flex: 100,
107 | )
108 | ],
109 | ),
110 | );
111 | }
112 |
113 | ListView buildListView() {
114 | return ListView.builder(
115 | shrinkWrap: true,
116 | primary: false,
117 | itemBuilder: (context, index) {
118 | return createListViewItem(listSection[index]);
119 | },
120 | itemCount: listSection.length,
121 | );
122 | }
123 |
124 | createListViewItem(ListProfileSection listSection) {
125 | return Builder(builder: (context) {
126 | return InkWell(
127 | splashColor: Colors.teal.shade200,
128 | onTap: () {
129 | if (listSection.widget != null) {
130 | Navigator.of(context).push(new MaterialPageRoute(
131 | builder: (context) => listSection.widget));
132 | }
133 | },
134 | child: Container(
135 | padding: EdgeInsets.only(top: 14, left: 24, right: 8, bottom: 14),
136 | child: Row(
137 | children: [
138 | Expanded(
139 | child: Container(
140 | height: 30,
141 | decoration: BoxDecoration(
142 | borderRadius: BorderRadius.all(Radius.circular(24)),
143 | color: listSection.color),
144 | child: Image(
145 | image: AssetImage(listSection.icon),
146 | color: Colors.white,
147 | ),
148 | ),
149 | flex: 8,
150 | ),
151 | Expanded(
152 | child: Container(
153 | margin: EdgeInsets.symmetric(horizontal: 8),
154 | child: Text(
155 | listSection.title,
156 | style: CustomTextStyle.textFormFieldMedium,
157 | ),
158 | ),
159 | flex: 84,
160 | ),
161 | Expanded(
162 | child: Container(
163 | child: Icon(
164 | Icons.keyboard_arrow_right,
165 | color: Colors.grey,
166 | ),
167 | ),
168 | flex: 8,
169 | ),
170 | ],
171 | ),
172 | ),
173 | );
174 | });
175 | }
176 | }
177 |
--------------------------------------------------------------------------------
/lib/pages/ProfilePage1.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/model/list_profile_section.dart';
3 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
4 |
5 | import 'AboutUsPage.dart';
6 | import 'EditProfilePage.dart';
7 | import 'InviteFriendsPage.dart';
8 | import 'NotificationPage.dart';
9 |
10 | class ProfilePage1 extends StatefulWidget {
11 | @override
12 | _ProfilePage1State createState() => _ProfilePage1State();
13 | }
14 |
15 | class _ProfilePage1State extends State {
16 | List listSection = new List();
17 |
18 | @override
19 | void initState() {
20 | // TODO: implement initState
21 | super.initState();
22 | createListItem();
23 | }
24 |
25 | void createListItem() {
26 | listSection.add(createSection("Notifications", "images/ic_notification.png",
27 | Colors.blue.shade800, NotificationPage()));
28 | listSection.add(createSection(
29 | "Payment Method", "images/ic_payment.png", Colors.teal.shade800, null));
30 | listSection.add(createSection(
31 | "Invite Friends",
32 | "images/ic_invite_friends.png",
33 | Colors.indigo.shade800,
34 | InviteFriendsPage()));
35 | listSection.add(createSection("About Us", "images/ic_about_us.png",
36 | Colors.black.withOpacity(0.8), AboutPage()));
37 | listSection.add(createSection(
38 | "Logout", "images/ic_logout.png", Colors.red.withOpacity(0.7), null));
39 | }
40 |
41 | createSection(String title, String icon, Color color, Widget widget) {
42 | return ListProfileSection(title, icon, color, widget);
43 | }
44 |
45 | @override
46 | Widget build(BuildContext context) {
47 | return Scaffold(
48 | backgroundColor: Colors.grey.shade200,
49 | resizeToAvoidBottomInset: true,
50 | body: Builder(builder: (context) {
51 | return Container(
52 | child: Stack(
53 | children: [
54 | Container(
55 | height: 240,
56 | width: double.infinity,
57 | decoration: BoxDecoration(
58 | color: Colors.black.withOpacity(0.5),
59 | borderRadius: BorderRadius.only(
60 | bottomLeft: Radius.circular(10),
61 | bottomRight: Radius.circular(10))),
62 | child: Stack(
63 | children: [
64 | Positioned(
65 | child: Container(
66 | width: 200,
67 | height: 200,
68 | decoration: BoxDecoration(
69 | color: Colors.black, shape: BoxShape.circle),
70 | ),
71 | top: -40,
72 | left: -40,
73 | ),
74 | Positioned(
75 | child: Container(
76 | width: 300,
77 | height: 260,
78 | decoration: BoxDecoration(
79 | color: Colors.black.withOpacity(0.5),
80 | shape: BoxShape.circle),
81 | ),
82 | top: -40,
83 | left: -40,
84 | ),
85 | Positioned(
86 | child: Align(
87 | child: Container(
88 | width: 400,
89 | height: 260,
90 | decoration: BoxDecoration(
91 | color: Colors.black.withOpacity(0.5),
92 | shape: BoxShape.circle),
93 | ),
94 | ),
95 | top: -40,
96 | left: -40,
97 | ),
98 | ],
99 | ),
100 | ),
101 | Container(
102 | child: Text(
103 | "Profile",
104 | style: CustomTextStyle.textFormFieldBold
105 | .copyWith(color: Colors.white, fontSize: 24),
106 | ),
107 | margin: EdgeInsets.only(top: 72, left: 24),
108 | ),
109 | Column(
110 | mainAxisSize: MainAxisSize.min,
111 | children: [
112 | Expanded(
113 | child: Container(),
114 | flex: 20,
115 | ),
116 | Expanded(
117 | child: Container(
118 | child: Stack(
119 | children: [
120 | Container(
121 | child: Card(
122 | margin:
123 | EdgeInsets.only(top: 50, left: 16, right: 16),
124 | color: Colors.white,
125 | shape: RoundedRectangleBorder(
126 | borderRadius:
127 | BorderRadius.all(Radius.circular(16))),
128 | child: Column(
129 | children: [
130 | Container(
131 | margin: EdgeInsets.only(
132 | left: 8, top: 8, right: 8, bottom: 8),
133 | child: Row(
134 | mainAxisAlignment:
135 | MainAxisAlignment.spaceBetween,
136 | children: [
137 | IconButton(
138 | icon: Icon(Icons.settings),
139 | iconSize: 24,
140 | color: Colors.black,
141 | onPressed: () {},
142 | ),
143 | IconButton(
144 | icon: Icon(Icons.edit),
145 | color: Colors.black,
146 | iconSize: 24,
147 | onPressed: () {
148 | Navigator.push(
149 | context,
150 | new MaterialPageRoute(
151 | builder: (context) =>
152 | EditProfilePage()));
153 | },
154 | )
155 | ],
156 | ),
157 | ),
158 | SizedBox(
159 | height: 8,
160 | ),
161 | Text(
162 | "Riya Patel",
163 | style: CustomTextStyle.textFormFieldBlack
164 | .copyWith(
165 | color: Colors.black,
166 | fontSize: 16,
167 | fontWeight: FontWeight.w900),
168 | ),
169 | Text(
170 | "riya@gmail.com",
171 | style: CustomTextStyle.textFormFieldMedium
172 | .copyWith(
173 | color: Colors.grey.shade700,
174 | fontSize: 14),
175 | ),
176 | SizedBox(
177 | height: 16,
178 | ),
179 | Container(
180 | height: 2,
181 | width: double.infinity,
182 | color: Colors.grey.shade200,
183 | ),
184 | buildListView()
185 | ],
186 | ),
187 | ),
188 | ),
189 | Align(
190 | alignment: Alignment.topCenter,
191 | child: Container(
192 | decoration: BoxDecoration(
193 | border: Border.all(
194 | color: Colors.grey.shade400, width: 2),
195 | shape: BoxShape.circle,
196 | image: DecorationImage(
197 | image: AssetImage(
198 | "images/ic_user_profile.png"),
199 | fit: BoxFit.contain)),
200 | width: 100,
201 | height: 100,
202 | ),
203 | ),
204 | ],
205 | ),
206 | ),
207 | flex: 75,
208 | ),
209 | Expanded(
210 | child: Container(),
211 | flex: 05,
212 | )
213 | ],
214 | )
215 | ],
216 | ),
217 | );
218 | }),
219 | );
220 | }
221 |
222 | ListView buildListView() {
223 | return ListView.builder(
224 | shrinkWrap: true,
225 | itemBuilder: (context, index) {
226 | return createListViewItem(listSection[index]);
227 | },
228 | itemCount: listSection.length,
229 | );
230 | }
231 |
232 | createListViewItem(ListProfileSection listSection) {
233 | return Builder(builder: (context) {
234 | return InkWell(
235 | splashColor: Colors.teal.shade200,
236 | onTap: () {
237 | if (listSection.widget != null) {
238 | Navigator.of(context).push(new MaterialPageRoute(
239 | builder: (context) => listSection.widget));
240 | }
241 | },
242 | child: Container(
243 | margin: EdgeInsets.only(left: 16, right: 12),
244 | padding: EdgeInsets.only(top: 12, bottom: 12),
245 | child: Row(
246 | children: [
247 | Image(
248 | image: AssetImage(listSection.icon),
249 | width: 20,
250 | height: 20,
251 | color: Colors.grey.shade500,
252 | ),
253 | SizedBox(
254 | width: 12,
255 | ),
256 | Text(
257 | listSection.title,
258 | style: CustomTextStyle.textFormFieldBold
259 | .copyWith(color: Colors.grey.shade500),
260 | ),
261 | Spacer(
262 | flex: 1,
263 | ),
264 | Icon(
265 | Icons.navigate_next,
266 | color: Colors.grey.shade500,
267 | )
268 | ],
269 | ),
270 | ),
271 | );
272 | });
273 | }
274 | }
275 |
--------------------------------------------------------------------------------
/lib/pages/SearchPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
3 | import 'package:shopping_cart/utils/CustomUtils.dart';
4 |
5 | class SearchPage extends StatefulWidget {
6 | @override
7 | _SearchPageState createState() => _SearchPageState();
8 | }
9 |
10 | class _SearchPageState extends State {
11 | List listCategory = new List();
12 | List listShoesImage = new List();
13 |
14 | @override
15 | void initState() {
16 | super.initState();
17 | createCategoryList();
18 | shoesImage();
19 | }
20 |
21 | createCategoryList() {
22 | listCategory.add("MEN");
23 | listCategory.add("WOMEN");
24 | listCategory.add("KIDS");
25 | listCategory.add("PERSONAL CARE");
26 | listCategory.add("HOME");
27 | }
28 |
29 | void shoesImage() {
30 | listShoesImage.add("images/shoes_1.png");
31 | listShoesImage.add("images/shoes_2.png");
32 | listShoesImage.add("images/shoes_3.png");
33 | listShoesImage.add("images/shoes_4.png");
34 | listShoesImage.add("images/shoes_5.png");
35 | listShoesImage.add("images/shoes_6.png");
36 | listShoesImage.add("images/shoes_7.png");
37 | }
38 |
39 | @override
40 | Widget build(BuildContext context) {
41 | return Scaffold(
42 | backgroundColor: Colors.grey.shade50,
43 | body: ListView(
44 | children: [
45 | searchHeader(),
46 | horizontalDivider(),
47 | Utils.getSizedBox(height: 14),
48 | recentSearchListView(),
49 | Utils.getSizedBox(height: 14),
50 | categoryList(),
51 | Utils.getSizedBox(height: 14),
52 | wishListItemListView(),
53 | Utils.getSizedBox(height: 14),
54 | viewedItemListView()
55 | ],
56 | ),
57 | );
58 | }
59 |
60 | searchHeader() {
61 | return Container(
62 | color: Colors.white,
63 | padding: EdgeInsets.symmetric(horizontal: 12),
64 | child: Row(
65 | children: [
66 | Icon(
67 | Icons.arrow_back,
68 | color: Colors.grey.shade700,
69 | ),
70 | Expanded(
71 | child: TextFormField(
72 | decoration: InputDecoration(
73 | hintText: "Search for brands & products",
74 | hintStyle: CustomTextStyle.textFormFieldRegular
75 | .copyWith(color: Colors.grey, fontSize: 12),
76 | labelStyle: CustomTextStyle.textFormFieldRegular
77 | .copyWith(color: Colors.black, fontSize: 12),
78 | border: textFieldBorder(),
79 | enabledBorder: textFieldBorder(),
80 | focusedBorder: textFieldBorder()),
81 | ),
82 | )
83 | ],
84 | ));
85 | }
86 |
87 | OutlineInputBorder textFieldBorder() => OutlineInputBorder(
88 | borderRadius: BorderRadius.all(Radius.circular(0)),
89 | borderSide: BorderSide(color: Colors.transparent));
90 |
91 | horizontalDivider() {
92 | return Container(
93 | color: Colors.grey.shade200,
94 | height: 1,
95 | width: double.infinity,
96 | );
97 | }
98 |
99 | categoryList() {
100 | return Container(
101 | padding: EdgeInsets.only(top: 16, bottom: 16),
102 | color: Colors.white,
103 | width: double.infinity,
104 | child: ConstrainedBox(
105 | constraints: BoxConstraints(maxHeight: 30, minWidth: double.infinity),
106 | child: ListView.builder(
107 | itemBuilder: (context, index) {
108 | return categoryListItem(listCategory[index], index);
109 | },
110 | primary: false,
111 | itemCount: listCategory.length,
112 | scrollDirection: Axis.horizontal,
113 | ),
114 | ),
115 | );
116 | }
117 |
118 | categoryListItem(String strCategory, int index) {
119 | double leftMargin = 8;
120 | double rightMargin = 8;
121 | if (index == 0) {
122 | leftMargin = 12;
123 | }
124 | if (index == listCategory.length - 1) {
125 | rightMargin = 12;
126 | }
127 | return Container(
128 | child: Text(
129 | strCategory,
130 | style: CustomTextStyle.textFormFieldBold
131 | .copyWith(color: Colors.grey.shade800, fontSize: 12),
132 | ),
133 | margin: EdgeInsets.only(left: leftMargin, right: rightMargin),
134 | padding: EdgeInsets.symmetric(horizontal: 24, vertical: 6),
135 | decoration: BoxDecoration(
136 | borderRadius: BorderRadius.all(Radius.circular(18)),
137 | border: Border.all(color: Colors.grey.shade300, width: 1),
138 | color: Colors.white),
139 | );
140 | }
141 |
142 | recentSearchListView() {
143 | return Container(
144 | padding: EdgeInsets.symmetric(vertical: 8),
145 | color: Colors.white,
146 | child: Column(
147 | children: [
148 | Container(
149 | child: Row(
150 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
151 | children: [
152 | Text(
153 | "RECENT SEARCHES",
154 | style: CustomTextStyle.textFormFieldBold.copyWith(
155 | color: Colors.black.withOpacity(.5), fontSize: 11),
156 | ),
157 | Text(
158 | "EDIT",
159 | style: CustomTextStyle.textFormFieldBold
160 | .copyWith(color: Colors.pink.shade700, fontSize: 11),
161 | ),
162 | ],
163 | ),
164 | padding: EdgeInsets.symmetric(horizontal: 20, vertical: 10),
165 | ),
166 | Utils.getSizedBox(height: 6),
167 | ConstrainedBox(
168 | constraints: BoxConstraints(maxHeight: 60),
169 | child: ListView.builder(
170 | itemBuilder: (context, index) {
171 | return recentSearchListViewItem(listShoesImage[index], index);
172 | },
173 | itemCount: listShoesImage.length,
174 | primary: false,
175 | scrollDirection: Axis.horizontal,
176 | ),
177 | )
178 | ],
179 | ),
180 | );
181 | }
182 |
183 | recentSearchListViewItem(String listShoesImage, int index) {
184 | double leftMargin = 8;
185 | double rightMargin = 8;
186 | if (index == 0) {
187 | leftMargin = 16;
188 | }
189 | if (index == this.listShoesImage.length - 1) {
190 | rightMargin = 16;
191 | }
192 | return Container(
193 | margin: EdgeInsets.only(left: leftMargin, right: rightMargin),
194 | child: Column(
195 | children: [
196 | Container(
197 | width: 40,
198 | height: 40,
199 | decoration: BoxDecoration(
200 | image: DecorationImage(
201 | image: AssetImage(listShoesImage), fit: BoxFit.cover),
202 | border: Border.all(color: Colors.grey.shade300, width: 1),
203 | shape: BoxShape.circle),
204 | ),
205 | Utils.getSizedBox(height: 4),
206 | Text(
207 | "Search Item",
208 | overflow: TextOverflow.ellipsis,
209 | textWidthBasis: TextWidthBasis.parent,
210 | softWrap: true,
211 | textAlign: TextAlign.center,
212 | style: CustomTextStyle.textFormFieldRegular
213 | .copyWith(fontSize: 10, color: Colors.black),
214 | )
215 | ],
216 | ),
217 | );
218 | }
219 |
220 | wishListItemListView() {
221 | return Container(
222 | color: Colors.white,
223 | padding: EdgeInsets.only(bottom: 12),
224 | child: Column(
225 | crossAxisAlignment: CrossAxisAlignment.start,
226 | children: [
227 | Container(
228 | margin: EdgeInsets.symmetric(horizontal: 12, vertical: 12),
229 | child: Text(
230 | "ITEMS YOU HAVE WISHLISTED",
231 | style: CustomTextStyle.textFormFieldBold
232 | .copyWith(color: Colors.black.withOpacity(.5), fontSize: 11),
233 | ),
234 | ),
235 | Container(
236 | margin: EdgeInsets.symmetric(horizontal: 8),
237 | child: ConstrainedBox(
238 | constraints: BoxConstraints(maxHeight: 200),
239 | child: ListView.builder(
240 | itemBuilder: (context, index) {
241 | return createWishListItem();
242 | },
243 | itemCount: 10,
244 | primary: false,
245 | scrollDirection: Axis.horizontal,
246 | ),
247 | ),
248 | )
249 | ],
250 | ),
251 | );
252 | }
253 |
254 | createWishListItem() {
255 | return Container(
256 | margin: EdgeInsets.symmetric(horizontal: 4),
257 | decoration:
258 | BoxDecoration(border: Border.all(color: Colors.grey.shade100)),
259 | child: Column(
260 | crossAxisAlignment: CrossAxisAlignment.start,
261 | children: [
262 | Expanded(
263 | child: Container(
264 | width: 120,
265 | decoration: BoxDecoration(
266 | color: Colors.teal.shade200,
267 | image: DecorationImage(
268 | image: AssetImage("images/shoes_1.png"), fit: BoxFit.cover),
269 | ),
270 | ),
271 | flex: 70,
272 | ),
273 | Utils.getSizedBox(height: 6),
274 | Container(
275 | margin: EdgeInsets.symmetric(horizontal: 4),
276 | child: Text(
277 | "HIGHLANDER",
278 | style: CustomTextStyle.textFormFieldRegular
279 | .copyWith(color: Colors.black.withOpacity(0.7), fontSize: 12),
280 | ),
281 | ),
282 | Utils.getSizedBox(height: 6),
283 | Container(
284 | margin: EdgeInsets.symmetric(horizontal: 4),
285 | child: Text(
286 | "\$12",
287 | style: CustomTextStyle.textFormFieldBold
288 | .copyWith(color: Colors.black, fontSize: 12),
289 | ),
290 | ),
291 | Utils.getSizedBox(height: 6),
292 | Container(
293 | margin: EdgeInsets.symmetric(horizontal: 4),
294 | child: Row(
295 | children: [
296 | Text(
297 | "\$15",
298 | style: CustomTextStyle.textFormFieldRegular.copyWith(
299 | color: Colors.grey.shade400,
300 | fontSize: 12,
301 | decoration: TextDecoration.lineThrough),
302 | ),
303 | Utils.getSizedBox(width: 4),
304 | Text(
305 | "55% OFF",
306 | style: CustomTextStyle.textFormFieldRegular
307 | .copyWith(color: Colors.red.shade400, fontSize: 12),
308 | ),
309 | ],
310 | ),
311 | ),
312 | Utils.getSizedBox(height: 6),
313 | ],
314 | ),
315 | );
316 | }
317 |
318 | viewedItemListView() {
319 | return Container(
320 | color: Colors.white,
321 | padding: EdgeInsets.only(bottom: 12),
322 | child: Column(
323 | crossAxisAlignment: CrossAxisAlignment.start,
324 | children: [
325 | Container(
326 | margin: EdgeInsets.symmetric(horizontal: 12, vertical: 12),
327 | child: Text(
328 | "ITEMS YOU HAVE VIEWED",
329 | style: CustomTextStyle.textFormFieldBold
330 | .copyWith(color: Colors.black.withOpacity(.5), fontSize: 11),
331 | ),
332 | ),
333 | Container(
334 | margin: EdgeInsets.symmetric(horizontal: 8),
335 | child: ConstrainedBox(
336 | constraints: BoxConstraints(maxHeight: 200),
337 | child: ListView.builder(
338 | itemBuilder: (context, index) {
339 | return createWishListItem();
340 | },
341 | itemCount: 10,
342 | primary: false,
343 | scrollDirection: Axis.horizontal,
344 | ),
345 | ),
346 | )
347 | ],
348 | ),
349 | );
350 | }
351 |
352 | createViewedListItem() {
353 | return Container(
354 | margin: EdgeInsets.symmetric(horizontal: 4),
355 | decoration:
356 | BoxDecoration(border: Border.all(color: Colors.grey.shade100)),
357 | child: Column(
358 | crossAxisAlignment: CrossAxisAlignment.start,
359 | children: [
360 | Expanded(
361 | child: Container(
362 | width: 120,
363 | decoration: BoxDecoration(
364 | color: Colors.teal.shade200,
365 | image: DecorationImage(
366 | image: AssetImage("images/shoes_1.png"), fit: BoxFit.cover),
367 | ),
368 | ),
369 | flex: 70,
370 | ),
371 | Utils.getSizedBox(height: 6),
372 | Container(
373 | margin: EdgeInsets.symmetric(horizontal: 4),
374 | child: Text(
375 | "HIGHLANDER",
376 | style: CustomTextStyle.textFormFieldRegular
377 | .copyWith(color: Colors.black.withOpacity(0.7), fontSize: 12),
378 | ),
379 | ),
380 | Utils.getSizedBox(height: 6),
381 | Container(
382 | margin: EdgeInsets.symmetric(horizontal: 4),
383 | child: Text(
384 | "\$12",
385 | style: CustomTextStyle.textFormFieldBold
386 | .copyWith(color: Colors.black, fontSize: 12),
387 | ),
388 | ),
389 | Utils.getSizedBox(height: 6),
390 | Container(
391 | margin: EdgeInsets.symmetric(horizontal: 4),
392 | child: Row(
393 | children: [
394 | Text(
395 | "\$15",
396 | style: CustomTextStyle.textFormFieldRegular.copyWith(
397 | color: Colors.grey.shade400,
398 | fontSize: 12,
399 | decoration: TextDecoration.lineThrough),
400 | ),
401 | Utils.getSizedBox(width: 4),
402 | Text(
403 | "55% OFF",
404 | style: CustomTextStyle.textFormFieldRegular
405 | .copyWith(color: Colors.red.shade400, fontSize: 12),
406 | ),
407 | ],
408 | ),
409 | ),
410 | Utils.getSizedBox(height: 6),
411 | ],
412 | ),
413 | );
414 | }
415 | }
416 |
--------------------------------------------------------------------------------
/lib/pages/SeeAllProductPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_rating_bar/flutter_rating_bar.dart';
3 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
4 | import 'package:shopping_cart/utils/CustomUtils.dart';
5 |
6 | class SeeAllProductPage extends StatefulWidget {
7 | @override
8 | _SeeAllProductPageState createState() => _SeeAllProductPageState();
9 | }
10 |
11 | class _SeeAllProductPageState extends State {
12 | List listImage = new List();
13 | List listItemColor = new List();
14 | final _scaffoldKey = GlobalKey();
15 |
16 | @override
17 | void initState() {
18 | // TODO: implement initState
19 | super.initState();
20 | addImage();
21 | addItemColor();
22 | }
23 |
24 | void addItemColor() {
25 | listItemColor.add(Colors.white);
26 | listItemColor.add(Colors.black);
27 | listItemColor.add(Colors.indigo);
28 | listItemColor.add(Colors.teal);
29 | listItemColor.add(Colors.red);
30 | }
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | double width = MediaQuery.of(context).size.width / 2;
35 | return Scaffold(
36 | key: _scaffoldKey,
37 | resizeToAvoidBottomInset: true,
38 | appBar: AppBar(
39 | backgroundColor: Colors.white,
40 | bottom: PreferredSize(child: filterSortListOption(), preferredSize: Size(double.infinity, 44)),
41 | title: Text(
42 | "GROUP BY",
43 | style: CustomTextStyle.textFormFieldBold.copyWith(fontSize: 16),
44 | ),
45 | elevation: 1,
46 | centerTitle: true,
47 | actions: [
48 | Image(
49 | image: AssetImage("images/ic_search.png"),
50 | width: 48,
51 | height: 16,
52 | ),
53 | Image(
54 | image: AssetImage("images/ic_shopping_cart.png"),
55 | width: 48,
56 | height: 16,
57 | )
58 | ],
59 | leading: IconButton(
60 | icon: Icon(
61 | Icons.arrow_back,
62 | color: Colors.black,
63 | ),
64 | onPressed: () {
65 | Navigator.of(context).pop();
66 | }),
67 | ),
68 | body: Builder(
69 | builder: (context) {
70 | return Container(
71 | color: Colors.grey.shade100,
72 | child: GridView.builder(
73 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 0.68),
74 | itemBuilder: (context, position) {
75 | return gridItem(context, position);
76 | },
77 | itemCount: listImage.length,
78 | ),
79 | margin: EdgeInsets.only(bottom: 8, left: 4, right: 4, top: 8),
80 | );
81 | },
82 | ),
83 | );
84 | }
85 |
86 | filterSortListOption() {
87 | return Container(
88 | padding: EdgeInsets.only(top: 8, bottom: 8),
89 | color: Colors.white,
90 | child: Row(
91 | children: [
92 | Expanded(
93 | child: filterRow(Icons.filter_list, "Filter"),
94 | flex: 30,
95 | ),
96 | divider(),
97 | Expanded(
98 | child: filterRow(Icons.sort, "Sort"),
99 | flex: 30,
100 | ),
101 | divider(),
102 | Expanded(
103 | child: filterRow(Icons.list, "List"),
104 | flex: 30,
105 | ),
106 | ],
107 | ),
108 | );
109 | }
110 |
111 | divider() {
112 | return Container(
113 | width: 2,
114 | color: Colors.grey.shade400,
115 | height: 20,
116 | );
117 | }
118 |
119 | filterRow(IconData icon, String title) {
120 | return Container(
121 | alignment: Alignment.center,
122 | child: Row(
123 | mainAxisAlignment: MainAxisAlignment.center,
124 | children: [
125 | Icon(
126 | icon,
127 | color: Colors.grey,
128 | ),
129 | Utils.getSizedBox(width: 4),
130 | Text(
131 | title,
132 | style: CustomTextStyle.textFormFieldBold.copyWith(color: Colors.black.withOpacity(0.8), fontSize: 12),
133 | )
134 | ],
135 | ),
136 | );
137 | }
138 |
139 | gridItem(BuildContext context, int position) {
140 | return GestureDetector(
141 | onTap: () {
142 | filterBottomSheet(context);
143 | },
144 | child: Container(
145 | decoration: BoxDecoration(
146 | color: Colors.white,
147 | borderRadius: BorderRadius.all(Radius.circular(6)),
148 | border: Border.all(color: Colors.grey.shade200)),
149 | padding: EdgeInsets.only(left: 10, top: 10),
150 | margin: EdgeInsets.all(8),
151 | child: Column(
152 | children: [
153 | Container(
154 | margin: EdgeInsets.only(right: 12),
155 | alignment: Alignment.topRight,
156 | child: Container(
157 | alignment: Alignment.center,
158 | width: 24,
159 | height: 24,
160 | decoration: BoxDecoration(shape: BoxShape.circle, color: Colors.indigo),
161 | child: Text(
162 | "30%",
163 | textAlign: TextAlign.center,
164 | style: CustomTextStyle.textFormFieldBold.copyWith(color: Colors.white, fontSize: 10),
165 | ),
166 | ),
167 | ),
168 | Image(
169 | image: AssetImage(listImage[position]),
170 | height: 170,
171 | fit: BoxFit.none,
172 | ),
173 | gridBottomView()
174 | ],
175 | ),
176 | ),
177 | );
178 | }
179 |
180 | gridBottomView() {
181 | return Container(
182 | child: Column(
183 | children: [
184 | Container(
185 | child: Text(
186 | "Chair Dacey li - Black",
187 | style: CustomTextStyle.textFormFieldBold.copyWith(fontSize: 12),
188 | textAlign: TextAlign.start,
189 | ),
190 | alignment: Alignment.topLeft,
191 | ),
192 | Utils.getSizedBox(height: 6),
193 | Row(
194 | crossAxisAlignment: CrossAxisAlignment.start,
195 | children: [
196 | Text(
197 | "\$50.00",
198 | style: CustomTextStyle.textFormFieldBold.copyWith(color: Colors.indigo.shade700, fontSize: 14),
199 | ),
200 | Utils.getSizedBox(width: 8),
201 | Text(
202 | "\$80.00",
203 | style: CustomTextStyle.textFormFieldBold
204 | .copyWith(color: Colors.grey, fontSize: 14, decoration: TextDecoration.lineThrough),
205 | ),
206 | ],
207 | ),
208 | Utils.getSizedBox(height: 6),
209 | Row(
210 | crossAxisAlignment: CrossAxisAlignment.start,
211 | children: [
212 | FlutterRatingBar(
213 | initialRating: 4,
214 | itemSize: 14,
215 | itemCount: 5,
216 | fillColor: Colors.amber,
217 | borderColor: Colors.amber.withAlpha(50),
218 | allowHalfRating: true,
219 | onRatingUpdate: (rating) {},
220 | ),
221 | Utils.getSizedBox(width: 4),
222 | Text(
223 | "4.5",
224 | style: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.black, fontSize: 14),
225 | ),
226 | ],
227 | )
228 | ],
229 | ),
230 | );
231 | }
232 |
233 | void addImage() {
234 | listImage.add("images/ic_chair.png");
235 | listImage.add("images/ic_chair1.png");
236 | listImage.add("images/ic_chair2.png");
237 | listImage.add("images/ic_chair4.png");
238 | listImage.add("images/ic_table.png");
239 | listImage.add("images/ic_table1.png");
240 | }
241 |
242 | filterBottomSheet(BuildContext context) {
243 | _scaffoldKey.currentState.showBottomSheet(
244 | (context) {
245 | return filterBottomSheetContent();
246 | },
247 | shape: RoundedRectangleBorder(
248 | borderRadius: BorderRadius.only(topRight: Radius.circular(16), topLeft: Radius.circular(16))),
249 | );
250 | }
251 |
252 | filterBottomSheetContent() {
253 | return Container(
254 | padding: EdgeInsets.only(left: 16, right: 16, top: 10),
255 | decoration: BoxDecoration(
256 | color: Colors.white,
257 | border: Border.all(color: Colors.grey.shade200, width: 1),
258 | borderRadius: BorderRadius.only(topRight: Radius.circular(16), topLeft: Radius.circular(16)),
259 | ),
260 | width: double.infinity,
261 | child: Column(
262 | mainAxisSize: MainAxisSize.min,
263 | crossAxisAlignment: CrossAxisAlignment.start,
264 | children: [
265 | Utils.getSizedBox(height: 8),
266 | Row(
267 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
268 | children: [
269 | Icon(
270 | Icons.close,
271 | ),
272 | Text(
273 | "Filter",
274 | style: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.black.withOpacity(0.8), fontSize: 16),
275 | ),
276 | Text(
277 | "Reset",
278 | style: CustomTextStyle.textFormFieldBold.copyWith(color: Colors.indigo, fontSize: 16),
279 | ),
280 | ],
281 | ),
282 | Utils.getSizedBox(height: 28),
283 | Container(
284 | child: Text("Price Range", style: CustomTextStyle.textFormFieldMedium),
285 | margin: EdgeInsets.only(left: 4),
286 | ),
287 | Utils.getSizedBox(height: 14),
288 | Row(
289 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
290 | children: [
291 | Expanded(
292 | child: Container(
293 | child: TextFormField(
294 | decoration: InputDecoration(
295 | hintText: "Minimum",
296 | hintStyle: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.grey.shade800),
297 | focusedBorder: border,
298 | contentPadding: EdgeInsets.only(right: 8, left: 8, top: 12, bottom: 12),
299 | border: border,
300 | enabledBorder: border,
301 | ),
302 | ),
303 | ),
304 | flex: 47,
305 | ),
306 | Expanded(
307 | child: Container(
308 | margin: EdgeInsets.only(left: 4),
309 | height: 1,
310 | color: Colors.grey,
311 | ),
312 | flex: 6,
313 | ),
314 | Expanded(
315 | child: Container(
316 | margin: EdgeInsets.only(left: 4),
317 | child: TextFormField(
318 | decoration: InputDecoration(
319 | hintText: "Maximum",
320 | hintStyle: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.grey.shade800),
321 | focusedBorder: border,
322 | contentPadding: EdgeInsets.only(right: 8, left: 8, top: 12, bottom: 12),
323 | border: border,
324 | enabledBorder: border,
325 | ),
326 | ),
327 | ),
328 | flex: 47,
329 | ),
330 | ],
331 | ),
332 | Utils.getSizedBox(height: 16),
333 | Container(
334 | child: Text("Item Filter", style: CustomTextStyle.textFormFieldMedium.copyWith(fontSize: 16)),
335 | margin: EdgeInsets.only(left: 4),
336 | ),
337 | Utils.getSizedBox(height: 8),
338 | ListView.builder(
339 | primary: false,
340 | itemBuilder: (context, position) {
341 | return Container(
342 | margin: EdgeInsets.only(top: 4, bottom: 4, left: 4),
343 | child: Column(
344 | children: [
345 | Row(
346 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
347 | children: [
348 | Text(
349 | "Discount",
350 | style: CustomTextStyle.textFormFieldRegular.copyWith(fontSize: 14, color: Colors.grey),
351 | ),
352 | Icon(
353 | Icons.check,
354 | color: Colors.indigo,
355 | )
356 | ],
357 | ),
358 | Utils.getSizedBox(height: 4),
359 | Container(
360 | width: double.infinity,
361 | height: 1,
362 | color: Colors.grey,
363 | )
364 | ],
365 | ),
366 | );
367 | },
368 | itemCount: 3,
369 | shrinkWrap: true,
370 | ),
371 | Utils.getSizedBox(height: 16),
372 | Container(
373 | child: Text("Item Color", style: CustomTextStyle.textFormFieldMedium),
374 | margin: EdgeInsets.only(left: 4),
375 | ),
376 | Utils.getSizedBox(height: 8),
377 | ConstrainedBox(
378 | constraints: BoxConstraints(maxHeight: 30),
379 | child: ListView.builder(
380 | primary: false,
381 | scrollDirection: Axis.horizontal,
382 | itemBuilder: (context, position) {
383 | return Container(
384 | margin: EdgeInsets.only(top: 4, bottom: 4, left: 4),
385 | width: 24,
386 | height: 24,
387 | decoration: BoxDecoration(shape: BoxShape.circle, color: listItemColor[position]),
388 | );
389 | },
390 | itemCount: listItemColor.length,
391 | shrinkWrap: true,
392 | ),
393 | ),
394 | Utils.getSizedBox(height: 8),
395 | Container(
396 | width: double.infinity,
397 | child: RaisedButton(
398 | onPressed: () {},
399 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4))),
400 | child: Text(
401 | "Apply Filter",
402 | style: CustomTextStyle.textFormFieldMedium.copyWith(color: Colors.white),
403 | ),
404 | color: Colors.indigo,
405 | ),
406 | )
407 | ],
408 | ),
409 | );
410 | }
411 |
412 | var border = OutlineInputBorder(
413 | borderRadius: BorderRadius.all(Radius.circular(8)),
414 | borderSide: BorderSide(color: Colors.grey.shade300, width: 1));
415 | }
416 |
--------------------------------------------------------------------------------
/lib/signup.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:shopping_cart/utils/CustomBorder.dart';
3 | import 'package:shopping_cart/utils/CustomTextStyle.dart';
4 | import 'package:shopping_cart/utils/CustomUtils.dart';
5 |
6 | class SignUp extends StatefulWidget {
7 | @override
8 | _SignUpState createState() => _SignUpState();
9 | }
10 |
11 | class _SignUpState extends State {
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | backgroundColor: Colors.white,
16 | resizeToAvoidBottomInset: false,
17 | body: Container(
18 | width: double.infinity,
19 | child: Column(
20 | children: [
21 | Expanded(
22 | child: Image(
23 | image: AssetImage("images/ic_logo.png"),
24 | color: Colors.blue,
25 | height: 140,
26 | alignment: Alignment.center,
27 | width: 200),
28 | flex: 50,
29 | ),
30 | Expanded(
31 | child: Container(
32 | margin: EdgeInsets.all(16),
33 | child: Column(
34 | children: [
35 | TextFormField(
36 | decoration: InputDecoration(
37 | contentPadding: EdgeInsets.fromLTRB(16, 16, 16, 12),
38 | border: CustomBorder.enabledBorder,
39 | labelText: "Name",
40 | focusedBorder: CustomBorder.focusBorder,
41 | errorBorder: CustomBorder.errorBorder,
42 | enabledBorder: CustomBorder.enabledBorder,
43 | labelStyle: CustomTextStyle.textFormFieldRegular
44 | .copyWith(fontSize: MediaQuery.of(context).textScaleFactor * 16, color: Colors.black)),
45 | keyboardType: TextInputType.text),
46 | Utils.getSizedBox(height: 20),
47 | TextFormField(
48 | decoration: InputDecoration(
49 | contentPadding: EdgeInsets.fromLTRB(16, 16, 16, 12),
50 | border: CustomBorder.enabledBorder,
51 | labelText: "Mobile Number",
52 | focusedBorder: CustomBorder.focusBorder,
53 | errorBorder: CustomBorder.errorBorder,
54 | enabledBorder: CustomBorder.enabledBorder,
55 | labelStyle: CustomTextStyle.textFormFieldRegular
56 | .copyWith(fontSize: MediaQuery.of(context).textScaleFactor * 16, color: Colors.black)),
57 | keyboardType: TextInputType.number),
58 | Utils.getSizedBox(height: 20),
59 | TextFormField(
60 | decoration: InputDecoration(
61 | contentPadding: EdgeInsets.fromLTRB(16, 16, 16, 12),
62 | border: CustomBorder.enabledBorder,
63 | labelText: "Email",
64 | focusedBorder: CustomBorder.focusBorder,
65 | errorBorder: CustomBorder.errorBorder,
66 | enabledBorder: CustomBorder.enabledBorder,
67 | labelStyle: CustomTextStyle.textFormFieldRegular
68 | .copyWith(fontSize: MediaQuery.of(context).textScaleFactor * 16, color: Colors.black)),
69 | keyboardType: TextInputType.emailAddress),
70 | Utils.getSizedBox(height: 20),
71 | TextFormField(
72 | decoration: InputDecoration(
73 | contentPadding: EdgeInsets.fromLTRB(16, 16, 16, 12),
74 | border: CustomBorder.enabledBorder,
75 | labelText: "Password",
76 | focusedBorder: CustomBorder.focusBorder,
77 | errorBorder: CustomBorder.errorBorder,
78 | enabledBorder: CustomBorder.enabledBorder,
79 | labelStyle: CustomTextStyle.textFormFieldRegular
80 | .copyWith(fontSize: MediaQuery.of(context).textScaleFactor * 16, color: Colors.black)),
81 | obscureText: true,
82 | ),
83 | Utils.getSizedBox(height: 20),
84 | Container(
85 | width: double.infinity,
86 | child: RaisedButton(
87 | onPressed: () {},
88 | child: Text(
89 | "SIGNUP",
90 | style: CustomTextStyle.textFormFieldRegular.copyWith(color: Colors.white, fontSize: 14),
91 | ),
92 | color: Colors.blue,
93 | textColor: Colors.white,
94 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(4))),
95 | ),
96 | ),
97 | ],
98 | ),
99 | ),
100 | flex: 50,
101 | )
102 | ],
103 | ),
104 | ),
105 | );
106 | }
107 | }
108 |
--------------------------------------------------------------------------------
/lib/utils/BottomNavigationBarProvider.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/foundation.dart';
2 |
3 | class BottomNavigationBarProvider with ChangeNotifier {
4 | int _currentIndex = 0;
5 |
6 | get currentIndex => _currentIndex;
7 |
8 | set currentIndex(int index) {
9 | _currentIndex = index;
10 | notifyListeners();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/utils/CustomBorder.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CustomBorder {
4 | static var enabledBorder = OutlineInputBorder(
5 | borderRadius: BorderRadius.all(Radius.circular(4)),
6 | borderSide: BorderSide(color: Colors.grey));
7 |
8 | static var focusBorder = OutlineInputBorder(
9 | borderRadius: BorderRadius.all(Radius.circular(4)),
10 | borderSide: BorderSide(color: ThemeData.light().primaryColor, width: 1));
11 |
12 | static var errorBorder = OutlineInputBorder(
13 | borderRadius: BorderRadius.all(Radius.circular(4)),
14 | borderSide: BorderSide(color: Colors.red, width: 1));
15 | }
16 |
--------------------------------------------------------------------------------
/lib/utils/CustomColors.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CustomColors {
4 | static var COLOR_FB = Color(0xFF3b5998);
5 | static var COLOR_GREEN = Color(0xFF01a550);
6 | static var EDIT_PROFILE_PIC_FIRST_GRADIENT = Color(0xFF6713D2);
7 | static var EDIT_PROFILE_PIC_SECOND_GRADIENT = Color(0xFFCC208E);
8 | }
9 |
--------------------------------------------------------------------------------
/lib/utils/CustomRoutes.dart:
--------------------------------------------------------------------------------
1 | class CustomRoutes {
2 | //static const
3 | }
4 |
--------------------------------------------------------------------------------
/lib/utils/CustomTextStyle.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CustomTextStyle {
4 | static var textFormFieldRegular = TextStyle(
5 | fontSize: 16,
6 | fontFamily: "Helvetica",
7 | color: Colors.black,
8 | fontWeight: FontWeight.w400);
9 |
10 | static var textFormFieldLight =
11 | textFormFieldRegular.copyWith(fontWeight: FontWeight.w200);
12 |
13 | static var textFormFieldMedium =
14 | textFormFieldRegular.copyWith(fontWeight: FontWeight.w500);
15 |
16 | static var textFormFieldSemiBold =
17 | textFormFieldRegular.copyWith(fontWeight: FontWeight.w600);
18 |
19 | static var textFormFieldBold =
20 | textFormFieldRegular.copyWith(fontWeight: FontWeight.w700);
21 |
22 | static var textFormFieldBlack =
23 | textFormFieldRegular.copyWith(fontWeight: FontWeight.w900);
24 | }
25 |
--------------------------------------------------------------------------------
/lib/utils/CustomUtils.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class Utils {
4 | static getSizedBox({double width, double height}) {
5 | return SizedBox(
6 | height: height,
7 | width: width,
8 | );
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | async:
5 | dependency: transitive
6 | description:
7 | name: async
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "2.2.0"
11 | boolean_selector:
12 | dependency: transitive
13 | description:
14 | name: boolean_selector
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.0.5"
18 | charcode:
19 | dependency: transitive
20 | description:
21 | name: charcode
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.1.2"
25 | collection:
26 | dependency: transitive
27 | description:
28 | name: collection
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.14.11"
32 | cupertino_icons:
33 | dependency: "direct main"
34 | description:
35 | name: cupertino_icons
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "0.1.2"
39 | flutter:
40 | dependency: "direct main"
41 | description: flutter
42 | source: sdk
43 | version: "0.0.0"
44 | flutter_money_formatter:
45 | dependency: "direct main"
46 | description:
47 | name: flutter_money_formatter
48 | url: "https://pub.dartlang.org"
49 | source: hosted
50 | version: "0.4.8+1"
51 | flutter_rating_bar:
52 | dependency: "direct main"
53 | description:
54 | name: flutter_rating_bar
55 | url: "https://pub.dartlang.org"
56 | source: hosted
57 | version: "1.2.0"
58 | flutter_test:
59 | dependency: "direct dev"
60 | description: flutter
61 | source: sdk
62 | version: "0.0.0"
63 | intl:
64 | dependency: transitive
65 | description:
66 | name: intl
67 | url: "https://pub.dartlang.org"
68 | source: hosted
69 | version: "0.15.8"
70 | matcher:
71 | dependency: transitive
72 | description:
73 | name: matcher
74 | url: "https://pub.dartlang.org"
75 | source: hosted
76 | version: "0.12.5"
77 | meta:
78 | dependency: transitive
79 | description:
80 | name: meta
81 | url: "https://pub.dartlang.org"
82 | source: hosted
83 | version: "1.1.6"
84 | path:
85 | dependency: transitive
86 | description:
87 | name: path
88 | url: "https://pub.dartlang.org"
89 | source: hosted
90 | version: "1.6.2"
91 | pedantic:
92 | dependency: transitive
93 | description:
94 | name: pedantic
95 | url: "https://pub.dartlang.org"
96 | source: hosted
97 | version: "1.8.0+1"
98 | provider:
99 | dependency: "direct main"
100 | description:
101 | name: provider
102 | url: "https://pub.dartlang.org"
103 | source: hosted
104 | version: "3.0.0+1"
105 | quiver:
106 | dependency: transitive
107 | description:
108 | name: quiver
109 | url: "https://pub.dartlang.org"
110 | source: hosted
111 | version: "2.0.3"
112 | sky_engine:
113 | dependency: transitive
114 | description: flutter
115 | source: sdk
116 | version: "0.0.99"
117 | source_span:
118 | dependency: transitive
119 | description:
120 | name: source_span
121 | url: "https://pub.dartlang.org"
122 | source: hosted
123 | version: "1.5.5"
124 | stack_trace:
125 | dependency: transitive
126 | description:
127 | name: stack_trace
128 | url: "https://pub.dartlang.org"
129 | source: hosted
130 | version: "1.9.3"
131 | stream_channel:
132 | dependency: transitive
133 | description:
134 | name: stream_channel
135 | url: "https://pub.dartlang.org"
136 | source: hosted
137 | version: "2.0.0"
138 | string_scanner:
139 | dependency: transitive
140 | description:
141 | name: string_scanner
142 | url: "https://pub.dartlang.org"
143 | source: hosted
144 | version: "1.0.4"
145 | term_glyph:
146 | dependency: transitive
147 | description:
148 | name: term_glyph
149 | url: "https://pub.dartlang.org"
150 | source: hosted
151 | version: "1.1.0"
152 | test_api:
153 | dependency: transitive
154 | description:
155 | name: test_api
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "0.2.5"
159 | typed_data:
160 | dependency: transitive
161 | description:
162 | name: typed_data
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "1.1.6"
166 | vector_math:
167 | dependency: transitive
168 | description:
169 | name: vector_math
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "2.0.8"
173 | sdks:
174 | dart: ">=2.2.2 <3.0.0"
175 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: shopping_cart
2 | description: A new Flutter shopping cart application.
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.0+1
15 |
16 | environment:
17 | sdk: ">=2.1.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: ^0.1.2
26 | flutter_rating_bar: ^1.1.0
27 | money_formatter: ^0.0.3
28 | provider: ^6.0.2
29 |
30 |
31 | dev_dependencies:
32 | flutter_test:
33 | sdk: flutter
34 |
35 |
36 | # For information on the generic Dart part of this file, see the
37 | # following page: https://dart.dev/tools/pub/pubspec
38 |
39 | # The following section is specific to Flutter.
40 | flutter:
41 |
42 | # The following line ensures that the Material Icons font is
43 | # included with your application, so that you can use the icons in
44 | # the material Icons class.
45 | uses-material-design: true
46 |
47 | # To add assets to your application, add an assets section, like this:
48 | assets:
49 | - images/ic_logo.png
50 | - images/slider_img.webp
51 | - images/shoes_1.png
52 | - images/shoes_2.png
53 | - images/shoes_3.png
54 | - images/shoes_4.png
55 | - images/shoes_5.png
56 | - images/shoes_6.png
57 | - images/ic_thank_you.png
58 | - images/shoes_7.png
59 | - images/ic_user_profile.png
60 | - images/details_shoes_image.webp
61 | - images/ic_about_us.png
62 | - images/ic_invite_friends.png
63 | - images/ic_notification.png
64 | - images/ic_payment.png
65 | - images/ic_refer_friends_bg.jpg
66 | - images/ic_logout.png
67 | - images/ic_reward_credits.png
68 | - images/ic_promo_code.png
69 | - images/ic_settings.png
70 | - images/ic_qr_code.svg
71 | - images/ic_qr_code.png
72 | - images/ic_support.png
73 | - images/ic_chair.png
74 | - images/ic_chair1.png
75 | - images/ic_chair2.png
76 | - images/ic_chair4.png
77 | - images/ic_table.png
78 | - images/ic_table1.png
79 | - images/ic_search.png
80 | - images/ic_shopping_cart.png
81 |
82 | # An image asset can refer to one or more resolution-specific "variants", see
83 | # https://flutter.dev/assets-and-images/#resolution-aware.
84 |
85 | # For details regarding adding assets from package dependencies, see
86 | # https://flutter.dev/assets-and-images/#from-packages
87 |
88 | # To add custom fonts to your application, add a fonts section here,
89 | # in this "flutter" section. Each entry in this list should have a
90 | # "family" key with the font family name, and a "fonts" key with a
91 | # list giving the asset and other descriptors for the font. For
92 | # example:
93 | fonts:
94 | - family: Helvetica
95 | fonts:
96 | - asset: fonts/helvetica/HelveticaNeue_Light.ttf
97 | weight: 200
98 | - asset: fonts/helvetica/HelveticaNeue_Regular.ttf
99 | weight: 400
100 | - asset: fonts/helvetica/HelveticaNeue_Medium.ttf
101 | weight: 500
102 | - asset: fonts/helvetica/HelveticaNeue-Bold.ttf
103 | weight: 700
104 | - asset: fonts/helvetica/HelveticaNeue_BlackCond.ttf
105 | weight: 900
106 | #
107 | # For details regarding fonts from package dependencies,
108 | # see https://flutter.dev/custom-fonts/#from-packages
109 |
--------------------------------------------------------------------------------
/screenshot/Checkout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Checkout.png
--------------------------------------------------------------------------------
/screenshot/Edit Profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Edit Profile.png
--------------------------------------------------------------------------------
/screenshot/Filter Bottom Sheet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Filter Bottom Sheet.png
--------------------------------------------------------------------------------
/screenshot/Grid Item List.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Grid Item List.png
--------------------------------------------------------------------------------
/screenshot/Home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Home.png
--------------------------------------------------------------------------------
/screenshot/Invite Friends.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Invite Friends.png
--------------------------------------------------------------------------------
/screenshot/Login.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Login.png
--------------------------------------------------------------------------------
/screenshot/Notification.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Notification.png
--------------------------------------------------------------------------------
/screenshot/Order Placed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Order Placed.png
--------------------------------------------------------------------------------
/screenshot/Product Details.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Product Details.png
--------------------------------------------------------------------------------
/screenshot/Profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Profile.png
--------------------------------------------------------------------------------
/screenshot/Search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Search.png
--------------------------------------------------------------------------------
/screenshot/Share App.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Share App.png
--------------------------------------------------------------------------------
/screenshot/Signup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/Signup.png
--------------------------------------------------------------------------------
/screenshot/cart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sky-flutter/Flutter-Shopping-Cart/08c42892295fca01e77abcb972a04ec6f5559664/screenshot/cart.png
--------------------------------------------------------------------------------
/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:shopping_cart/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 |
--------------------------------------------------------------------------------