├── .firebase └── hosting.YnVpbGQvd2Vi.cache ├── .firebaserc ├── .gitignore ├── .metadata ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── google-services.json │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── lambiengcode │ │ │ │ └── now │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── 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-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets └── fonts │ ├── Lobster-Regular.ttf │ ├── Raleway-Bold.ttf │ └── Raleway-Regular.ttf ├── images ├── avt.jpg └── logo.png ├── integration_test ├── app_test.dart └── driver.dart ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-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 │ ├── GoogleService-Info.plist │ ├── Info.plist │ └── Runner-Bridging-Header.h └── build │ └── XCBuildData │ ├── 4fcc8765a108c9eeaa00f73faea63aa2-desc.xcbuild │ ├── 4fcc8765a108c9eeaa00f73faea63aa2-manifest.xcbuild │ ├── BuildDescriptionCacheIndex-fa21d26bfd60e1910c10f9fd0d3a17b9 │ ├── b31d203f1b6f2d699f6317d2746b47b4-desc.xcbuild │ ├── b31d203f1b6f2d699f6317d2746b47b4-manifest.xcbuild │ ├── bc9ebcfa6dd2f52ab0676423fc675327-desc.xcbuild │ ├── bc9ebcfa6dd2f52ab0676423fc675327-manifest.xcbuild │ ├── build.db │ ├── fa1d10a3492db203eae19353e83ca817-desc.xcbuild │ └── fa1d10a3492db203eae19353e83ca817-manifest.xcbuild ├── lib ├── main.dart └── src │ ├── app.dart │ ├── models │ ├── access.dart │ ├── member.dart │ ├── user.dart │ └── voucher.dart │ ├── pages │ ├── auth │ │ ├── auth_page.dart │ │ ├── login_page.dart │ │ └── signup_page.dart │ ├── card │ │ ├── card_page.dart │ │ └── pages │ │ │ └── add_point.dart │ ├── home │ │ ├── categories_page │ │ │ └── categories_page.dart │ │ ├── home_page.dart │ │ └── widgets │ │ │ ├── build_store_card.dart │ │ │ ├── carousel_widget.dart │ │ │ ├── freeship_list_page.dart │ │ │ └── voucher_list_page.dart │ ├── members │ │ ├── members_page.dart │ │ ├── pages │ │ │ ├── add_product_page.dart │ │ │ ├── add_voucher_page.dart │ │ │ ├── details_order_page.dart │ │ │ ├── edit_product_page.dart │ │ │ ├── edit_store_page.dart │ │ │ ├── edit_voucher_page.dart │ │ │ ├── manage_members_page.dart │ │ │ ├── manage_orders_page.dart │ │ │ ├── manage_products_page.dart │ │ │ └── manage_vouchers_page.dart │ │ └── widgets │ │ │ ├── bar_chart.dart │ │ │ ├── bottom_delete.dart │ │ │ ├── bottom_info.dart │ │ │ ├── manage_member_vertical_card.dart │ │ │ ├── manage_orders_horizontal_card.dart │ │ │ ├── manage_orders_vertical_card.dart │ │ │ ├── manage_product_horizontal_card.dart │ │ │ ├── manage_product_vertical_card.dart │ │ │ ├── manage_voucher_horizontal_card.dart │ │ │ ├── manage_voucher_vertical_card.dart │ │ │ ├── product_details_card.dart │ │ │ └── ranking_user_card.dart │ ├── navigation │ │ └── navigation.dart │ ├── notifications │ │ └── notifications_page.dart │ ├── orders │ │ └── orders_page.dart │ ├── profile │ │ ├── pages │ │ │ ├── my_address_page.dart │ │ │ ├── my_points_page.dart │ │ │ ├── my_profile_page.dart │ │ │ └── my_voucher_page.dart │ │ ├── profile_page.dart │ │ └── widgets │ │ │ └── my_voucher_card.dart │ ├── save │ │ ├── save_page.dart │ │ └── widgets │ │ │ └── save_card.dart │ ├── search │ │ ├── search_product_page.dart │ │ └── search_store_page.dart │ └── store │ │ ├── pages │ │ ├── list_product_page.dart │ │ ├── payment_page.dart │ │ └── product_page.dart │ │ ├── store_page.dart │ │ └── widgets │ │ ├── bottom_buy.dart │ │ └── carousel_banner.dart │ └── widgets │ ├── bottom_get_voucher.dart │ ├── loading.dart │ ├── product_horizontal_card.dart │ ├── product_vertical_card.dart │ ├── top_snackbar.dart │ ├── voucher_horizontal_card.dart │ └── voucher_verical_card.dart ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart └── web ├── favicon.png ├── icons ├── Icon-192.png └── Icon-512.png ├── index.html └── manifest.json /.firebase/hosting.YnVpbGQvd2Vi.cache: -------------------------------------------------------------------------------- 1 | 404.html,1609505474000,05cbc6f94d7a69ce2e29646eab13be2c884e61ba93e3094df5028866876d18b3 2 | favicon.png,1609247200000,fcc7c4545d5b62ad01682589e6fdc7ea03d0a3b42069963c815c344b632eb5cf 3 | manifest.json,1609247200000,61aff6125276f3faaec7a25f63c6b9b55b2af242f94727895ae74551ee9294b3 4 | assets/assets/fonts/Lobster-Regular.ttf,1609247200000,2e27603350a159bef5ac4ecc047759950936c11fdb5e6035b4be08c159f7b01e 5 | assets/assets/fonts/Raleway-Bold.ttf,1609247200000,75b371ff877111ef53aeebe01f45cb817fa92f3f954bfb2c04add39774cb69e7 6 | assets/assets/fonts/Raleway-Regular.ttf,1609247200000,5c05da31eb8439f4c5474e81a51824b7497798b465328a39a7d31456f04ae207 7 | assets/fonts/MaterialIcons-Regular.otf,1601068059000,76224879d6a5b24fbb0919442d3fe9a6433a69862b1b31980b3dfcb2adae5fba 8 | assets/images/avt.jpg,1609247200000,762394e2bb972a5f54f675d68fbb40445b421aa9cc9cc1873b8a2a71900ecc49 9 | assets/images/logo.png,1609247200000,bce673ab1a30a2c6c034822f086dc7de246f47f3914e4049f0637d8747b7900f 10 | assets/packages/cupertino_icons/assets/CupertinoIcons.ttf,1608107229000,3064af137aeffc9011ba060601a01177b279963822310a778aeafa74c209732c 11 | assets/packages/flutter_icons/fonts/AntDesign.ttf,1587003743000,3511d5655ede3265d5d3665d10d468ab3e0392dc44af3b6fa0dc69a3e942f093 12 | assets/packages/flutter_icons/fonts/Entypo.ttf,1587003743000,1deda733e5cfd9a5e9a997f1226c77517f2e2b50c2c9a210981384920dd5c497 13 | assets/packages/flutter_icons/fonts/EvilIcons.ttf,1587003743000,ee74313709d249fba9926b5b3468481055c2270a5dbea76f812dd2b4a97575ea 14 | assets/packages/flutter_icons/fonts/Feather.ttf,1587003743000,4ed2b37ae1fb87c5c13fd0c4522624cdcba5ed6b682a322d89df396121677912 15 | assets/packages/flutter_icons/fonts/FontAwesome.ttf,1587003743000,225dc03087123b26cb71296d418705ec2e89e826acd04bfe6fc6353a0f5220c8 16 | assets/packages/flutter_icons/fonts/FontAwesome5_Brands.ttf,1587003743000,f3ef9bab0a3d6aeaefc22ab579522ab5ddb8612ed6e63e5cd32ef4a023b42e35 17 | assets/packages/flutter_icons/fonts/FontAwesome5_Regular.ttf,1587003743000,320c143ce8ebb358c8062a947fa9cd548d38bcab9b3eb94d7f26e5f9286aa67a 18 | assets/packages/flutter_icons/fonts/FontAwesome5_Solid.ttf,1587003743000,770682e164e0f5f17cbeeeac516ba34a4c26699f6046673aa8fd331c08500409 19 | assets/packages/flutter_icons/fonts/Foundation.ttf,1587003743000,c467b886c9d0019dd7c0b82d1708781563cb89d998b23aa17ca90da41085f2d1 20 | assets/packages/flutter_icons/fonts/Ionicons.ttf,1587003743000,860db16ab997d30cd7c6ecf63efdbc32cc23f47b78d9d48e4e46c34f2577e69b 21 | assets/packages/flutter_icons/fonts/MaterialCommunityIcons.ttf,1587003743000,7f35b88e3011f14d97f2aac4d9f50105ed947cfda52ea170ba7ed9e75f8e1a63 22 | assets/packages/flutter_icons/fonts/MaterialIcons.ttf,1587003743000,7298099786723f37fad9d593142651d675024a6b25c3fa14ee1276a2b3e1f21e 23 | assets/packages/flutter_icons/fonts/Octicons.ttf,1587003743000,72125629c9015dafd635b0eff621b5411527f18b1eb67b5384189bf827fbf6d1 24 | assets/packages/flutter_icons/fonts/SimpleLineIcons.ttf,1587003743000,0008e9d91744a13909a740ae365d32d55027514b357e0c0890164cfc00959cfa 25 | assets/packages/flutter_icons/fonts/Zocial.ttf,1587003743000,efec3f0aeb872e97f20110f234f3be31dd8215682c8744f55566891a1bfbee21 26 | assets/packages/flutter_icons/fonts/weathericons.ttf,1587003743000,32add62abf86b04509624da9ab25db87b69fcd9f962af68eafc64607dd6df84a 27 | assets/packages/font_awesome_flutter/lib/fonts/fa-brands-400.ttf,1608144285000,6c58a74c2751992c7792024e10da60343e74663aa2c2cfd47ceff4344a0509e3 28 | assets/packages/font_awesome_flutter/lib/fonts/fa-regular-400.ttf,1608144285000,51492a9b393c104f611bf8f70a6e0c49c82a8b865307ff67a5f04fe5016d93aa 29 | assets/packages/font_awesome_flutter/lib/fonts/fa-solid-900.ttf,1608144285000,04c6eea6be55859d0c6544044314f9034dd64c9f14f2880c1efee4fcf400afda 30 | assets/packages/line_awesome_flutter/lib/fonts/LineAwesome.ttf,1576743570000,cb3c700906126501f54c20187e520e805e43fbf227b153bc95f1dd86061028a6 31 | icons/Icon-192.png,1609247200000,d2e0131bb7851eb9d98f7885edb5ae4b4d6b7a6c7addf8a25b9b712b39274c0f 32 | icons/Icon-512.png,1609247200000,7a31ce91e554f1941158ca46f31c7f3f2b7c8c129229ea74a8fae1affe335033 33 | version.json,1609762194000,d6d9c17fb2cbf478843dd709c6ae52f543e37d40c3452fad731fb012deb71367 34 | assets/AssetManifest.json,1609762194000,c92ee33d74546a590e82d2dcbc58bc3766fb7acd9d62c5765e34d0f8df161d9e 35 | index.html,1609762194000,6979f6fadd101a14b0029680d78401ead35e25933319d88a2ef0afbeec263a25 36 | assets/FontManifest.json,1609762194000,a1345cefdbcfff2f339cf48507e567c8d2032f11cdde1813d2bec77dcbebd4ee 37 | flutter_service_worker.js,1609762195000,03a3442619ca188949bd932627905d0759e36d37b569d62c65190dea06307b4e 38 | assets/NOTICES,1609762194000,c081735ead446c218abc10a0e1bccfc82d341c42eaf7543eaac3c202adb42abd 39 | main.dart.js,1609762193000,a44433bdd7f81ea90598c2d1c5b593f157c994e30c4f0db322af0d403d9dbfc0 40 | -------------------------------------------------------------------------------- /.firebaserc: -------------------------------------------------------------------------------- 1 | { 2 | "projects": { 3 | "default": "whoru-9b069" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /.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: 8f89f6505b941329a864fef1527243a72800bf4d 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # now 2 | 3 | A new Flutter application. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /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 30 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | defaultConfig { 36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 37 | applicationId "com.lambiengcode.now" 38 | minSdkVersion 21 39 | targetSdkVersion 30 40 | versionCode flutterVersionCode.toInteger() 41 | versionName flutterVersionName 42 | } 43 | 44 | buildTypes { 45 | release { 46 | signingConfig signingConfigs.debug 47 | minifyEnabled false 48 | shrinkResources false 49 | } 50 | } 51 | 52 | lintOptions { 53 | checkReleaseBuilds false 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | 61 | dependencies { 62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 63 | implementation platform('com.google.firebase:firebase-bom:25.12.0') 64 | implementation 'com.google.firebase:firebase-messaging' 65 | implementation 'com.google.firebase:firebase-analytics' 66 | } 67 | apply plugin: 'com.google.gms.google-services' 68 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "953311176777", 4 | "project_id": "now-app-a2d29", 5 | "storage_bucket": "now-app-a2d29.appspot.com" 6 | }, 7 | "client": [ 8 | { 9 | "client_info": { 10 | "mobilesdk_app_id": "1:953311176777:android:18223d8dd2ef12668d3798", 11 | "android_client_info": { 12 | "package_name": "com.lambiengcode.now" 13 | } 14 | }, 15 | "oauth_client": [ 16 | { 17 | "client_id": "953311176777-0gd376dtb9qnu91o3m0j099mkpc0bfqf.apps.googleusercontent.com", 18 | "client_type": 3 19 | } 20 | ], 21 | "api_key": [ 22 | { 23 | "current_key": "AIzaSyDYVBCHXWvjfPqnetylYUWeBOhhXcEWVpg" 24 | } 25 | ], 26 | "services": { 27 | "appinvite_service": { 28 | "other_platform_oauth_client": [ 29 | { 30 | "client_id": "953311176777-0gd376dtb9qnu91o3m0j099mkpc0bfqf.apps.googleusercontent.com", 31 | "client_type": 3 32 | }, 33 | { 34 | "client_id": "953311176777-63o3rbi86j1rvfiotkdf0kfu1pphh6uo.apps.googleusercontent.com", 35 | "client_type": 2, 36 | "ios_info": { 37 | "bundle_id": "com.lambiengcode.now" 38 | } 39 | } 40 | ] 41 | } 42 | } 43 | } 44 | ], 45 | "configuration_version": "1" 46 | } -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | // Add the following permission if your scenario involves reading the external storage: 12 | 13 | 14 | 15 | 16 | 17 | 20 | 22 | 29 | 33 | 37 | 42 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 57 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/lambiengcode/now/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.lambiengcode.now 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.4' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableDexingArtifactTransform=false -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /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 | } -------------------------------------------------------------------------------- /assets/fonts/Lobster-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/assets/fonts/Lobster-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/Raleway-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/assets/fonts/Raleway-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/Raleway-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/assets/fonts/Raleway-Regular.ttf -------------------------------------------------------------------------------- /images/avt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/images/avt.jpg -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/images/logo.png -------------------------------------------------------------------------------- /integration_test/app_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter integration 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 | import 'package:integration_test/integration_test.dart'; 11 | 12 | import 'package:now/main.dart' as app; 13 | 14 | void main() => run(_testMain); 15 | 16 | void _testMain() { 17 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 18 | // Build our app and trigger a frame. 19 | app.main(); 20 | 21 | // Trigger a frame. 22 | await tester.pumpAndSettle(); 23 | 24 | // Verify that our counter starts at 0. 25 | expect(find.text('0'), findsOneWidget); 26 | expect(find.text('1'), findsNothing); 27 | 28 | // Tap the '+' icon and trigger a frame. 29 | await tester.tap(find.byIcon(Icons.add)); 30 | await tester.pump(); 31 | 32 | // Verify that our counter has incremented. 33 | expect(find.text('0'), findsNothing); 34 | expect(find.text('1'), findsOneWidget); 35 | }); 36 | } 37 | -------------------------------------------------------------------------------- /integration_test/driver.dart: -------------------------------------------------------------------------------- 1 | // This file is provided as a convenience for running integration tests via the 2 | // flutter drive command. 3 | // 4 | // flutter drive --driver integration_test/driver.dart --target integration_test/app_test.dart 5 | 6 | import 'package:integration_test/integration_test_driver.dart'; 7 | 8 | Future main() => integrationDriver(); 9 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | 43 | # add the Firebase pod for Google Analytics 44 | pod 'Firebase/Analytics' 45 | # add pods for any other desired Firebase products 46 | # https://firebase.google.com/docs/ios/setup#available-pods 47 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | import GoogleMaps 4 | 5 | @UIApplicationMain 6 | @objc class AppDelegate: FlutterAppDelegate { 7 | override func application( 8 | _ application: UIApplication, 9 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 10 | ) -> Bool { 11 | GMSServices.provideAPIKey("AIzaSyANh3dtxFqZNVJOx1IVil1Wd4d_aQ_99BA") 12 | GeneratedPluginRegistrant.register(with: self) 13 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/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/GoogleService-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CLIENT_ID 6 | 953311176777-63o3rbi86j1rvfiotkdf0kfu1pphh6uo.apps.googleusercontent.com 7 | REVERSED_CLIENT_ID 8 | com.googleusercontent.apps.953311176777-63o3rbi86j1rvfiotkdf0kfu1pphh6uo 9 | API_KEY 10 | AIzaSyB3xmhSlDvK6C8XK7T_uGAsuFgPWX2nWn4 11 | GCM_SENDER_ID 12 | 953311176777 13 | PLIST_VERSION 14 | 1 15 | BUNDLE_ID 16 | com.lambiengcode.now 17 | PROJECT_ID 18 | now-app-a2d29 19 | STORAGE_BUCKET 20 | now-app-a2d29.appspot.com 21 | IS_ADS_ENABLED 22 | 23 | IS_ANALYTICS_ENABLED 24 | 25 | IS_APPINVITE_ENABLED 26 | 27 | IS_GCM_ENABLED 28 | 29 | IS_SIGNIN_ENABLED 30 | 31 | GOOGLE_APP_ID 32 | 1:953311176777:ios:24249b6984b2feba8d3798 33 | 34 | -------------------------------------------------------------------------------- /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 | now 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 | NSLocationWhenInUseUsageDescription 45 | Need location when in use 46 | NSLocationUsageDescription 47 | Older devices need location. 48 | NSLocationAlwaysUsageDescription 49 | This app needs access to location when in the background. 50 | NSLocationAlwaysAndWhenInUseUsageDescription 51 | This app needs access to location when open and in the background. 52 | NSCameraUsageDescription 53 | $(PRODUCT_NAME) Camera Usage! 54 | NSPhotoLibraryUsageDescription 55 | photos description. 56 | io.flutter.embedded_views_preview 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /ios/build/XCBuildData/4fcc8765a108c9eeaa00f73faea63aa2-desc.xcbuild: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/ios/build/XCBuildData/4fcc8765a108c9eeaa00f73faea63aa2-desc.xcbuild -------------------------------------------------------------------------------- /ios/build/XCBuildData/BuildDescriptionCacheIndex-fa21d26bfd60e1910c10f9fd0d3a17b9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/ios/build/XCBuildData/BuildDescriptionCacheIndex-fa21d26bfd60e1910c10f9fd0d3a17b9 -------------------------------------------------------------------------------- /ios/build/XCBuildData/b31d203f1b6f2d699f6317d2746b47b4-desc.xcbuild: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/ios/build/XCBuildData/b31d203f1b6f2d699f6317d2746b47b4-desc.xcbuild -------------------------------------------------------------------------------- /ios/build/XCBuildData/bc9ebcfa6dd2f52ab0676423fc675327-desc.xcbuild: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/ios/build/XCBuildData/bc9ebcfa6dd2f52ab0676423fc675327-desc.xcbuild -------------------------------------------------------------------------------- /ios/build/XCBuildData/build.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/ios/build/XCBuildData/build.db -------------------------------------------------------------------------------- /ios/build/XCBuildData/fa1d10a3492db203eae19353e83ca817-desc.xcbuild: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/ios/build/XCBuildData/fa1d10a3492db203eae19353e83ca817-desc.xcbuild -------------------------------------------------------------------------------- /lib/src/app.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | import 'package:now/src/pages/navigation/navigation.dart'; 4 | 5 | class App extends StatefulWidget { 6 | @override 7 | State createState() => _AppState(); 8 | } 9 | 10 | class _AppState extends State with WidgetsBindingObserver { 11 | @override 12 | void initState() { 13 | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( 14 | statusBarColor: Color(0xFF2C3D50), 15 | )); 16 | WidgetsBinding.instance.addObserver(this); 17 | SystemChrome.setPreferredOrientations([ 18 | DeviceOrientation.portraitDown, 19 | DeviceOrientation.portraitUp, 20 | ]); 21 | super.initState(); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Navigation(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/src/models/access.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 3 | 4 | class Access { 5 | final String title; 6 | final IconData icon; 7 | final Color color; 8 | Access({this.title, this.icon, this.color}); 9 | } 10 | 11 | List actions = [ 12 | new Access( 13 | title: 'Burger', 14 | icon: FontAwesomeIcons.hamburger, 15 | color: Colors.blueAccent.shade400, 16 | ), 17 | new Access( 18 | title: 'Pizza', 19 | icon: FontAwesomeIcons.pizzaSlice, 20 | color: Colors.redAccent, 21 | ), 22 | new Access( 23 | title: 'Hot Dog', 24 | icon: FontAwesomeIcons.hotdog, 25 | color: Colors.red.shade300, 26 | ), 27 | new Access( 28 | title: 'Drink', 29 | icon: FontAwesomeIcons.wineGlass, 30 | color: Colors.deepOrange.shade400, 31 | ), 32 | new Access( 33 | title: 'Wine', 34 | icon: FontAwesomeIcons.wineBottle, 35 | color: Colors.green.shade600, 36 | ), 37 | new Access( 38 | title: 'Coffee', 39 | icon: FontAwesomeIcons.mugHot, 40 | color: Colors.brown.shade400), 41 | new Access( 42 | title: 'Cocktail', 43 | icon: FontAwesomeIcons.cocktail, 44 | color: Colors.deepPurple.shade400, 45 | ), 46 | new Access( 47 | title: 'Beer', 48 | icon: FontAwesomeIcons.beer, 49 | color: Colors.amber, 50 | ), 51 | new Access( 52 | title: 'Cheese', 53 | icon: FontAwesomeIcons.cheese, 54 | color: Colors.pink.shade300, 55 | ), 56 | new Access( 57 | title: 'Fruit', 58 | icon: FontAwesomeIcons.appleAlt, 59 | color: Colors.red, 60 | ), 61 | ]; 62 | -------------------------------------------------------------------------------- /lib/src/models/member.dart: -------------------------------------------------------------------------------- 1 | class Member { 2 | final String username; 3 | final String urlToImage; 4 | Member({this.username, this.urlToImage}); 5 | } 6 | 7 | List members = [ 8 | new Member( 9 | username: 'Hồng Vinh', 10 | urlToImage: 11 | 'https://avatars2.githubusercontent.com/u/60530946?s=460&u=e342f079ed3571122e21b42eedd0ae251a9d91ce&v=4'), 12 | new Member( 13 | username: 'Hồng Vinh', 14 | urlToImage: 15 | 'https://avatars2.githubusercontent.com/u/60530946?s=460&u=e342f079ed3571122e21b42eedd0ae251a9d91ce&v=4'), 16 | new Member( 17 | username: 'Hồng Vinh', 18 | urlToImage: 19 | 'https://avatars2.githubusercontent.com/u/60530946?s=460&u=e342f079ed3571122e21b42eedd0ae251a9d91ce&v=4'), 20 | new Member( 21 | username: 'Hồng Vinh', 22 | urlToImage: 23 | 'https://avatars2.githubusercontent.com/u/60530946?s=460&u=e342f079ed3571122e21b42eedd0ae251a9d91ce&v=4'), 24 | new Member( 25 | username: 'Hồng Vinh', 26 | urlToImage: 27 | 'https://avatars2.githubusercontent.com/u/60530946?s=460&u=e342f079ed3571122e21b42eedd0ae251a9d91ce&v=4'), 28 | new Member( 29 | username: 'Hồng Vinh', 30 | urlToImage: 31 | 'https://avatars2.githubusercontent.com/u/60530946?s=460&u=e342f079ed3571122e21b42eedd0ae251a9d91ce&v=4'), 32 | new Member( 33 | username: 'lambiengcode', 34 | urlToImage: 35 | 'https://avatars2.githubusercontent.com/u/60530946?s=460&u=e342f079ed3571122e21b42eedd0ae251a9d91ce&v=4'), 36 | ]; 37 | -------------------------------------------------------------------------------- /lib/src/models/user.dart: -------------------------------------------------------------------------------- 1 | class User { 2 | final String uid; 3 | User({this.uid}); 4 | } 5 | -------------------------------------------------------------------------------- /lib/src/models/voucher.dart: -------------------------------------------------------------------------------- 1 | class Voucher { 2 | final String title; 3 | final String urlToImage; 4 | 5 | Voucher({this.title, this.urlToImage}); 6 | } 7 | 8 | List vouchers = [ 9 | new Voucher( 10 | title: 'Voucher Lorem sales off 50%', 11 | urlToImage: 12 | 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRqVFM3eeNS5N7qXVX4VgIJzp4i5tEFzFN7-Q&usqp=CAU', 13 | ), 14 | new Voucher( 15 | title: 'Voucher Makeup sales off 50%', 16 | urlToImage: 17 | 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSttOpbEI7VZYsl0rbtCGXVmsgWwOU7rXCimg&usqp=CAU', 18 | ), 19 | new Voucher( 20 | title: 'Discout 50% for all product in store', 21 | urlToImage: 22 | 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRwR3JctxlYYb45xtTum64b0po9feENNO81Bw&usqp=CAU', 23 | ), 24 | ]; 25 | -------------------------------------------------------------------------------- /lib/src/pages/auth/auth_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:now/src/pages/auth/login_page.dart'; 3 | import 'package:now/src/pages/auth/signup_page.dart'; 4 | 5 | class AuthenticatePage extends StatefulWidget { 6 | @override 7 | State createState() => _AuthenticatePageState(); 8 | } 9 | 10 | class _AuthenticatePageState extends State { 11 | bool showSignIn = true; 12 | 13 | @override 14 | void initState() { 15 | super.initState(); 16 | } 17 | 18 | switchScreen() { 19 | setState(() { 20 | showSignIn = !showSignIn; 21 | }); 22 | } 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return showSignIn 27 | ? LoginPage( 28 | toggleView: switchScreen, 29 | ) 30 | : SignupPage( 31 | toggleView: switchScreen, 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/src/pages/home/categories_page/categories_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | import '../widgets/build_store_card.dart'; 6 | 7 | class CategoriesPage extends StatefulWidget { 8 | final String title; 9 | CategoriesPage({this.title}); 10 | @override 11 | State createState() => _CategoriesPageState(); 12 | } 13 | 14 | class _CategoriesPageState extends State { 15 | @override 16 | Widget build(BuildContext context) { 17 | final _size = MediaQuery.of(context).size; 18 | return Scaffold( 19 | appBar: AppBar( 20 | brightness: Brightness.light, 21 | backgroundColor: Colors.white, 22 | elevation: 2.5, 23 | centerTitle: true, 24 | leading: IconButton( 25 | onPressed: () => Get.back(), 26 | icon: Icon( 27 | Feather.arrow_left, 28 | size: _size.width / 15.0, 29 | color: Colors.grey.shade800, 30 | ), 31 | ), 32 | title: Text( 33 | widget.title, 34 | style: TextStyle( 35 | fontSize: _size.width / 21.0, 36 | fontWeight: FontWeight.bold, 37 | color: Colors.grey.shade800, 38 | ), 39 | ), 40 | ), 41 | body: Container( 42 | child: ListView.builder( 43 | itemCount: 10, 44 | itemBuilder: (context, index) { 45 | return BuildVerticalStoreCard(); 46 | }, 47 | ), 48 | ), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/src/pages/home/widgets/build_store_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | class BuildVerticalStoreCard extends StatefulWidget { 7 | @override 8 | State createState() => _BuildVerticalStoreCardState(); 9 | } 10 | 11 | class _BuildVerticalStoreCardState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | final _size = MediaQuery.of(context).size; 15 | return GestureDetector( 16 | onTap: () => Get.toNamed('/store/Highlands Coffee'), 17 | child: Container( 18 | margin: EdgeInsets.only( 19 | bottom: 4.0, 20 | ), 21 | padding: EdgeInsets.symmetric( 22 | horizontal: 4.0, 23 | vertical: 6.0, 24 | ), 25 | decoration: BoxDecoration( 26 | color: Colors.white, 27 | border: Border( 28 | bottom: BorderSide(color: Colors.grey.shade400, width: .4), 29 | ), 30 | ), 31 | child: Row( 32 | crossAxisAlignment: CrossAxisAlignment.start, 33 | mainAxisAlignment: MainAxisAlignment.start, 34 | children: [ 35 | Container( 36 | height: _size.width * .25, 37 | width: _size.width * .25, 38 | decoration: BoxDecoration( 39 | image: DecorationImage( 40 | image: NetworkImage( 41 | 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTRcMynRQ0TtZ0YwF6jgzgqqiZ4ukK7s5Qjrg&usqp=CAU'), 42 | fit: BoxFit.cover, 43 | ), 44 | ), 45 | ), 46 | SizedBox( 47 | width: 10.0, 48 | ), 49 | Expanded( 50 | child: Container( 51 | height: _size.width * .25, 52 | child: Column( 53 | crossAxisAlignment: CrossAxisAlignment.start, 54 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 55 | children: [ 56 | Column( 57 | crossAxisAlignment: CrossAxisAlignment.start, 58 | mainAxisAlignment: MainAxisAlignment.start, 59 | children: [ 60 | Text( 61 | 'Highlands Coffee', 62 | style: TextStyle( 63 | color: Colors.grey.shade800, 64 | fontSize: _size.width / 22.5, 65 | fontWeight: FontWeight.bold, 66 | ), 67 | ), 68 | SizedBox( 69 | height: 6.0, 70 | ), 71 | Row( 72 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 73 | children: [ 74 | Row( 75 | mainAxisAlignment: MainAxisAlignment.start, 76 | children: [ 77 | Icon( 78 | FontAwesomeIcons.solidStar, 79 | color: Colors.amber.shade600, 80 | size: _size.width / 22.5, 81 | ), 82 | SizedBox( 83 | width: 8.0, 84 | ), 85 | Padding( 86 | padding: EdgeInsets.only(top: 4.0), 87 | child: Text( 88 | '4.6', 89 | style: TextStyle( 90 | color: Colors.black, 91 | fontSize: _size.width / 26.5, 92 | fontWeight: FontWeight.w400, 93 | ), 94 | ), 95 | ), 96 | ], 97 | ), 98 | Padding( 99 | padding: EdgeInsets.only(right: 6.0), 100 | child: Text( 101 | '9.2 km', 102 | style: TextStyle( 103 | color: Colors.grey.shade700, 104 | fontSize: _size.width / 26.5, 105 | fontWeight: FontWeight.w400, 106 | ), 107 | ), 108 | ), 109 | ], 110 | ), 111 | ], 112 | ), 113 | Padding( 114 | padding: EdgeInsets.only(left: 2.0), 115 | child: Row( 116 | mainAxisAlignment: MainAxisAlignment.start, 117 | children: [ 118 | Text( 119 | 'Go To Store', 120 | style: TextStyle( 121 | fontSize: _size.width / 26.5, 122 | color: Colors.blueAccent.shade400, 123 | fontWeight: FontWeight.w600, 124 | ), 125 | ), 126 | SizedBox( 127 | width: 6.0, 128 | ), 129 | Icon( 130 | Feather.arrow_right, 131 | color: Colors.blueAccent.shade400, 132 | size: _size.width / 21.0, 133 | ), 134 | ], 135 | ), 136 | ) 137 | ], 138 | ), 139 | ), 140 | ), 141 | ], 142 | ), 143 | ), 144 | ); 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /lib/src/pages/home/widgets/carousel_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:carousel_slider/carousel_slider.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_icons/flutter_icons.dart'; 4 | 5 | class CarouselImage extends StatefulWidget { 6 | @override 7 | State createState() => _CarouselImageState(); 8 | } 9 | 10 | class _CarouselImageState extends State { 11 | var _current = 0; 12 | List imgList = [ 13 | 'https://images.unsplash.com/photo-1540555700478-4be289fbecef?ixid=MXwxMjA3fDB8MHxzZWFyY2h8Nnx8Y29zbWV0aWNzfGVufDB8fDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60', 14 | 'https://images.unsplash.com/photo-1585519356004-2bd6527d9cbe?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MjF8fGNvc21ldGljc3xlbnwwfHwwfA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60', 15 | 'https://images.unsplash.com/photo-1593487568720-92097fb460fb?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MjJ8fGNvc21ldGljc3xlbnwwfHwwfA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60', 16 | 'https://images.unsplash.com/photo-1591375275714-8b2b55b0bf0d?ixid=MXwxMjA3fDB8MHxzZWFyY2h8NDR8fGNvc21ldGljc3xlbnwwfHwwfA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60', 17 | 'https://images.unsplash.com/photo-1594490556719-16dcd6b1eb3d?ixid=MXwxMjA3fDB8MHxzZWFyY2h8NTB8fGNvc21ldGljc3xlbnwwfHwwfA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' 18 | ]; 19 | 20 | List map(List list, Function handler) { 21 | List result = []; 22 | for (var i = 0; i < list.length; i++) { 23 | result.add(handler(i, list[i])); 24 | } 25 | return result; 26 | } 27 | 28 | void changePostion(int i) { 29 | setState(() { 30 | if (_current == 4 && i == 1) { 31 | _current = 0; 32 | } else if (_current == 0 && i == -1) { 33 | _current = 4; 34 | } else { 35 | _current += i; 36 | } 37 | }); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | Size _size = MediaQuery.of(context).size; 43 | return Stack( 44 | children: [ 45 | CarouselSlider( 46 | options: CarouselOptions( 47 | height: _size.height * .15, 48 | aspectRatio: 1 / 1, 49 | viewportFraction: 1, 50 | initialPage: 0, 51 | enableInfiniteScroll: true, 52 | reverse: false, 53 | autoPlay: true, 54 | autoPlayInterval: Duration(seconds: 5), 55 | autoPlayAnimationDuration: Duration(milliseconds: 1000), 56 | autoPlayCurve: Curves.fastOutSlowIn, 57 | enlargeCenterPage: true, 58 | scrollDirection: Axis.horizontal, 59 | onPageChanged: (index, reason) { 60 | setState(() { 61 | _current = index; 62 | }); 63 | }, 64 | ), 65 | items: imgList.map((imgUrl) { 66 | return Builder( 67 | builder: (BuildContext context) { 68 | return Container( 69 | decoration: BoxDecoration( 70 | borderRadius: BorderRadius.circular(6.0), 71 | image: DecorationImage( 72 | image: NetworkImage(imgList[_current]), 73 | fit: BoxFit.cover, 74 | ), 75 | ), 76 | ); 77 | }, 78 | ); 79 | }).toList(), 80 | ), 81 | Positioned( 82 | bottom: 8.0, 83 | child: Container( 84 | width: _size.width * .9, 85 | child: Row( 86 | mainAxisAlignment: MainAxisAlignment.center, 87 | children: map(imgList, (index, url) { 88 | return GestureDetector( 89 | onTap: () { 90 | setState(() { 91 | _current = index; 92 | }); 93 | }, 94 | child: Container( 95 | width: _current == index ? 16.0 : 10.0, 96 | height: _current == index ? 8.0 : 6.0, 97 | margin: EdgeInsets.symmetric(horizontal: 10.0), 98 | decoration: BoxDecoration( 99 | borderRadius: BorderRadius.all(Radius.circular(40.0)), 100 | color: _current == index 101 | ? Colors.white 102 | : Colors.white.withOpacity(.9), 103 | ), 104 | ), 105 | ); 106 | }), 107 | ), 108 | ), 109 | ), 110 | Container( 111 | alignment: Alignment.center, 112 | child: Row( 113 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 114 | children: [ 115 | IconButton( 116 | color: Colors.white, 117 | icon: Icon( 118 | Feather.arrow_left, 119 | size: _size.width / 15.0, 120 | ), 121 | onPressed: () { 122 | changePostion(-1); 123 | }, 124 | ), 125 | IconButton( 126 | color: Colors.white, 127 | icon: Icon( 128 | Feather.arrow_right, 129 | size: _size.width / 15.0, 130 | ), 131 | onPressed: () { 132 | changePostion(1); 133 | }, 134 | ), 135 | ], 136 | ), 137 | ), 138 | ], 139 | ); 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /lib/src/pages/home/widgets/freeship_list_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | import 'build_store_card.dart'; 6 | 7 | class FreeshipListPage extends StatefulWidget { 8 | @override 9 | State createState() => _FreeshipListPageState(); 10 | } 11 | 12 | class _FreeshipListPageState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | final _size = MediaQuery.of(context).size; 16 | return Scaffold( 17 | appBar: AppBar( 18 | centerTitle: true, 19 | brightness: Brightness.light, 20 | backgroundColor: Colors.white, 21 | elevation: 2.5, 22 | leading: IconButton( 23 | onPressed: () => Get.back(), 24 | icon: Icon( 25 | Feather.arrow_left, 26 | size: _size.width / 15.0, 27 | color: Colors.grey.shade800, 28 | ), 29 | ), 30 | title: Text( 31 | 'Freeship', 32 | style: TextStyle( 33 | fontSize: _size.width / 21.0, 34 | fontWeight: FontWeight.bold, 35 | color: Colors.grey.shade800, 36 | ), 37 | ), 38 | ), 39 | body: Container( 40 | child: ListView.builder( 41 | itemCount: 10, 42 | itemBuilder: (context, index) { 43 | return BuildVerticalStoreCard(); 44 | }, 45 | ), 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/src/pages/home/widgets/voucher_list_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/models/voucher.dart'; 5 | import 'package:now/src/widgets/voucher_verical_card.dart'; 6 | 7 | class VoucherListPage extends StatefulWidget { 8 | @override 9 | State createState() => _VoucherListPageState(); 10 | } 11 | 12 | class _VoucherListPageState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | final _size = MediaQuery.of(context).size; 16 | return Scaffold( 17 | appBar: AppBar( 18 | centerTitle: true, 19 | brightness: Brightness.light, 20 | backgroundColor: Colors.white, 21 | elevation: 2.5, 22 | leading: IconButton( 23 | onPressed: () => Get.back(), 24 | icon: Icon( 25 | Feather.arrow_left, 26 | size: _size.width / 15.0, 27 | color: Colors.grey.shade800, 28 | ), 29 | ), 30 | title: Text( 31 | 'Voucher', 32 | style: TextStyle( 33 | fontSize: _size.width / 21.0, 34 | fontWeight: FontWeight.bold, 35 | color: Colors.grey.shade800, 36 | ), 37 | ), 38 | ), 39 | body: Container( 40 | child: ListView.builder( 41 | itemCount: vouchers.length, 42 | itemBuilder: (context, index) { 43 | return VoucherVerticalCard( 44 | title: vouchers[index].title, 45 | urlToImage: vouchers[index].urlToImage, 46 | ); 47 | }, 48 | ), 49 | ), 50 | ); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /lib/src/pages/members/pages/details_order_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/pages/members/widgets/product_details_card.dart'; 5 | 6 | class DetailsOrderPage extends StatefulWidget { 7 | final String state; 8 | DetailsOrderPage({this.state}); 9 | @override 10 | State createState() => _DetailsOrderPageState(); 11 | } 12 | 13 | class _DetailsOrderPageState extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | final _size = MediaQuery.of(context).size; 17 | return Scaffold( 18 | appBar: AppBar( 19 | elevation: .0, 20 | backgroundColor: Colors.white, 21 | brightness: Brightness.light, 22 | centerTitle: true, 23 | leading: IconButton( 24 | onPressed: () => Get.back(), 25 | icon: Icon( 26 | Feather.arrow_left, 27 | size: _size.width / 15.0, 28 | color: Colors.grey.shade800, 29 | ), 30 | ), 31 | title: Text( 32 | 'Details', 33 | style: TextStyle( 34 | fontSize: _size.width / 21.0, 35 | color: Colors.grey.shade800, 36 | fontWeight: FontWeight.bold, 37 | ), 38 | ), 39 | actions: [ 40 | widget.state == 'Pending' 41 | ? GestureDetector( 42 | onTap: () => Get.back(), 43 | child: Padding( 44 | padding: EdgeInsets.only( 45 | right: 6.0, 46 | top: 22.0, 47 | ), 48 | child: Text( 49 | 'CANCEL', 50 | style: TextStyle( 51 | fontSize: _size.width / 26.0, 52 | color: Colors.grey.shade600, 53 | fontWeight: FontWeight.bold, 54 | ), 55 | ), 56 | ), 57 | ) 58 | : Container(), 59 | SizedBox( 60 | width: 2.0, 61 | ), 62 | ], 63 | ), 64 | body: Container( 65 | child: Column( 66 | children: [ 67 | Expanded( 68 | child: ListView.builder( 69 | itemCount: 10, 70 | itemBuilder: (context, index) { 71 | return ProductDetailsCard(); 72 | }, 73 | ), 74 | ), 75 | Container( 76 | height: 60.0, 77 | padding: EdgeInsets.fromLTRB(16.0, 12.0, 8.0, .0), 78 | child: Row( 79 | mainAxisAlignment: MainAxisAlignment.start, 80 | children: [ 81 | Expanded( 82 | flex: 5, 83 | child: Text( 84 | 'Total: 2,390,000đ', 85 | style: TextStyle( 86 | color: Colors.black, 87 | fontSize: _size.width / 26.0, 88 | fontWeight: FontWeight.w600, 89 | ), 90 | ), 91 | ), 92 | SizedBox( 93 | width: 12.0, 94 | ), 95 | Expanded( 96 | flex: 4, 97 | child: GestureDetector( 98 | onTap: () => Navigator.of(context).pop(context), 99 | child: Container( 100 | padding: EdgeInsets.symmetric( 101 | vertical: 15.0, 102 | ), 103 | alignment: Alignment.center, 104 | decoration: BoxDecoration( 105 | color: Colors.blueAccent, 106 | borderRadius: BorderRadius.all(Radius.circular(40.0)), 107 | boxShadow: [ 108 | BoxShadow( 109 | color: Colors.black26, 110 | spreadRadius: .8, 111 | blurRadius: 2.0, 112 | offset: 113 | Offset(0, 2.0), // changes position of shadow 114 | ), 115 | ], 116 | ), 117 | child: Text( 118 | 'Accept', 119 | style: TextStyle( 120 | color: Colors.white, 121 | fontSize: _size.width / 26.0, 122 | fontWeight: FontWeight.w600, 123 | ), 124 | ), 125 | ), 126 | ), 127 | ), 128 | ], 129 | ), 130 | ), 131 | SizedBox( 132 | height: 12.0, 133 | ), 134 | ], 135 | ), 136 | ), 137 | ); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /lib/src/pages/members/pages/manage_members_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/models/member.dart'; 5 | import 'package:now/src/pages/members/widgets/manage_member_vertical_card.dart'; 6 | 7 | class ManageMembersPage extends StatefulWidget { 8 | @override 9 | State createState() => _ManageMembersPageState(); 10 | } 11 | 12 | class _ManageMembersPageState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | final _size = MediaQuery.of(context).size; 16 | return Scaffold( 17 | appBar: AppBar( 18 | elevation: .0, 19 | backgroundColor: Colors.white, 20 | brightness: Brightness.light, 21 | centerTitle: true, 22 | leading: IconButton( 23 | onPressed: () => Get.back(), 24 | icon: Icon( 25 | Feather.arrow_left, 26 | size: _size.width / 15.0, 27 | color: Colors.grey.shade800, 28 | ), 29 | ), 30 | title: Text( 31 | 'Members', 32 | style: TextStyle( 33 | fontSize: _size.width / 21.0, 34 | color: Colors.grey.shade800, 35 | fontWeight: FontWeight.bold, 36 | ), 37 | ), 38 | ), 39 | body: Container( 40 | child: ListView.builder( 41 | itemCount: members.length, 42 | itemBuilder: (context, index) { 43 | return ManageMemberVerticalCard( 44 | urlToImage: members[index].urlToImage, 45 | username: members[index].username, 46 | online: index % 2 == 0, 47 | ); 48 | }, 49 | ), 50 | ), 51 | ); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /lib/src/pages/members/pages/manage_orders_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/pages/members/widgets/manage_orders_vertical_card.dart'; 5 | 6 | class ManageOrdersPage extends StatefulWidget { 7 | @override 8 | State createState() => _ManageOrdersPageState(); 9 | } 10 | 11 | class _ManageOrdersPageState extends State 12 | with SingleTickerProviderStateMixin { 13 | TabController _tabController; 14 | List _pages = [ 15 | Container( 16 | child: ListView.builder( 17 | padding: EdgeInsets.only(top: .0), 18 | itemCount: 10, 19 | itemBuilder: (context, index) { 20 | return ManageOrdersVerticalCard( 21 | state: 'Pending', 22 | ); 23 | }, 24 | ), 25 | ), 26 | Container( 27 | child: ListView.builder( 28 | padding: EdgeInsets.only(top: .0), 29 | itemCount: 10, 30 | itemBuilder: (context, index) { 31 | return ManageOrdersVerticalCard( 32 | state: 'Ongoing', 33 | ); 34 | }, 35 | ), 36 | ), 37 | Container( 38 | child: ListView.builder( 39 | padding: EdgeInsets.only(top: .0), 40 | itemCount: 10, 41 | itemBuilder: (context, index) { 42 | return ManageOrdersVerticalCard( 43 | state: 'History', 44 | ); 45 | }, 46 | ), 47 | ), 48 | ]; 49 | 50 | @override 51 | void initState() { 52 | super.initState(); 53 | _tabController = new TabController( 54 | vsync: this, 55 | length: _pages.length, 56 | initialIndex: 0, 57 | ); 58 | } 59 | 60 | @override 61 | Widget build(BuildContext context) { 62 | final _size = MediaQuery.of(context).size; 63 | return Scaffold( 64 | extendBody: true, 65 | appBar: AppBar( 66 | toolbarHeight: 52.0, 67 | backgroundColor: Colors.white, 68 | elevation: 3.5, 69 | bottom: TabBar( 70 | controller: _tabController, 71 | labelColor: Colors.blueAccent, 72 | indicatorColor: Colors.blueAccent, 73 | unselectedLabelColor: Colors.grey.shade900, 74 | indicatorSize: TabBarIndicatorSize.tab, 75 | indicatorWeight: 2.5, 76 | labelStyle: TextStyle( 77 | fontWeight: FontWeight.bold, 78 | fontSize: _size.width / 23.5, 79 | fontFamily: 'Raleway-Bold', 80 | ), 81 | unselectedLabelStyle: TextStyle( 82 | fontWeight: FontWeight.bold, 83 | fontSize: _size.width / 25.0, 84 | fontFamily: 'Raleway-Bold', 85 | ), 86 | tabs: [ 87 | Tab( 88 | text: 'Pending', 89 | ), 90 | Tab( 91 | text: 'Ongoing', 92 | ), 93 | Tab( 94 | text: 'History', 95 | ), 96 | ], 97 | ), 98 | ), 99 | floatingActionButton: FloatingActionButton( 100 | backgroundColor: Colors.blueAccent, 101 | child: Icon( 102 | Feather.check_circle, 103 | color: Colors.white, 104 | size: _size.width / 18.0, 105 | ), 106 | onPressed: () => Get.back(), 107 | ), 108 | floatingActionButtonLocation: FloatingActionButtonLocation.endFloat, 109 | floatingActionButtonAnimator: FloatingActionButtonAnimator.scaling, 110 | body: Container( 111 | color: Colors.white, 112 | child: Column( 113 | children: [ 114 | SizedBox( 115 | height: 6.0, 116 | ), 117 | Expanded( 118 | child: TabBarView( 119 | controller: _tabController, 120 | children: _pages.map((Widget tab) { 121 | return tab; 122 | }).toList(), 123 | ), 124 | ), 125 | ], 126 | ), 127 | ), 128 | ); 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /lib/src/pages/members/pages/manage_products_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/pages/members/widgets/manage_product_vertical_card.dart'; 5 | 6 | class ManageProductsPage extends StatefulWidget { 7 | @override 8 | State createState() => _ManageProductsPageState(); 9 | } 10 | 11 | class _ManageProductsPageState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | final _size = MediaQuery.of(context).size; 15 | return Scaffold( 16 | appBar: AppBar( 17 | elevation: .0, 18 | backgroundColor: Colors.white, 19 | brightness: Brightness.light, 20 | centerTitle: true, 21 | leading: IconButton( 22 | onPressed: () => Get.back(), 23 | icon: Icon( 24 | Feather.arrow_left, 25 | size: _size.width / 15.0, 26 | color: Colors.grey.shade800, 27 | ), 28 | ), 29 | title: Text( 30 | 'Products', 31 | style: TextStyle( 32 | fontSize: _size.width / 21.0, 33 | color: Colors.grey.shade800, 34 | fontWeight: FontWeight.bold, 35 | ), 36 | ), 37 | actions: [ 38 | IconButton( 39 | onPressed: () => Get.toNamed('/addproduct'), 40 | icon: Icon( 41 | Feather.plus, 42 | size: _size.width / 14.0, 43 | color: Colors.blueAccent.shade400, 44 | ), 45 | ), 46 | ], 47 | ), 48 | body: Container( 49 | child: ListView.builder( 50 | itemCount: 10, 51 | itemBuilder: (context, index) { 52 | return ManageProductVerticalCard(); 53 | }, 54 | ), 55 | ), 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/src/pages/members/pages/manage_vouchers_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/models/voucher.dart'; 5 | import 'package:now/src/pages/members/widgets/manage_voucher_vertical_card.dart'; 6 | 7 | class ManageVouchersPage extends StatefulWidget { 8 | @override 9 | State createState() => _ManageVouchersPageState(); 10 | } 11 | 12 | class _ManageVouchersPageState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | final _size = MediaQuery.of(context).size; 16 | return Scaffold( 17 | appBar: AppBar( 18 | elevation: .0, 19 | backgroundColor: Colors.white, 20 | brightness: Brightness.light, 21 | centerTitle: true, 22 | leading: IconButton( 23 | onPressed: () => Get.back(), 24 | icon: Icon( 25 | Feather.arrow_left, 26 | size: _size.width / 15.0, 27 | color: Colors.grey.shade800, 28 | ), 29 | ), 30 | title: Text( 31 | 'Vouchers', 32 | style: TextStyle( 33 | fontSize: _size.width / 21.0, 34 | color: Colors.grey.shade800, 35 | fontWeight: FontWeight.bold, 36 | ), 37 | ), 38 | actions: [ 39 | IconButton( 40 | onPressed: () => Get.toNamed('/addvoucher'), 41 | icon: Icon( 42 | Feather.plus, 43 | size: _size.width / 14.0, 44 | color: Colors.blueAccent.shade400, 45 | ), 46 | ), 47 | ], 48 | ), 49 | body: Container( 50 | child: ListView.builder( 51 | itemCount: vouchers.length, 52 | itemBuilder: (context, index) { 53 | return ManageVoucherVerticalCard( 54 | title: vouchers[index].title, 55 | urlToImage: vouchers[index].urlToImage, 56 | ); 57 | }, 58 | ), 59 | ), 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /lib/src/pages/members/widgets/bar_chart.dart: -------------------------------------------------------------------------------- 1 | import 'package:fl_chart/fl_chart.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:intl/intl.dart'; 4 | 5 | const chartLabelsTextStyle = TextStyle( 6 | color: Colors.black54, 7 | fontSize: 12.0, 8 | fontWeight: FontWeight.w600, 9 | ); 10 | 11 | class BarChartOnline extends StatelessWidget { 12 | final List files; 13 | 14 | const BarChartOnline({@required this.files}); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | DateFormat format = new DateFormat('dd/MM'); 19 | final _size = MediaQuery.of(context).size; 20 | 21 | return Container( 22 | child: Column( 23 | children: [ 24 | Container( 25 | height: _size.height * .4, 26 | width: _size.width, 27 | padding: EdgeInsets.symmetric(horizontal: _size.width * .06), 28 | child: BarChart( 29 | BarChartData( 30 | alignment: BarChartAlignment.spaceAround, 31 | maxY: 16.0, 32 | barTouchData: BarTouchData(enabled: false), 33 | titlesData: FlTitlesData( 34 | show: true, 35 | bottomTitles: SideTitles( 36 | margin: 10.0, 37 | showTitles: true, 38 | textStyle: chartLabelsTextStyle, 39 | rotateAngle: 35.0, 40 | getTitles: (double value) { 41 | switch (value.toInt()) { 42 | case 0: 43 | return format.format( 44 | DateTime.now().subtract(new Duration(days: 6))); 45 | case 1: 46 | return format.format( 47 | DateTime.now().subtract(new Duration(days: 5))); 48 | case 2: 49 | return format.format( 50 | DateTime.now().subtract(new Duration(days: 4))); 51 | case 3: 52 | return format.format( 53 | DateTime.now().subtract(new Duration(days: 3))); 54 | case 4: 55 | return format.format( 56 | DateTime.now().subtract(new Duration(days: 2))); 57 | case 5: 58 | return format.format( 59 | DateTime.now().subtract(new Duration(days: 1))); 60 | case 6: 61 | return format.format(DateTime.now()); 62 | default: 63 | return ''; 64 | } 65 | }, 66 | ), 67 | leftTitles: SideTitles( 68 | margin: 10.0, 69 | showTitles: true, 70 | textStyle: chartLabelsTextStyle, 71 | getTitles: (value) { 72 | if (value == 0) { 73 | return '0'; 74 | } else if (value % 3 == 0) { 75 | return '${value ~/ 3 * 5}K'; 76 | } 77 | return ''; 78 | }), 79 | ), 80 | gridData: FlGridData( 81 | show: true, 82 | checkToShowHorizontalLine: (value) => value % 3 == 0, 83 | getDrawingHorizontalLine: (value) => FlLine( 84 | color: Colors.black12, 85 | strokeWidth: 1.2, 86 | dashArray: [4], 87 | ), 88 | ), 89 | borderData: FlBorderData(show: false), 90 | barGroups: files 91 | .asMap() 92 | .map((key, value) => MapEntry( 93 | key, 94 | BarChartGroupData( 95 | x: key, 96 | barRods: [ 97 | BarChartRodData( 98 | y: value / (5 / 3), 99 | color: Colors.blueAccent, 100 | ), 101 | ], 102 | ))) 103 | .values 104 | .toList(), 105 | ), 106 | ), 107 | ), 108 | ], 109 | ), 110 | ); 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /lib/src/pages/members/widgets/bottom_delete.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class BottomDelete extends StatefulWidget { 4 | @override 5 | State createState() => _BottomDeleteState(); 6 | } 7 | 8 | class _BottomDeleteState extends State { 9 | int count = 0; 10 | 11 | @override 12 | void initState() { 13 | super.initState(); 14 | } 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | final _size = MediaQuery.of(context).size; 19 | 20 | return Container( 21 | decoration: BoxDecoration( 22 | color: Colors.grey.shade100, 23 | borderRadius: BorderRadius.vertical( 24 | top: Radius.circular( 25 | 4.0, 26 | ), 27 | ), 28 | ), 29 | child: SingleChildScrollView( 30 | child: Column( 31 | crossAxisAlignment: CrossAxisAlignment.start, 32 | mainAxisAlignment: MainAxisAlignment.start, 33 | children: [ 34 | SizedBox( 35 | height: 14.0, 36 | ), 37 | Padding( 38 | padding: EdgeInsets.symmetric( 39 | horizontal: 16.0, 40 | ), 41 | child: Row( 42 | mainAxisAlignment: MainAxisAlignment.start, 43 | children: [ 44 | Expanded( 45 | flex: 2, 46 | child: GestureDetector( 47 | onTap: () => Navigator.of(context).pop(context), 48 | child: Container( 49 | padding: EdgeInsets.symmetric( 50 | vertical: 12.5, 51 | ), 52 | alignment: Alignment.center, 53 | decoration: BoxDecoration( 54 | borderRadius: BorderRadius.all(Radius.circular(4.0)), 55 | color: Colors.white, 56 | boxShadow: [ 57 | BoxShadow( 58 | color: Color(0xFFABBAD5), 59 | spreadRadius: .8, 60 | blurRadius: 2.0, 61 | offset: 62 | Offset(0, 2.0), // changes position of shadow 63 | ), 64 | ], 65 | ), 66 | child: Text( 67 | 'Cancel', 68 | style: TextStyle( 69 | color: Colors.black, 70 | fontSize: _size.width / 26.0, 71 | fontWeight: FontWeight.w600, 72 | ), 73 | ), 74 | ), 75 | ), 76 | ), 77 | SizedBox( 78 | width: 12.0, 79 | ), 80 | Expanded( 81 | flex: 4, 82 | child: GestureDetector( 83 | onTap: () => Navigator.of(context).pop(context), 84 | child: Container( 85 | padding: EdgeInsets.symmetric( 86 | vertical: 12.5, 87 | ), 88 | alignment: Alignment.center, 89 | decoration: BoxDecoration( 90 | color: Colors.blueAccent, 91 | borderRadius: BorderRadius.all(Radius.circular(4.0)), 92 | boxShadow: [ 93 | BoxShadow( 94 | color: Colors.black26, 95 | spreadRadius: .8, 96 | blurRadius: 2.0, 97 | offset: 98 | Offset(0, 2.0), // changes position of shadow 99 | ), 100 | ], 101 | ), 102 | child: Text( 103 | 'Delete', 104 | style: TextStyle( 105 | color: Colors.white, 106 | fontSize: _size.width / 26.0, 107 | fontWeight: FontWeight.w600, 108 | ), 109 | ), 110 | ), 111 | ), 112 | ), 113 | ], 114 | ), 115 | ), 116 | SizedBox( 117 | height: 16.0, 118 | ), 119 | ], 120 | ), 121 | ), 122 | ); 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /lib/src/pages/members/widgets/manage_member_vertical_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:now/src/pages/members/widgets/bottom_info.dart'; 3 | 4 | class ManageMemberVerticalCard extends StatefulWidget { 5 | final String urlToImage; 6 | final String username; 7 | final bool online; 8 | ManageMemberVerticalCard({this.online, this.urlToImage, this.username}); 9 | @override 10 | State createState() => _ManageMemberVerticalCardState(); 11 | } 12 | 13 | class _ManageMemberVerticalCardState extends State { 14 | void showDeleteBottomSheet() { 15 | showModalBottomSheet( 16 | shape: RoundedRectangleBorder( 17 | borderRadius: BorderRadius.all( 18 | Radius.circular(8.0), 19 | ), 20 | ), 21 | isScrollControlled: true, 22 | context: context, 23 | builder: (context) { 24 | return BottomInfo(); 25 | }, 26 | ); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | final _size = MediaQuery.of(context).size; 32 | return GestureDetector( 33 | onTap: () => showDeleteBottomSheet(), 34 | child: Container( 35 | margin: EdgeInsets.only( 36 | bottom: 4.0, 37 | ), 38 | padding: EdgeInsets.symmetric( 39 | horizontal: 4.0, 40 | vertical: 8.0, 41 | ), 42 | decoration: BoxDecoration( 43 | color: Colors.white, 44 | boxShadow: [ 45 | BoxShadow( 46 | color: Color(0xFFABBAD5), 47 | spreadRadius: 1.15, 48 | blurRadius: 1.25, 49 | offset: Offset(.0, 2.5), // changes position of shadow 50 | ), 51 | ], 52 | ), 53 | child: Row( 54 | crossAxisAlignment: CrossAxisAlignment.start, 55 | mainAxisAlignment: MainAxisAlignment.start, 56 | children: [ 57 | SizedBox( 58 | width: 10.0, 59 | ), 60 | Container( 61 | height: _size.width * .175, 62 | width: _size.width * .175, 63 | decoration: BoxDecoration( 64 | shape: BoxShape.circle, 65 | image: DecorationImage( 66 | image: NetworkImage(widget.urlToImage), 67 | fit: BoxFit.cover, 68 | ), 69 | ), 70 | alignment: Alignment.bottomRight, 71 | padding: EdgeInsets.only( 72 | right: 4.0, 73 | bottom: 2.0, 74 | ), 75 | child: Container( 76 | height: 20.0, 77 | width: 20.0, 78 | decoration: BoxDecoration( 79 | shape: BoxShape.circle, 80 | color: Colors.white, 81 | ), 82 | alignment: Alignment.center, 83 | child: Container( 84 | height: 14.0, 85 | width: 14.0, 86 | decoration: BoxDecoration( 87 | shape: BoxShape.circle, 88 | color: widget.online ? Color(0xFF00D300) : Colors.grey, 89 | ), 90 | ), 91 | ), 92 | ), 93 | SizedBox( 94 | width: 16.0, 95 | ), 96 | Expanded( 97 | child: Container( 98 | height: _size.width * .175, 99 | child: Column( 100 | crossAxisAlignment: CrossAxisAlignment.start, 101 | mainAxisAlignment: MainAxisAlignment.start, 102 | children: [ 103 | SizedBox( 104 | height: 4.0, 105 | ), 106 | Text( 107 | widget.username, 108 | style: TextStyle( 109 | color: Colors.grey.shade800, 110 | fontSize: _size.width / 22.5, 111 | fontWeight: FontWeight.bold, 112 | ), 113 | ), 114 | SizedBox( 115 | height: 4.0, 116 | ), 117 | Text( 118 | 'SILVER MEMBER', 119 | style: TextStyle( 120 | color: Colors.grey.shade800, 121 | fontSize: _size.width / 28.0, 122 | fontWeight: FontWeight.w400, 123 | ), 124 | ), 125 | SizedBox( 126 | height: 4.0, 127 | ), 128 | RichText( 129 | text: TextSpan( 130 | children: [ 131 | TextSpan( 132 | text: 'Points: ', 133 | style: TextStyle( 134 | fontSize: _size.width / 26.0, 135 | color: Colors.grey.shade800, 136 | fontWeight: FontWeight.w400, 137 | ), 138 | ), 139 | TextSpan( 140 | text: '250', 141 | style: TextStyle( 142 | fontSize: _size.width / 26.0, 143 | color: Colors.blueAccent.shade700, 144 | fontWeight: FontWeight.w600, 145 | fontStyle: FontStyle.italic, 146 | ), 147 | ), 148 | ], 149 | ), 150 | ), 151 | ], 152 | ), 153 | ), 154 | ), 155 | ], 156 | ), 157 | ), 158 | ); 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /lib/src/pages/members/widgets/manage_orders_horizontal_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:now/src/pages/members/widgets/bottom_delete.dart'; 4 | 5 | class ManageOrdersHorizontalCard extends StatefulWidget { 6 | final int index; 7 | final String state; 8 | ManageOrdersHorizontalCard({this.index, this.state}); 9 | @override 10 | State createState() => _ManageOrdersHorizontalCardState(); 11 | } 12 | 13 | class _ManageOrdersHorizontalCardState 14 | extends State { 15 | String urlToImage = 16 | 'https://images.unsplash.com/photo-1515437591178-719645b75ccb?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MzYwfHxjb2ZmZWV8ZW58MHx8MHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60'; 17 | 18 | void showDeleteBottomSheet() { 19 | showModalBottomSheet( 20 | shape: RoundedRectangleBorder( 21 | borderRadius: BorderRadius.all( 22 | Radius.circular(4.0), 23 | ), 24 | ), 25 | isScrollControlled: true, 26 | context: context, 27 | builder: (context) { 28 | return BottomDelete(); 29 | }, 30 | ); 31 | } 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | final _size = MediaQuery.of(context).size; 36 | return GestureDetector( 37 | onTap: () => Get.toNamed('/detailsorder/${widget.state}'), 38 | onLongPress: () => showDeleteBottomSheet(), 39 | child: Container( 40 | margin: EdgeInsets.only( 41 | left: 6.0, 42 | ), 43 | child: Column( 44 | crossAxisAlignment: CrossAxisAlignment.start, 45 | mainAxisAlignment: MainAxisAlignment.start, 46 | children: [ 47 | Container( 48 | height: _size.width * .4, 49 | width: _size.width * .4, 50 | decoration: BoxDecoration( 51 | color: Colors.white, 52 | image: DecorationImage( 53 | image: NetworkImage(urlToImage), 54 | fit: BoxFit.cover, 55 | ), 56 | ), 57 | ), 58 | SizedBox( 59 | height: 6.0, 60 | ), 61 | Container( 62 | width: _size.width * .4, 63 | child: Text( 64 | 'Pending | 7 Items', 65 | style: TextStyle( 66 | fontSize: _size.width / 24.0, 67 | color: Colors.grey.shade800, 68 | fontWeight: FontWeight.bold, 69 | ), 70 | ), 71 | ), 72 | SizedBox( 73 | height: 6.0, 74 | ), 75 | Container( 76 | width: _size.width * .4, 77 | child: Text( 78 | '139,000đ', 79 | style: TextStyle( 80 | fontSize: _size.width / 28.0, 81 | color: Colors.grey.shade900, 82 | fontWeight: FontWeight.bold, 83 | ), 84 | ), 85 | ), 86 | ], 87 | ), 88 | ), 89 | ); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /lib/src/pages/members/widgets/manage_orders_vertical_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class ManageOrdersVerticalCard extends StatefulWidget { 5 | final String state; 6 | ManageOrdersVerticalCard({this.state}); 7 | @override 8 | State createState() => _ManageOrdersVerticalCardState(); 9 | } 10 | 11 | class _ManageOrdersVerticalCardState extends State { 12 | String urlToImage = 13 | 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTRcMynRQ0TtZ0YwF6jgzgqqiZ4ukK7s5Qjrg&usqp=CAU'; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | final _size = MediaQuery.of(context).size; 18 | return GestureDetector( 19 | onTap: () => Get.toNamed('/detailsorder/${widget.state}'), 20 | child: Container( 21 | margin: EdgeInsets.only( 22 | bottom: 4.0, 23 | ), 24 | padding: EdgeInsets.symmetric( 25 | horizontal: 4.0, 26 | vertical: 6.0, 27 | ), 28 | decoration: BoxDecoration( 29 | color: Colors.white, 30 | boxShadow: [ 31 | BoxShadow( 32 | color: Color(0xFFABBAD5), 33 | spreadRadius: 1.15, 34 | blurRadius: 1.25, 35 | offset: Offset(.0, 2.5), // changes position of shadow 36 | ), 37 | ], 38 | ), 39 | child: Row( 40 | crossAxisAlignment: CrossAxisAlignment.start, 41 | mainAxisAlignment: MainAxisAlignment.start, 42 | children: [ 43 | Container( 44 | height: _size.width * .25, 45 | width: _size.width * .25, 46 | decoration: BoxDecoration( 47 | color: Colors.white, 48 | image: DecorationImage( 49 | image: NetworkImage(urlToImage), 50 | fit: BoxFit.cover, 51 | ), 52 | ), 53 | ), 54 | SizedBox( 55 | width: 12.0, 56 | ), 57 | Expanded( 58 | child: Container( 59 | height: _size.width * .24, 60 | child: Column( 61 | crossAxisAlignment: CrossAxisAlignment.start, 62 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 63 | children: [ 64 | Column( 65 | crossAxisAlignment: CrossAxisAlignment.start, 66 | mainAxisAlignment: MainAxisAlignment.start, 67 | children: [ 68 | Text( 69 | 'Orders - 7 Items', 70 | style: TextStyle( 71 | color: Colors.grey.shade800, 72 | fontSize: _size.width / 23.5, 73 | fontWeight: FontWeight.bold, 74 | ), 75 | ), 76 | SizedBox( 77 | height: 6.0, 78 | ), 79 | RichText( 80 | text: TextSpan( 81 | children: [ 82 | TextSpan( 83 | text: 'Date: ', 84 | style: TextStyle( 85 | fontSize: _size.width / 26.5, 86 | color: Colors.grey.shade800, 87 | fontWeight: FontWeight.w600, 88 | ), 89 | ), 90 | TextSpan( 91 | text: '04/01/2021', 92 | style: TextStyle( 93 | fontSize: _size.width / 28.0, 94 | color: Colors.blueAccent.shade700, 95 | fontWeight: FontWeight.w600, 96 | fontStyle: FontStyle.italic, 97 | ), 98 | ), 99 | ], 100 | ), 101 | ), 102 | ], 103 | ), 104 | Row( 105 | mainAxisAlignment: MainAxisAlignment.start, 106 | children: [ 107 | GestureDetector( 108 | onTap: () => null, 109 | child: Text( 110 | widget.state == 'Pending' 111 | ? 'ACCEPT' 112 | : widget.state == 'Ongoing' 113 | ? 'DONE' 114 | : 'VIEW DETAILS', 115 | style: TextStyle( 116 | fontSize: _size.width / 30.0, 117 | color: Colors.blueAccent.shade700, 118 | fontWeight: FontWeight.w600, 119 | ), 120 | ), 121 | ), 122 | SizedBox( 123 | width: 16.0, 124 | ), 125 | GestureDetector( 126 | onTap: () => null, 127 | child: Text( 128 | widget.state == 'Pending' ? 'CANCEL' : '', 129 | style: TextStyle( 130 | fontSize: _size.width / 28.0, 131 | color: Colors.grey.shade700, 132 | fontWeight: FontWeight.w600, 133 | ), 134 | ), 135 | ), 136 | ], 137 | ), 138 | ], 139 | ), 140 | ), 141 | ), 142 | ], 143 | ), 144 | ), 145 | ); 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /lib/src/pages/members/widgets/manage_product_horizontal_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:now/src/pages/members/widgets/bottom_delete.dart'; 4 | 5 | class ManageProductHorizontalCard extends StatefulWidget { 6 | final int index; 7 | ManageProductHorizontalCard({this.index}); 8 | @override 9 | State createState() => _ManageProductHorizontalCardState(); 10 | } 11 | 12 | class _ManageProductHorizontalCardState 13 | extends State { 14 | String urlToImage = 15 | 'https://images.unsplash.com/photo-1546379753-abb7fd8cfb93?ixid=MXwxMjA3fDB8MHxzZWFyY2h8Mjk5fHxjb2ZmZWV8ZW58MHx8MHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60'; 16 | 17 | void showDeleteBottomSheet() { 18 | showModalBottomSheet( 19 | shape: RoundedRectangleBorder( 20 | borderRadius: BorderRadius.all( 21 | Radius.circular(4.0), 22 | ), 23 | ), 24 | isScrollControlled: true, 25 | context: context, 26 | builder: (context) { 27 | return BottomDelete(); 28 | }, 29 | ); 30 | } 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | final _size = MediaQuery.of(context).size; 35 | return GestureDetector( 36 | onTap: () => Get.toNamed('/editproduct/Coffee Sofresh/39000/49000/59000', 37 | arguments: 38 | 'https://www.highlandscoffee.com.vn/vnt_upload/weblink/HCO-7548-PHIN-SUA-DA-2019-TALENT-WEB_1.jpg'), 39 | onLongPress: () => showDeleteBottomSheet(), 40 | child: Container( 41 | margin: EdgeInsets.only( 42 | left: 6.0, 43 | ), 44 | child: Column( 45 | crossAxisAlignment: CrossAxisAlignment.start, 46 | mainAxisAlignment: MainAxisAlignment.start, 47 | children: [ 48 | Container( 49 | height: _size.width * .4, 50 | width: _size.width * .4, 51 | decoration: BoxDecoration( 52 | borderRadius: BorderRadius.circular( 53 | 2.0, 54 | ), 55 | image: DecorationImage( 56 | image: NetworkImage(urlToImage), 57 | fit: BoxFit.cover, 58 | ), 59 | ), 60 | ), 61 | SizedBox( 62 | height: 6.0, 63 | ), 64 | Container( 65 | width: _size.width * .4, 66 | child: Text( 67 | 'CARAMEL FREEZE', 68 | style: TextStyle( 69 | fontSize: _size.width / 26.0, 70 | color: Colors.grey.shade800, 71 | fontWeight: FontWeight.bold, 72 | ), 73 | ), 74 | ), 75 | SizedBox( 76 | height: 6.0, 77 | ), 78 | Container( 79 | width: _size.width * .4, 80 | child: Text( 81 | '39,000đ', 82 | style: TextStyle( 83 | fontSize: _size.width / 28.0, 84 | color: Colors.grey.shade900, 85 | fontWeight: FontWeight.bold, 86 | ), 87 | ), 88 | ), 89 | ], 90 | ), 91 | ), 92 | ); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/src/pages/members/widgets/manage_product_vertical_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/pages/members/widgets/bottom_delete.dart'; 5 | 6 | class ManageProductVerticalCard extends StatefulWidget { 7 | @override 8 | State createState() => _ManageProductVerticalCardState(); 9 | } 10 | 11 | class _ManageProductVerticalCardState extends State { 12 | String urlToImage = 13 | 'https://images.unsplash.com/photo-1462917882517-e150004895fa?ixid=MXwxMjA3fDB8MHxzZWFyY2h8Mjd8fGNvZmZlZXxlbnwwfHwwfA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60'; 14 | 15 | void showDeleteBottomSheet() { 16 | showModalBottomSheet( 17 | shape: RoundedRectangleBorder( 18 | borderRadius: BorderRadius.all( 19 | Radius.circular(4.0), 20 | ), 21 | ), 22 | isScrollControlled: true, 23 | context: context, 24 | builder: (context) { 25 | return BottomDelete(); 26 | }, 27 | ); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | final _size = MediaQuery.of(context).size; 33 | return GestureDetector( 34 | onTap: () => Get.toNamed('/editproduct/Coffee Sofresh/39000/49000/59000', 35 | arguments: 36 | 'https://www.highlandscoffee.com.vn/vnt_upload/weblink/HCO-7548-PHIN-SUA-DA-2019-TALENT-WEB_1.jpg'), 37 | onLongPress: () => showDeleteBottomSheet(), 38 | child: Container( 39 | margin: EdgeInsets.only( 40 | bottom: 4.0, 41 | ), 42 | padding: EdgeInsets.symmetric( 43 | horizontal: 4.0, 44 | vertical: 8.0, 45 | ), 46 | decoration: BoxDecoration( 47 | color: Colors.white, 48 | boxShadow: [ 49 | BoxShadow( 50 | color: Color(0xFFABBAD5), 51 | spreadRadius: 1.15, 52 | blurRadius: 1.25, 53 | offset: Offset(.0, 2.5), // changes position of shadow 54 | ), 55 | ], 56 | ), 57 | child: Row( 58 | crossAxisAlignment: CrossAxisAlignment.start, 59 | mainAxisAlignment: MainAxisAlignment.start, 60 | children: [ 61 | Container( 62 | height: _size.width * .25, 63 | width: _size.width * .25, 64 | decoration: BoxDecoration( 65 | borderRadius: BorderRadius.circular(2.0), 66 | image: DecorationImage( 67 | image: NetworkImage(urlToImage), 68 | fit: BoxFit.cover, 69 | ), 70 | ), 71 | ), 72 | SizedBox( 73 | width: 10.0, 74 | ), 75 | Expanded( 76 | child: Container( 77 | height: _size.width * .25, 78 | child: Column( 79 | crossAxisAlignment: CrossAxisAlignment.start, 80 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 81 | children: [ 82 | Column( 83 | crossAxisAlignment: CrossAxisAlignment.start, 84 | mainAxisAlignment: MainAxisAlignment.start, 85 | children: [ 86 | Text( 87 | 'CARAMEL FREEZE', 88 | style: TextStyle( 89 | color: Colors.grey.shade800, 90 | fontSize: _size.width / 23.5, 91 | fontWeight: FontWeight.bold, 92 | ), 93 | ), 94 | Row( 95 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 96 | children: [ 97 | Text( 98 | '500 Sold | 1 like', 99 | style: TextStyle( 100 | color: Colors.grey.shade600, 101 | fontSize: _size.width / 28.0, 102 | fontWeight: FontWeight.w400, 103 | ), 104 | ), 105 | IconButton( 106 | onPressed: () => showDeleteBottomSheet(), 107 | icon: Icon( 108 | Feather.trash_2, 109 | color: Colors.blueAccent, 110 | size: _size.width / 16.0, 111 | ), 112 | ), 113 | ], 114 | ), 115 | ], 116 | ), 117 | Text( 118 | '39,000đ', 119 | style: TextStyle( 120 | fontSize: _size.width / 24.0, 121 | color: Colors.grey.shade900, 122 | fontWeight: FontWeight.bold, 123 | ), 124 | ), 125 | ], 126 | ), 127 | ), 128 | ), 129 | ], 130 | ), 131 | ), 132 | ); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /lib/src/pages/members/widgets/manage_voucher_horizontal_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:now/src/pages/members/widgets/bottom_delete.dart'; 4 | 5 | class ManageVoucherHorizontalCard extends StatefulWidget { 6 | final String title; 7 | final String urlToImage; 8 | ManageVoucherHorizontalCard({this.title, this.urlToImage}); 9 | @override 10 | State createState() => _ManageVoucherHorizontalCardState(); 11 | } 12 | 13 | class _ManageVoucherHorizontalCardState 14 | extends State { 15 | void showDeleteBottomSheet() { 16 | showModalBottomSheet( 17 | shape: RoundedRectangleBorder( 18 | borderRadius: BorderRadius.all( 19 | Radius.circular(4.0), 20 | ), 21 | ), 22 | isScrollControlled: true, 23 | context: context, 24 | builder: (context) { 25 | return BottomDelete(); 26 | }, 27 | ); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | final _size = MediaQuery.of(context).size; 33 | return GestureDetector( 34 | onTap: () => Get.toNamed('editvoucher/${widget.title}/50/true', 35 | arguments: widget.urlToImage), 36 | onLongPress: () => showDeleteBottomSheet(), 37 | child: Container( 38 | margin: EdgeInsets.only( 39 | left: 6.0, 40 | ), 41 | child: Column( 42 | crossAxisAlignment: CrossAxisAlignment.start, 43 | mainAxisAlignment: MainAxisAlignment.start, 44 | children: [ 45 | Container( 46 | height: _size.width * .4, 47 | width: _size.width * .4, 48 | decoration: BoxDecoration( 49 | borderRadius: BorderRadius.circular( 50 | 2.0, 51 | ), 52 | image: DecorationImage( 53 | image: NetworkImage(widget.urlToImage), 54 | fit: BoxFit.cover, 55 | ), 56 | ), 57 | ), 58 | SizedBox( 59 | height: 6.0, 60 | ), 61 | Container( 62 | width: _size.width * .4, 63 | child: Text( 64 | widget.title, 65 | style: TextStyle( 66 | fontSize: _size.width / 24.0, 67 | color: Colors.grey.shade800, 68 | fontWeight: FontWeight.w600, 69 | ), 70 | ), 71 | ), 72 | ], 73 | ), 74 | ), 75 | ); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /lib/src/pages/members/widgets/manage_voucher_vertical_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:now/src/pages/members/widgets/bottom_delete.dart'; 4 | 5 | class ManageVoucherVerticalCard extends StatefulWidget { 6 | final String title; 7 | final String urlToImage; 8 | ManageVoucherVerticalCard({this.title, this.urlToImage}); 9 | @override 10 | State createState() => _ManageVoucherVerticalCardState(); 11 | } 12 | 13 | class _ManageVoucherVerticalCardState extends State { 14 | void showDeleteBottomSheet() { 15 | showModalBottomSheet( 16 | shape: RoundedRectangleBorder( 17 | borderRadius: BorderRadius.all( 18 | Radius.circular(4.0), 19 | ), 20 | ), 21 | isScrollControlled: true, 22 | context: context, 23 | builder: (context) { 24 | return BottomDelete(); 25 | }, 26 | ); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | final _size = MediaQuery.of(context).size; 32 | return GestureDetector( 33 | onTap: () => Get.toNamed('editvoucher/${widget.title}/50/true', 34 | arguments: widget.urlToImage), 35 | onLongPress: () => showDeleteBottomSheet(), 36 | child: Container( 37 | margin: EdgeInsets.only( 38 | bottom: 4.0, 39 | ), 40 | padding: EdgeInsets.symmetric( 41 | horizontal: 4.0, 42 | vertical: 8.0, 43 | ), 44 | decoration: BoxDecoration( 45 | color: Colors.white, 46 | boxShadow: [ 47 | BoxShadow( 48 | color: Color(0xFFABBAD5), 49 | spreadRadius: 1.15, 50 | blurRadius: 1.25, 51 | offset: Offset(.0, 2.5), // changes position of shadow 52 | ), 53 | ], 54 | ), 55 | child: Row( 56 | crossAxisAlignment: CrossAxisAlignment.start, 57 | mainAxisAlignment: MainAxisAlignment.start, 58 | children: [ 59 | Container( 60 | height: _size.width * .25, 61 | width: _size.width * .25, 62 | decoration: BoxDecoration( 63 | borderRadius: BorderRadius.circular(2.0), 64 | image: DecorationImage( 65 | image: NetworkImage(widget.urlToImage), 66 | fit: BoxFit.cover, 67 | ), 68 | ), 69 | ), 70 | SizedBox( 71 | width: 10.0, 72 | ), 73 | Expanded( 74 | child: Container( 75 | height: _size.width * .25, 76 | child: Column( 77 | crossAxisAlignment: CrossAxisAlignment.start, 78 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 79 | children: [ 80 | Column( 81 | crossAxisAlignment: CrossAxisAlignment.start, 82 | mainAxisAlignment: MainAxisAlignment.start, 83 | children: [ 84 | Text( 85 | widget.title, 86 | style: TextStyle( 87 | color: Colors.grey.shade800, 88 | fontSize: _size.width / 22.5, 89 | fontWeight: FontWeight.bold, 90 | ), 91 | ), 92 | SizedBox( 93 | height: 4.0, 94 | ), 95 | Text( 96 | '20 Voucher Left', 97 | style: TextStyle( 98 | color: Colors.grey.shade800, 99 | fontSize: _size.width / 28.0, 100 | fontWeight: FontWeight.w400, 101 | ), 102 | ), 103 | ], 104 | ), 105 | GestureDetector( 106 | onTap: () => showDeleteBottomSheet(), 107 | child: Text( 108 | 'DELETE', 109 | style: TextStyle( 110 | fontSize: _size.width / 25.0, 111 | color: Colors.blueAccent, 112 | fontWeight: FontWeight.w600, 113 | ), 114 | ), 115 | ), 116 | ], 117 | ), 118 | ), 119 | ), 120 | ], 121 | ), 122 | ), 123 | ); 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /lib/src/pages/members/widgets/product_details_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | import 'package:now/src/pages/members/widgets/bottom_delete.dart'; 4 | 5 | class ProductDetailsCard extends StatefulWidget { 6 | @override 7 | State createState() => _ProductDetailsCardState(); 8 | } 9 | 10 | class _ProductDetailsCardState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | final _size = MediaQuery.of(context).size; 14 | return GestureDetector( 15 | child: Container( 16 | margin: EdgeInsets.only( 17 | bottom: 4.0, 18 | ), 19 | padding: EdgeInsets.symmetric( 20 | horizontal: 4.0, 21 | vertical: 8.0, 22 | ), 23 | decoration: BoxDecoration( 24 | color: Colors.white, 25 | boxShadow: [ 26 | BoxShadow( 27 | color: Color(0xFFABBAD5), 28 | spreadRadius: 1.15, 29 | blurRadius: 1.25, 30 | offset: Offset(.0, 2.5), // changes position of shadow 31 | ), 32 | ], 33 | ), 34 | child: Row( 35 | crossAxisAlignment: CrossAxisAlignment.start, 36 | mainAxisAlignment: MainAxisAlignment.start, 37 | children: [ 38 | Container( 39 | height: _size.width * .25, 40 | width: _size.width * .25, 41 | decoration: BoxDecoration( 42 | borderRadius: BorderRadius.circular(2.0), 43 | image: DecorationImage( 44 | image: NetworkImage( 45 | 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTRcMynRQ0TtZ0YwF6jgzgqqiZ4ukK7s5Qjrg&usqp=CAU'), 46 | fit: BoxFit.cover, 47 | ), 48 | ), 49 | ), 50 | SizedBox( 51 | width: 10.0, 52 | ), 53 | Expanded( 54 | child: Container( 55 | height: _size.width * .25, 56 | child: Column( 57 | crossAxisAlignment: CrossAxisAlignment.start, 58 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 59 | children: [ 60 | Column( 61 | crossAxisAlignment: CrossAxisAlignment.start, 62 | mainAxisAlignment: MainAxisAlignment.start, 63 | children: [ 64 | Text( 65 | 'Highlands Coffee', 66 | style: TextStyle( 67 | color: Colors.grey.shade800, 68 | fontSize: _size.width / 22.5, 69 | fontWeight: FontWeight.bold, 70 | ), 71 | ), 72 | SizedBox( 73 | height: 4.5, 74 | ), 75 | RichText( 76 | text: TextSpan( 77 | children: [ 78 | TextSpan( 79 | text: 'Quantity: ', 80 | style: TextStyle( 81 | fontSize: _size.width / 26.0, 82 | color: Colors.grey.shade800, 83 | fontWeight: FontWeight.w400, 84 | ), 85 | ), 86 | TextSpan( 87 | text: '12', 88 | style: TextStyle( 89 | fontSize: _size.width / 24.0, 90 | color: Colors.blueAccent.shade700, 91 | fontWeight: FontWeight.w600, 92 | ), 93 | ), 94 | ], 95 | ), 96 | ), 97 | ], 98 | ), 99 | Text( 100 | '239,000đ', 101 | style: TextStyle( 102 | fontSize: _size.width / 24.0, 103 | color: Colors.grey.shade900, 104 | fontWeight: FontWeight.bold, 105 | ), 106 | ), 107 | ], 108 | ), 109 | ), 110 | ), 111 | ], 112 | ), 113 | ), 114 | ); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /lib/src/pages/members/widgets/ranking_user_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class RankingUserCard extends StatefulWidget { 4 | final int index; 5 | final String urlToImage; 6 | final String username; 7 | final String point; 8 | final bool isMe; 9 | RankingUserCard( 10 | {this.urlToImage, this.username, this.point, this.index, this.isMe}); 11 | @override 12 | State createState() => _RankingUserCardState(); 13 | } 14 | 15 | class _RankingUserCardState extends State { 16 | @override 17 | Widget build(BuildContext context) { 18 | final _size = MediaQuery.of(context).size; 19 | return GestureDetector( 20 | child: Container( 21 | margin: EdgeInsets.only( 22 | bottom: 4.0, 23 | ), 24 | padding: EdgeInsets.symmetric( 25 | horizontal: 4.0, 26 | vertical: 8.0, 27 | ), 28 | decoration: BoxDecoration( 29 | color: Colors.white, 30 | ), 31 | child: Row( 32 | crossAxisAlignment: CrossAxisAlignment.center, 33 | mainAxisAlignment: MainAxisAlignment.start, 34 | children: [ 35 | SizedBox( 36 | width: 12.0, 37 | ), 38 | Text( 39 | widget.index.toString(), 40 | style: TextStyle( 41 | color: widget.isMe 42 | ? Colors.blueAccent.shade400 43 | : widget.index < 4 44 | ? Colors.yellow.shade700 45 | : Colors.grey.shade800, 46 | fontSize: _size.width / 22.5, 47 | fontWeight: FontWeight.bold, 48 | ), 49 | ), 50 | SizedBox( 51 | width: 12.0, 52 | ), 53 | Container( 54 | height: _size.width * .175, 55 | width: _size.width * .175, 56 | decoration: BoxDecoration( 57 | shape: BoxShape.circle, 58 | image: DecorationImage( 59 | image: NetworkImage(widget.urlToImage), 60 | fit: BoxFit.cover, 61 | ), 62 | ), 63 | alignment: Alignment.bottomRight, 64 | padding: EdgeInsets.only( 65 | right: 4.0, 66 | bottom: 2.0, 67 | ), 68 | ), 69 | SizedBox( 70 | width: 16.0, 71 | ), 72 | Expanded( 73 | child: Container( 74 | height: _size.width * .175, 75 | child: Column( 76 | crossAxisAlignment: CrossAxisAlignment.start, 77 | mainAxisAlignment: MainAxisAlignment.start, 78 | children: [ 79 | SizedBox( 80 | height: 4.0, 81 | ), 82 | Text( 83 | widget.username, 84 | style: TextStyle( 85 | color: widget.isMe 86 | ? Colors.blueAccent.shade400 87 | : Colors.grey.shade800, 88 | fontSize: _size.width / 22.5, 89 | fontWeight: FontWeight.bold, 90 | ), 91 | ), 92 | SizedBox( 93 | height: 4.0, 94 | ), 95 | Text( 96 | 'SILVER MEMBER', 97 | style: TextStyle( 98 | color: Colors.grey.shade800, 99 | fontSize: _size.width / 28.0, 100 | fontWeight: FontWeight.w400, 101 | ), 102 | ), 103 | SizedBox( 104 | height: 4.0, 105 | ), 106 | RichText( 107 | text: TextSpan( 108 | children: [ 109 | TextSpan( 110 | text: 'Points: ', 111 | style: TextStyle( 112 | fontSize: _size.width / 26.0, 113 | color: Colors.grey.shade800, 114 | fontWeight: FontWeight.w400, 115 | ), 116 | ), 117 | TextSpan( 118 | text: widget.point, 119 | style: TextStyle( 120 | fontSize: _size.width / 26.0, 121 | color: Colors.blueAccent.shade700, 122 | fontWeight: FontWeight.w600, 123 | ), 124 | ), 125 | ], 126 | ), 127 | ), 128 | ], 129 | ), 130 | ), 131 | ), 132 | ], 133 | ), 134 | ), 135 | ); 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /lib/src/pages/navigation/navigation.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | 4 | import 'package:firebase_messaging/firebase_messaging.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_icons/flutter_icons.dart'; 7 | import 'package:now/src/pages/auth/auth_page.dart'; 8 | import 'package:now/src/pages/card/card_page.dart'; 9 | import 'package:now/src/pages/home/home_page.dart'; 10 | import 'package:now/src/pages/notifications/notifications_page.dart'; 11 | import 'package:now/src/pages/profile/profile_page.dart'; 12 | 13 | class Navigation extends StatefulWidget { 14 | @override 15 | State createState() => _NavigationState(); 16 | } 17 | 18 | class _NavigationState extends State { 19 | int currentPage = 0; 20 | var _pages = [ 21 | HomePage(), 22 | Container(), 23 | CardPage(), 24 | AuthenticatePage(), 25 | ProfilePage(), 26 | ]; 27 | 28 | final FirebaseMessaging _fcm = FirebaseMessaging(); 29 | StreamSubscription iosSubscription; 30 | 31 | _saveDeviceToken() async { 32 | // Get the token for this device 33 | String fcmToken = await _fcm.getToken(); 34 | 35 | // Save it to Firestore 36 | if (fcmToken != null) { 37 | print(fcmToken + 'lambiengcode'); 38 | } 39 | } 40 | 41 | @override 42 | void initState() { 43 | super.initState(); 44 | 45 | if (Platform.isIOS) { 46 | iosSubscription = _fcm.onIosSettingsRegistered.listen((data) { 47 | _saveDeviceToken(); 48 | }); 49 | 50 | _fcm.requestNotificationPermissions(IosNotificationSettings()); 51 | } else { 52 | _saveDeviceToken(); 53 | } 54 | } 55 | 56 | @override 57 | Widget build(BuildContext context) { 58 | final Size _size = MediaQuery.of(context).size; 59 | return Scaffold( 60 | extendBody: true, 61 | body: Scaffold( 62 | bottomNavigationBar: BottomNavigationBar( 63 | backgroundColor: Colors.white, 64 | currentIndex: currentPage, 65 | onTap: (i) { 66 | setState(() { 67 | currentPage = i; 68 | }); 69 | }, 70 | type: BottomNavigationBarType.fixed, 71 | iconSize: _size.width / 15.0, 72 | showSelectedLabels: false, 73 | showUnselectedLabels: false, 74 | selectedItemColor: Color(0xFFC4985B), 75 | unselectedItemColor: Color(0xFF969696), 76 | items: [ 77 | BottomNavigationBarItem( 78 | icon: Icon(Feather.home), title: Text("Dashboard")), 79 | BottomNavigationBarItem( 80 | icon: Icon(Feather.clipboard), title: Text("Feed")), 81 | BottomNavigationBarItem( 82 | icon: Icon(Feather.credit_card), title: Text("Profile")), 83 | BottomNavigationBarItem( 84 | icon: Icon(Feather.bell), title: Text("Profile")), 85 | BottomNavigationBarItem( 86 | icon: Icon(Feather.user), title: Text("Profile")), 87 | ], 88 | ), 89 | body: _pages[currentPage], 90 | ), 91 | ); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /lib/src/pages/notifications/notifications_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | 4 | class NotificationsPage extends StatefulWidget { 5 | @override 6 | State createState() => _NotificationsPageState(); 7 | } 8 | 9 | class _NotificationsPageState extends State { 10 | bool _notifications = true; 11 | 12 | void showSettingsBottomSheet() { 13 | showModalBottomSheet( 14 | shape: RoundedRectangleBorder( 15 | borderRadius: BorderRadius.all( 16 | Radius.circular(4.0), 17 | ), 18 | ), 19 | isScrollControlled: true, 20 | context: context, 21 | builder: (context) { 22 | return _settings(context); 23 | }, 24 | ); 25 | } 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | final _size = MediaQuery.of(context).size; 30 | return Scaffold( 31 | appBar: AppBar( 32 | brightness: Brightness.light, 33 | backgroundColor: Colors.white, 34 | elevation: .0, 35 | centerTitle: true, 36 | title: Text( 37 | 'Notifications', 38 | style: TextStyle( 39 | fontSize: _size.width / 21.0, 40 | fontWeight: FontWeight.bold, 41 | color: Colors.grey.shade800, 42 | ), 43 | ), 44 | actions: [ 45 | IconButton( 46 | onPressed: () => showSettingsBottomSheet(), 47 | icon: Icon( 48 | Feather.align_center, 49 | color: Colors.grey.shade800, 50 | size: _size.width / 16.5, 51 | ), 52 | ), 53 | ], 54 | ), 55 | body: Container(), 56 | ); 57 | } 58 | 59 | Widget _settings(context) { 60 | final _size = MediaQuery.of(context).size; 61 | 62 | return Container( 63 | decoration: BoxDecoration( 64 | color: Colors.grey.shade100, 65 | borderRadius: BorderRadius.vertical( 66 | top: Radius.circular( 67 | 4.0, 68 | ), 69 | ), 70 | ), 71 | child: SingleChildScrollView( 72 | child: Column( 73 | crossAxisAlignment: CrossAxisAlignment.start, 74 | mainAxisAlignment: MainAxisAlignment.start, 75 | children: [ 76 | SizedBox( 77 | height: 18.0, 78 | ), 79 | Row( 80 | mainAxisAlignment: MainAxisAlignment.start, 81 | children: [ 82 | SizedBox( 83 | width: 16.0, 84 | ), 85 | Expanded( 86 | child: Container( 87 | height: 48.0, 88 | padding: EdgeInsets.fromLTRB(24.0, 2.0, 16.0, 0.0), 89 | decoration: BoxDecoration( 90 | color: Colors.white, 91 | borderRadius: BorderRadius.circular( 92 | 4.0, 93 | ), 94 | boxShadow: [ 95 | BoxShadow( 96 | color: Color(0xFFABBAD5), 97 | spreadRadius: 1.85, 98 | blurRadius: 1.85, 99 | offset: 100 | Offset(2.0, 2.5), // changes position of shadow 101 | ), 102 | ], 103 | ), 104 | alignment: Alignment.center, 105 | child: Text( 106 | 'Settings', 107 | style: TextStyle( 108 | color: Colors.grey.shade800, 109 | fontSize: _size.width / 30.0, 110 | fontWeight: FontWeight.bold, 111 | ), 112 | ), 113 | ), 114 | ), 115 | SizedBox( 116 | width: 20.0, 117 | ), 118 | GestureDetector( 119 | onTap: () { 120 | setState(() { 121 | _notifications = !_notifications; 122 | }); 123 | print(_notifications); 124 | }, 125 | child: Container( 126 | height: 48.0, 127 | width: 48.0, 128 | alignment: Alignment.center, 129 | decoration: BoxDecoration( 130 | color: Colors.white, 131 | borderRadius: BorderRadius.circular( 132 | 4.0, 133 | ), 134 | boxShadow: [ 135 | BoxShadow( 136 | color: Color(0xFFABBAD5), 137 | spreadRadius: 1.85, 138 | blurRadius: 1.85, 139 | offset: 140 | Offset(2.0, 2.5), // changes position of shadow 141 | ), 142 | ], 143 | ), 144 | child: Icon( 145 | _notifications 146 | ? Icons.notifications_active 147 | : Icons.notifications_off, 148 | color: _notifications 149 | ? Colors.blueAccent 150 | : Colors.grey.shade600, 151 | size: 22.0, 152 | ), 153 | ), 154 | ), 155 | SizedBox( 156 | width: 16.0, 157 | ), 158 | ], 159 | ), 160 | SizedBox( 161 | height: 20.0, 162 | ), 163 | ], 164 | ), 165 | ), 166 | ); 167 | } 168 | } 169 | -------------------------------------------------------------------------------- /lib/src/pages/orders/orders_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:now/src/pages/members/widgets/manage_orders_vertical_card.dart'; 3 | 4 | class OrdersPage extends StatefulWidget { 5 | @override 6 | State createState() => _OrdersPageState(); 7 | } 8 | 9 | class _OrdersPageState extends State 10 | with SingleTickerProviderStateMixin { 11 | TabController _tabController; 12 | List _pages = [ 13 | Container( 14 | child: ListView.builder( 15 | padding: EdgeInsets.only(top: .0), 16 | itemCount: 10, 17 | itemBuilder: (context, index) { 18 | return ManageOrdersVerticalCard( 19 | state: '', 20 | ); 21 | }, 22 | ), 23 | ), 24 | Container( 25 | child: ListView.builder( 26 | padding: EdgeInsets.only(top: .0), 27 | itemCount: 10, 28 | itemBuilder: (context, index) { 29 | return ManageOrdersVerticalCard( 30 | state: '', 31 | ); 32 | }, 33 | ), 34 | ), 35 | Container( 36 | child: ListView.builder( 37 | padding: EdgeInsets.only(top: .0), 38 | itemCount: 10, 39 | itemBuilder: (context, index) { 40 | return ManageOrdersVerticalCard( 41 | state: '', 42 | ); 43 | }, 44 | ), 45 | ), 46 | ]; 47 | 48 | @override 49 | void initState() { 50 | super.initState(); 51 | _tabController = new TabController( 52 | vsync: this, 53 | length: _pages.length, 54 | initialIndex: 0, 55 | ); 56 | } 57 | 58 | @override 59 | Widget build(BuildContext context) { 60 | final _size = MediaQuery.of(context).size; 61 | return Scaffold( 62 | extendBody: true, 63 | appBar: AppBar( 64 | toolbarHeight: 52.0, 65 | backgroundColor: Colors.white, 66 | elevation: 3.5, 67 | bottom: TabBar( 68 | controller: _tabController, 69 | labelColor: Colors.blueAccent, 70 | indicatorColor: Colors.blueAccent, 71 | unselectedLabelColor: Colors.grey.shade800, 72 | indicatorSize: TabBarIndicatorSize.tab, 73 | indicatorWeight: 2.5, 74 | labelStyle: TextStyle( 75 | fontWeight: FontWeight.bold, 76 | fontSize: _size.width / 23.5, 77 | fontFamily: 'Raleway-Bold', 78 | ), 79 | unselectedLabelStyle: TextStyle( 80 | fontWeight: FontWeight.bold, 81 | fontSize: _size.width / 25.0, 82 | fontFamily: 'Raleway-Bold', 83 | ), 84 | tabs: [ 85 | Tab( 86 | text: 'Ongoing', 87 | ), 88 | Tab( 89 | text: 'History', 90 | ), 91 | Tab( 92 | text: 'Cart', 93 | ), 94 | ], 95 | ), 96 | ), 97 | body: Container( 98 | color: Colors.white, 99 | child: Column( 100 | children: [ 101 | SizedBox( 102 | height: 6.0, 103 | ), 104 | Expanded( 105 | child: TabBarView( 106 | controller: _tabController, 107 | children: _pages.map((Widget tab) { 108 | return tab; 109 | }).toList(), 110 | ), 111 | ), 112 | ], 113 | ), 114 | ), 115 | ); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /lib/src/pages/profile/pages/my_points_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/models/member.dart'; 5 | import 'package:now/src/pages/members/widgets/ranking_user_card.dart'; 6 | 7 | class MyPointsPage extends StatefulWidget { 8 | @override 9 | State createState() => _MyPointsPageState(); 10 | } 11 | 12 | class _MyPointsPageState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | final _size = MediaQuery.of(context).size; 16 | return Scaffold( 17 | appBar: AppBar( 18 | elevation: .0, 19 | backgroundColor: Colors.white, 20 | brightness: Brightness.light, 21 | centerTitle: true, 22 | leading: IconButton( 23 | onPressed: () => Get.back(), 24 | icon: Icon( 25 | Feather.arrow_left, 26 | size: _size.width / 15.0, 27 | color: Colors.grey.shade800, 28 | ), 29 | ), 30 | title: Text( 31 | 'My Points', 32 | style: TextStyle( 33 | fontSize: _size.width / 21.0, 34 | color: Colors.grey.shade800, 35 | fontWeight: FontWeight.bold, 36 | ), 37 | ), 38 | ), 39 | body: Container( 40 | color: Colors.grey.shade100, 41 | child: Column( 42 | children: [ 43 | Container( 44 | color: Colors.white, 45 | padding: EdgeInsets.symmetric(horizontal: _size.width * .32), 46 | child: Divider( 47 | color: Colors.grey.shade400, 48 | thickness: .4, 49 | height: .4, 50 | ), 51 | ), 52 | RankingUserCard( 53 | username: 'lambiengcode', 54 | urlToImage: members[0].urlToImage, 55 | index: 7, 56 | point: '2200', 57 | isMe: true, 58 | ), 59 | SizedBox( 60 | height: 8.0, 61 | ), 62 | Expanded( 63 | child: ListView.builder( 64 | itemCount: members.length, 65 | itemBuilder: (context, index) { 66 | return RankingUserCard( 67 | username: members[index].username, 68 | urlToImage: members[index].urlToImage, 69 | index: index + 1, 70 | point: '2200', 71 | isMe: members[index].username == 'lambiengcode', 72 | ); 73 | }, 74 | )) 75 | ], 76 | ), 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/src/pages/profile/pages/my_voucher_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/pages/profile/widgets/my_voucher_card.dart'; 5 | import '../../../models/voucher.dart'; 6 | 7 | class MyVoucherPage extends StatefulWidget { 8 | @override 9 | State createState() => _MyVoucherPageState(); 10 | } 11 | 12 | class _MyVoucherPageState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | final _size = MediaQuery.of(context).size; 16 | return Scaffold( 17 | appBar: AppBar( 18 | elevation: .0, 19 | backgroundColor: Colors.white, 20 | brightness: Brightness.light, 21 | centerTitle: true, 22 | leading: IconButton( 23 | onPressed: () => Get.back(), 24 | icon: Icon( 25 | Feather.arrow_left, 26 | size: _size.width / 15.0, 27 | color: Colors.grey.shade800, 28 | ), 29 | ), 30 | title: Text( 31 | 'My Voucher', 32 | style: TextStyle( 33 | fontSize: _size.width / 21.0, 34 | color: Colors.grey.shade800, 35 | fontWeight: FontWeight.bold, 36 | ), 37 | ), 38 | ), 39 | body: Container( 40 | color: Colors.grey.shade100, 41 | child: Column( 42 | children: [ 43 | Container( 44 | color: Colors.white, 45 | padding: EdgeInsets.symmetric(horizontal: _size.width * .32), 46 | child: Divider( 47 | color: Colors.grey.shade400, 48 | thickness: .4, 49 | height: .4, 50 | ), 51 | ), 52 | Expanded( 53 | child: ListView.builder( 54 | itemCount: vouchers.length, 55 | itemBuilder: (context, index) { 56 | return MyVoucherCard( 57 | title: vouchers[index].title, 58 | urlToImage: vouchers[index].urlToImage, 59 | ); // Voucher Card Vertical 60 | }, 61 | ), 62 | ), 63 | ], 64 | ), 65 | ), 66 | ); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /lib/src/pages/profile/widgets/my_voucher_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:now/src/pages/members/widgets/bottom_delete.dart'; 3 | import 'package:now/src/widgets/bottom_get_voucher.dart'; 4 | 5 | class MyVoucherCard extends StatefulWidget { 6 | final String title; 7 | final String urlToImage; 8 | MyVoucherCard({this.title, this.urlToImage}); 9 | @override 10 | State createState() => _MyVoucherCardState(); 11 | } 12 | 13 | class _MyVoucherCardState extends State { 14 | void showDeleteBottomSheet() { 15 | showModalBottomSheet( 16 | shape: RoundedRectangleBorder( 17 | borderRadius: BorderRadius.all( 18 | Radius.circular(4.0), 19 | ), 20 | ), 21 | isScrollControlled: true, 22 | context: context, 23 | builder: (context) { 24 | return BottomDelete(); 25 | }, 26 | ); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | final _size = MediaQuery.of(context).size; 32 | return GestureDetector( 33 | onTap: () => showDeleteBottomSheet(), 34 | child: Container( 35 | margin: EdgeInsets.only( 36 | bottom: 4.0, 37 | ), 38 | padding: EdgeInsets.symmetric( 39 | horizontal: 4.0, 40 | vertical: 8.0, 41 | ), 42 | decoration: BoxDecoration( 43 | color: Colors.white, 44 | ), 45 | child: Row( 46 | crossAxisAlignment: CrossAxisAlignment.start, 47 | mainAxisAlignment: MainAxisAlignment.start, 48 | children: [ 49 | Container( 50 | height: _size.width * .25, 51 | width: _size.width * .25, 52 | decoration: BoxDecoration( 53 | borderRadius: BorderRadius.circular(2.0), 54 | image: DecorationImage( 55 | image: NetworkImage(widget.urlToImage), 56 | fit: BoxFit.cover, 57 | ), 58 | ), 59 | ), 60 | SizedBox( 61 | width: 10.0, 62 | ), 63 | Expanded( 64 | child: Container( 65 | height: _size.width * .25, 66 | child: Column( 67 | crossAxisAlignment: CrossAxisAlignment.start, 68 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 69 | children: [ 70 | Column( 71 | crossAxisAlignment: CrossAxisAlignment.start, 72 | mainAxisAlignment: MainAxisAlignment.start, 73 | children: [ 74 | Text( 75 | widget.title, 76 | style: TextStyle( 77 | color: Colors.grey.shade800, 78 | fontSize: _size.width / 22.5, 79 | fontWeight: FontWeight.bold, 80 | ), 81 | ), 82 | SizedBox( 83 | height: 4.0, 84 | ), 85 | Text( 86 | '20 Voucher Left', 87 | style: TextStyle( 88 | color: Colors.grey.shade800, 89 | fontSize: _size.width / 28.0, 90 | fontWeight: FontWeight.w400, 91 | ), 92 | ), 93 | ], 94 | ), 95 | Text( 96 | 'DELETE', 97 | style: TextStyle( 98 | fontSize: _size.width / 25.0, 99 | color: Colors.blueAccent, 100 | fontWeight: FontWeight.w600, 101 | ), 102 | ), 103 | ], 104 | ), 105 | ), 106 | ), 107 | ], 108 | ), 109 | ), 110 | ); 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /lib/src/pages/save/save_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:now/src/models/access.dart'; 4 | import 'package:now/src/pages/save/widgets/save_card.dart'; 5 | 6 | class SavePage extends StatefulWidget { 7 | @override 8 | State createState() => _SavePageState(); 9 | } 10 | 11 | class _SavePageState extends State { 12 | String type = 'Cocktail'; 13 | List types = []; 14 | @override 15 | Widget build(BuildContext context) { 16 | final _size = MediaQuery.of(context).size; 17 | return Scaffold( 18 | appBar: AppBar( 19 | toolbarHeight: 52.0, 20 | brightness: Brightness.light, 21 | backgroundColor: Colors.transparent, 22 | elevation: .0, 23 | centerTitle: true, 24 | title: Text( 25 | 'Saved', 26 | style: TextStyle( 27 | fontSize: _size.width / 21.5, 28 | fontWeight: FontWeight.bold, 29 | color: Colors.grey.shade800, 30 | ), 31 | ), 32 | ), 33 | body: Container( 34 | color: Colors.grey.shade100, 35 | child: Column( 36 | children: [ 37 | Container( 38 | padding: EdgeInsets.symmetric( 39 | horizontal: 10.0, 40 | ), 41 | decoration: BoxDecoration( 42 | color: Colors.grey.shade50, 43 | boxShadow: [ 44 | BoxShadow( 45 | color: Color(0xFFABBAD5), 46 | spreadRadius: .8, 47 | blurRadius: 2.0, 48 | offset: Offset(0, 2.0), // changes position of shadow 49 | ), 50 | ], 51 | ), 52 | child: DropdownButtonHideUnderline( 53 | child: DropdownButtonFormField( 54 | icon: Icon( 55 | Feather.list, 56 | size: _size.width / 16.0, 57 | color: Colors.grey.shade700, 58 | ), 59 | iconEnabledColor: Colors.grey.shade800, 60 | decoration: InputDecoration( 61 | border: InputBorder.none, 62 | ), 63 | value: type, 64 | items: actions.map((state) { 65 | return DropdownMenuItem( 66 | value: state.title, 67 | child: Text( 68 | state.title, 69 | style: TextStyle( 70 | fontSize: _size.width / 24, 71 | color: Colors.grey.shade700, 72 | fontWeight: FontWeight.w500, 73 | ), 74 | )); 75 | }).toList(), 76 | onChanged: (val) { 77 | setState(() { 78 | type = val; 79 | }); 80 | }, 81 | ), 82 | ), 83 | ), 84 | Expanded( 85 | child: ListView.builder( 86 | itemCount: 10, 87 | itemBuilder: (context, index) { 88 | return SaveCard(); 89 | }, 90 | ), 91 | ), 92 | ], 93 | ), 94 | ), 95 | ); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /lib/src/pages/search/search_product_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/pages/home/widgets/build_store_card.dart'; 5 | import 'package:now/src/widgets/product_vertical_card.dart'; 6 | 7 | class SearchProductPage extends StatefulWidget { 8 | @override 9 | State createState() => _SearchProductPageState(); 10 | } 11 | 12 | class _SearchProductPageState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | final _size = MediaQuery.of(context).size; 16 | return Scaffold( 17 | appBar: AppBar( 18 | elevation: 2.0, 19 | brightness: Brightness.light, 20 | backgroundColor: Colors.white, 21 | centerTitle: false, 22 | automaticallyImplyLeading: false, 23 | leading: IconButton( 24 | icon: Icon( 25 | Feather.arrow_left, 26 | color: Colors.grey.shade800, 27 | size: _size.width / 16.0, 28 | ), 29 | onPressed: () => Get.back(), 30 | ), 31 | title: Row( 32 | mainAxisAlignment: MainAxisAlignment.start, 33 | crossAxisAlignment: CrossAxisAlignment.center, 34 | children: [ 35 | Expanded( 36 | child: GestureDetector( 37 | onTap: () {}, 38 | child: Container( 39 | height: 44.0, 40 | decoration: BoxDecoration( 41 | color: Colors.grey.shade100, 42 | borderRadius: BorderRadius.circular( 43 | 30.0, 44 | ), 45 | boxShadow: [ 46 | BoxShadow( 47 | color: Color(0xFFABBAD5), 48 | spreadRadius: .5, 49 | blurRadius: 1.25, 50 | offset: Offset(0, 1.5), // changes position of shadow 51 | ), 52 | ], 53 | ), 54 | alignment: Alignment.center, 55 | child: TextFormField( 56 | keyboardType: TextInputType.text, 57 | style: TextStyle( 58 | color: Colors.black87, 59 | fontSize: _size.width / 26.0, 60 | fontWeight: FontWeight.w400, 61 | ), 62 | textAlign: TextAlign.start, 63 | decoration: InputDecoration( 64 | prefixIcon: Icon( 65 | Feather.search, 66 | color: Colors.grey.shade600, 67 | size: _size.width / 24.0, 68 | ), 69 | border: InputBorder.none, 70 | hintText: "Search", 71 | hintStyle: TextStyle( 72 | color: Colors.grey, 73 | fontSize: _size.width / 26.0, 74 | fontWeight: FontWeight.w400, 75 | ), 76 | ), 77 | ), 78 | ), 79 | ), 80 | ), 81 | ], 82 | ), 83 | actions: [ 84 | IconButton( 85 | icon: Icon( 86 | Feather.sliders, 87 | color: Colors.grey.shade800, 88 | size: _size.width / 16.0, 89 | ), 90 | onPressed: () => null, 91 | ), 92 | SizedBox( 93 | width: 4.0, 94 | ), 95 | ], 96 | ), 97 | body: Container( 98 | color: Colors.white, 99 | child: ListView.builder( 100 | itemCount: 10, 101 | itemBuilder: (context, index) { 102 | return ProductVerticalCard(); 103 | }, 104 | ), 105 | ), 106 | ); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /lib/src/pages/search/search_store_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/pages/home/widgets/build_store_card.dart'; 5 | 6 | class SearchStorePage extends StatefulWidget { 7 | @override 8 | State createState() => _SearchStorePageState(); 9 | } 10 | 11 | class _SearchStorePageState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | final _size = MediaQuery.of(context).size; 15 | return Scaffold( 16 | appBar: AppBar( 17 | elevation: 2.0, 18 | brightness: Brightness.light, 19 | backgroundColor: Colors.white, 20 | centerTitle: false, 21 | automaticallyImplyLeading: false, 22 | leading: IconButton( 23 | icon: Icon( 24 | Feather.arrow_left, 25 | color: Colors.grey.shade800, 26 | size: _size.width / 16.0, 27 | ), 28 | onPressed: () => Get.back(), 29 | ), 30 | title: Row( 31 | mainAxisAlignment: MainAxisAlignment.start, 32 | crossAxisAlignment: CrossAxisAlignment.center, 33 | children: [ 34 | Expanded( 35 | child: GestureDetector( 36 | onTap: () {}, 37 | child: Container( 38 | height: 44.0, 39 | decoration: BoxDecoration( 40 | color: Colors.grey.shade50, 41 | borderRadius: BorderRadius.circular( 42 | 30.0, 43 | ), 44 | boxShadow: [ 45 | BoxShadow( 46 | color: Color(0xFFABBAD5), 47 | spreadRadius: .5, 48 | blurRadius: 1.25, 49 | offset: Offset(0, 1.5), // changes position of shadow 50 | ), 51 | ], 52 | ), 53 | alignment: Alignment.center, 54 | child: TextFormField( 55 | autofocus: true, 56 | keyboardType: TextInputType.text, 57 | style: TextStyle( 58 | color: Colors.black87, 59 | fontSize: _size.width / 26.0, 60 | fontWeight: FontWeight.w400, 61 | ), 62 | textAlign: TextAlign.start, 63 | decoration: InputDecoration( 64 | prefixIcon: Icon( 65 | Feather.search, 66 | color: Colors.grey.shade600, 67 | size: _size.width / 24.0, 68 | ), 69 | border: InputBorder.none, 70 | hintText: "Search", 71 | hintStyle: TextStyle( 72 | color: Colors.grey, 73 | fontSize: _size.width / 26.0, 74 | fontWeight: FontWeight.w400, 75 | ), 76 | ), 77 | ), 78 | ), 79 | ), 80 | ), 81 | ], 82 | ), 83 | actions: [ 84 | IconButton( 85 | icon: Icon( 86 | Feather.sliders, 87 | color: Colors.grey.shade800, 88 | size: _size.width / 16.0, 89 | ), 90 | onPressed: () => null, 91 | ), 92 | SizedBox( 93 | width: 4.0, 94 | ), 95 | ], 96 | ), 97 | body: Container( 98 | color: Colors.white, 99 | child: ListView.builder( 100 | itemCount: 10, 101 | itemBuilder: (context, index) { 102 | return BuildVerticalStoreCard(); 103 | }, 104 | ), 105 | ), 106 | ); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /lib/src/pages/store/pages/list_product_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/widgets/product_vertical_card.dart'; 5 | 6 | class ListProductPage extends StatefulWidget { 7 | final String title; 8 | ListProductPage({this.title}); 9 | @override 10 | State createState() => _ListProductPageState(); 11 | } 12 | 13 | class _ListProductPageState extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | final _size = MediaQuery.of(context).size; 17 | return Scaffold( 18 | appBar: AppBar( 19 | elevation: .0, 20 | backgroundColor: Colors.white, 21 | brightness: Brightness.light, 22 | centerTitle: true, 23 | leading: IconButton( 24 | onPressed: () => Get.back(), 25 | icon: Icon( 26 | Feather.arrow_left, 27 | size: _size.width / 15.0, 28 | color: Colors.grey.shade800, 29 | ), 30 | ), 31 | title: Text( 32 | widget.title, 33 | style: TextStyle( 34 | fontSize: _size.width / 21.0, 35 | color: Colors.grey.shade800, 36 | fontWeight: FontWeight.bold, 37 | ), 38 | ), 39 | ), 40 | body: Container( 41 | child: ListView.builder( 42 | itemCount: 10, 43 | itemBuilder: (context, index) { 44 | return ProductVerticalCard(); 45 | }, 46 | ), 47 | ), 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /lib/src/pages/store/pages/product_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/pages/store/widgets/bottom_buy.dart'; 5 | 6 | class ProductPage extends StatefulWidget { 7 | @override 8 | State createState() => _ProductPageState(); 9 | } 10 | 11 | class _ProductPageState extends State { 12 | void showBuyBottomSheet() { 13 | showModalBottomSheet( 14 | shape: RoundedRectangleBorder( 15 | borderRadius: BorderRadius.all( 16 | Radius.circular(8.0), 17 | ), 18 | ), 19 | isScrollControlled: true, 20 | context: context, 21 | builder: (context) { 22 | return BottomBuy(); 23 | }, 24 | ); 25 | } 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | final _size = MediaQuery.of(context).size; 30 | return Scaffold( 31 | body: Container( 32 | child: SingleChildScrollView( 33 | child: Column( 34 | crossAxisAlignment: CrossAxisAlignment.start, 35 | children: [ 36 | Container( 37 | padding: EdgeInsets.only( 38 | top: _size.height / 22.0, 39 | ), 40 | height: _size.height * .25, 41 | width: _size.width, 42 | decoration: BoxDecoration( 43 | image: DecorationImage( 44 | image: NetworkImage( 45 | 'https://www.highlandscoffee.com.vn/vnt_upload/weblink/HCO-7548-PHIN-SUA-DA-2019-TALENT-WEB_1.jpg'), 46 | fit: BoxFit.cover, 47 | ), 48 | ), 49 | child: Row( 50 | crossAxisAlignment: CrossAxisAlignment.start, 51 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 52 | children: [ 53 | IconButton( 54 | onPressed: () => Get.back(), 55 | icon: Icon( 56 | Feather.arrow_left, 57 | color: Colors.white, 58 | size: _size.width / 15.0, 59 | ), 60 | ), 61 | ], 62 | ), 63 | ), 64 | SizedBox( 65 | height: 16.0, 66 | ), 67 | Padding( 68 | padding: EdgeInsets.symmetric( 69 | horizontal: 12.0, 70 | ), 71 | child: Column( 72 | crossAxisAlignment: CrossAxisAlignment.start, 73 | children: [ 74 | Text( 75 | 'Coffee Sofresh', 76 | style: TextStyle( 77 | fontSize: _size.width / 21.0, 78 | color: Colors.black, 79 | fontWeight: FontWeight.bold, 80 | ), 81 | ), 82 | SizedBox( 83 | height: 6.0, 84 | ), 85 | Row( 86 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 87 | children: [ 88 | Text( 89 | '2021 sold | 225 like', 90 | style: TextStyle( 91 | fontSize: _size.width / 26.0, 92 | color: Colors.grey.shade800, 93 | fontWeight: FontWeight.w400, 94 | ), 95 | ), 96 | IconButton( 97 | onPressed: () => showBuyBottomSheet(), 98 | icon: Icon( 99 | Feather.plus_circle, 100 | color: Colors.blueAccent, 101 | size: _size.width / 15.0, 102 | ), 103 | ), 104 | ], 105 | ), 106 | ], 107 | ), 108 | ), 109 | SizedBox( 110 | height: 12.0, 111 | ), 112 | Divider( 113 | thickness: .5, 114 | height: .5, 115 | color: Colors.grey, 116 | ), 117 | SizedBox( 118 | height: 12.0, 119 | ), 120 | Padding( 121 | padding: EdgeInsets.symmetric( 122 | horizontal: 12.0, 123 | ), 124 | child: Text( 125 | 'Reviews', 126 | style: TextStyle( 127 | fontSize: _size.width / 24.0, 128 | color: Colors.black, 129 | fontWeight: FontWeight.bold, 130 | ), 131 | ), 132 | ), 133 | ], 134 | ), 135 | ), 136 | ), 137 | ); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /lib/src/pages/store/widgets/carousel_banner.dart: -------------------------------------------------------------------------------- 1 | import 'package:carousel_slider/carousel_slider.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_icons/flutter_icons.dart'; 4 | 5 | class CarouselBanner extends StatefulWidget { 6 | @override 7 | State createState() => _CarouselBannerState(); 8 | } 9 | 10 | class _CarouselBannerState extends State { 11 | var _current = 0; 12 | List imgList = [ 13 | 'https://images.unsplash.com/photo-1540555700478-4be289fbecef?ixid=MXwxMjA3fDB8MHxzZWFyY2h8Nnx8Y29zbWV0aWNzfGVufDB8fDB8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60', 14 | 'https://images.unsplash.com/photo-1585519356004-2bd6527d9cbe?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MjF8fGNvc21ldGljc3xlbnwwfHwwfA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60', 15 | 'https://images.unsplash.com/photo-1593487568720-92097fb460fb?ixid=MXwxMjA3fDB8MHxzZWFyY2h8MjJ8fGNvc21ldGljc3xlbnwwfHwwfA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60', 16 | 'https://images.unsplash.com/photo-1591375275714-8b2b55b0bf0d?ixid=MXwxMjA3fDB8MHxzZWFyY2h8NDR8fGNvc21ldGljc3xlbnwwfHwwfA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60', 17 | 'https://images.unsplash.com/photo-1594490556719-16dcd6b1eb3d?ixid=MXwxMjA3fDB8MHxzZWFyY2h8NTB8fGNvc21ldGljc3xlbnwwfHwwfA%3D%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60' 18 | ]; 19 | 20 | List map(List list, Function handler) { 21 | List result = []; 22 | for (var i = 0; i < list.length; i++) { 23 | result.add(handler(i, list[i])); 24 | } 25 | return result; 26 | } 27 | 28 | void changePostion(int i) { 29 | setState(() { 30 | if (_current == 4 && i == 1) { 31 | _current = 0; 32 | } else if (_current == 0 && i == -1) { 33 | _current = 4; 34 | } else { 35 | _current += i; 36 | } 37 | }); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | Size _size = MediaQuery.of(context).size; 43 | return Stack( 44 | children: [ 45 | CarouselSlider( 46 | options: CarouselOptions( 47 | height: _size.height * .15, 48 | aspectRatio: 1 / 1, 49 | viewportFraction: 1, 50 | initialPage: 0, 51 | enableInfiniteScroll: true, 52 | reverse: false, 53 | autoPlay: true, 54 | autoPlayInterval: Duration(seconds: 5), 55 | autoPlayAnimationDuration: Duration(milliseconds: 1000), 56 | autoPlayCurve: Curves.fastOutSlowIn, 57 | enlargeCenterPage: true, 58 | scrollDirection: Axis.horizontal, 59 | onPageChanged: (index, reason) { 60 | setState(() { 61 | _current = index; 62 | }); 63 | }, 64 | ), 65 | items: imgList.map((imgUrl) { 66 | return Builder( 67 | builder: (BuildContext context) { 68 | return Container( 69 | decoration: BoxDecoration( 70 | borderRadius: BorderRadius.circular(8.0), 71 | image: DecorationImage( 72 | image: NetworkImage(imgList[_current]), 73 | fit: BoxFit.cover, 74 | ), 75 | ), 76 | ); 77 | }, 78 | ); 79 | }).toList(), 80 | ), 81 | Positioned( 82 | bottom: 8.0, 83 | child: Container( 84 | width: _size.width * .9, 85 | child: Row( 86 | mainAxisAlignment: MainAxisAlignment.center, 87 | children: map(imgList, (index, url) { 88 | return GestureDetector( 89 | onTap: () { 90 | setState(() { 91 | _current = index; 92 | }); 93 | }, 94 | child: Container( 95 | width: _current == index ? 16.0 : 10.0, 96 | height: _current == index ? 8.0 : 6.0, 97 | margin: EdgeInsets.symmetric(horizontal: 10.0), 98 | decoration: BoxDecoration( 99 | borderRadius: BorderRadius.all(Radius.circular(40.0)), 100 | color: _current == index 101 | ? Colors.white 102 | : Colors.white.withOpacity(.9), 103 | ), 104 | ), 105 | ); 106 | }), 107 | ), 108 | ), 109 | ), 110 | Container( 111 | alignment: Alignment.center, 112 | child: Row( 113 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 114 | children: [ 115 | IconButton( 116 | color: Colors.white, 117 | icon: Icon( 118 | Feather.arrow_left, 119 | size: _size.width / 15.0, 120 | ), 121 | onPressed: () { 122 | changePostion(-1); 123 | }, 124 | ), 125 | IconButton( 126 | color: Colors.white, 127 | icon: Icon( 128 | Feather.arrow_right, 129 | size: _size.width / 15.0, 130 | ), 131 | onPressed: () { 132 | changePostion(1); 133 | }, 134 | ), 135 | ], 136 | ), 137 | ), 138 | ], 139 | ); 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /lib/src/widgets/bottom_get_voucher.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class BottomGetVoucher extends StatefulWidget { 4 | @override 5 | State createState() => _BottomGetVoucherState(); 6 | } 7 | 8 | class _BottomGetVoucherState extends State { 9 | int count = 0; 10 | 11 | @override 12 | void initState() { 13 | super.initState(); 14 | } 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | final _size = MediaQuery.of(context).size; 19 | 20 | return Container( 21 | decoration: BoxDecoration( 22 | color: Colors.grey.shade100, 23 | borderRadius: BorderRadius.vertical( 24 | top: Radius.circular( 25 | 4.0, 26 | ), 27 | ), 28 | ), 29 | child: SingleChildScrollView( 30 | child: Column( 31 | crossAxisAlignment: CrossAxisAlignment.start, 32 | mainAxisAlignment: MainAxisAlignment.start, 33 | children: [ 34 | SizedBox( 35 | height: 14.0, 36 | ), 37 | Padding( 38 | padding: EdgeInsets.symmetric( 39 | horizontal: 16.0, 40 | ), 41 | child: Row( 42 | mainAxisAlignment: MainAxisAlignment.start, 43 | children: [ 44 | Expanded( 45 | flex: 2, 46 | child: GestureDetector( 47 | onTap: () => Navigator.of(context).pop(context), 48 | child: Container( 49 | padding: EdgeInsets.symmetric( 50 | vertical: 12.5, 51 | ), 52 | alignment: Alignment.center, 53 | decoration: BoxDecoration( 54 | borderRadius: BorderRadius.all(Radius.circular(4.0)), 55 | color: Colors.white, 56 | boxShadow: [ 57 | BoxShadow( 58 | color: Color(0xFFABBAD5), 59 | spreadRadius: .8, 60 | blurRadius: 2.0, 61 | offset: 62 | Offset(0, 2.0), // changes position of shadow 63 | ), 64 | ], 65 | ), 66 | child: Text( 67 | 'Close', 68 | style: TextStyle( 69 | color: Colors.black, 70 | fontSize: _size.width / 26.0, 71 | fontWeight: FontWeight.w600, 72 | ), 73 | ), 74 | ), 75 | ), 76 | ), 77 | SizedBox( 78 | width: 12.0, 79 | ), 80 | Expanded( 81 | flex: 4, 82 | child: GestureDetector( 83 | onTap: () => Navigator.of(context).pop(context), 84 | child: Container( 85 | padding: EdgeInsets.symmetric( 86 | vertical: 12.5, 87 | ), 88 | alignment: Alignment.center, 89 | decoration: BoxDecoration( 90 | color: Colors.blueAccent, 91 | borderRadius: BorderRadius.all(Radius.circular(4.0)), 92 | boxShadow: [ 93 | BoxShadow( 94 | color: Colors.black26, 95 | spreadRadius: .8, 96 | blurRadius: 2.0, 97 | offset: 98 | Offset(0, 2.0), // changes position of shadow 99 | ), 100 | ], 101 | ), 102 | child: Text( 103 | 'Get', 104 | style: TextStyle( 105 | color: Colors.white, 106 | fontSize: _size.width / 26.0, 107 | fontWeight: FontWeight.w600, 108 | ), 109 | ), 110 | ), 111 | ), 112 | ), 113 | ], 114 | ), 115 | ), 116 | SizedBox( 117 | height: 16.0, 118 | ), 119 | ], 120 | ), 121 | ), 122 | ); 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /lib/src/widgets/loading.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Loading extends StatefulWidget { 4 | @override 5 | State createState() => _LoadingState(); 6 | } 7 | 8 | class _LoadingState extends State { 9 | @override 10 | Widget build(BuildContext context) { 11 | return Scaffold( 12 | body: Container( 13 | child: Center( 14 | child: CircularProgressIndicator(), 15 | ), 16 | ), 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/widgets/product_horizontal_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class ProductHorizontalCard extends StatefulWidget { 5 | final int index; 6 | ProductHorizontalCard({this.index}); 7 | @override 8 | State createState() => _ProductHorizontalCardState(); 9 | } 10 | 11 | class _ProductHorizontalCardState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | final _size = MediaQuery.of(context).size; 15 | return GestureDetector( 16 | onTap: () => Get.toNamed('/product'), 17 | child: Container( 18 | margin: EdgeInsets.only( 19 | left: widget.index != 0 ? 10.0 : 6.0, 20 | ), 21 | child: Column( 22 | crossAxisAlignment: CrossAxisAlignment.start, 23 | mainAxisAlignment: MainAxisAlignment.start, 24 | children: [ 25 | Container( 26 | height: _size.width * .4, 27 | width: _size.width * .4, 28 | decoration: BoxDecoration( 29 | borderRadius: BorderRadius.circular( 30 | 2.0, 31 | ), 32 | image: DecorationImage( 33 | image: NetworkImage( 34 | 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTRcMynRQ0TtZ0YwF6jgzgqqiZ4ukK7s5Qjrg&usqp=CAU'), 35 | fit: BoxFit.cover, 36 | ), 37 | ), 38 | ), 39 | SizedBox( 40 | height: 6.0, 41 | ), 42 | Container( 43 | width: _size.width * .4, 44 | child: Text( 45 | 'Coffee Sofresh', 46 | style: TextStyle( 47 | fontSize: _size.width / 24.0, 48 | color: Colors.grey.shade800, 49 | fontWeight: FontWeight.w600, 50 | ), 51 | ), 52 | ), 53 | SizedBox( 54 | height: 6.0, 55 | ), 56 | Container( 57 | width: _size.width * .4, 58 | child: Text( 59 | '39,000đ', 60 | style: TextStyle( 61 | fontSize: _size.width / 26.0, 62 | color: Colors.grey.shade900, 63 | fontWeight: FontWeight.bold, 64 | ), 65 | ), 66 | ), 67 | ], 68 | ), 69 | ), 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lib/src/widgets/product_vertical_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_icons/flutter_icons.dart'; 3 | import 'package:get/get.dart'; 4 | import 'package:now/src/pages/store/widgets/bottom_buy.dart'; 5 | 6 | class ProductVerticalCard extends StatefulWidget { 7 | @override 8 | State createState() => _ProductVerticalCardState(); 9 | } 10 | 11 | class _ProductVerticalCardState extends State { 12 | void showBuyBottomSheet() { 13 | showModalBottomSheet( 14 | shape: RoundedRectangleBorder( 15 | borderRadius: BorderRadius.all( 16 | Radius.circular(8.0), 17 | ), 18 | ), 19 | isScrollControlled: true, 20 | context: context, 21 | builder: (context) { 22 | return BottomBuy(); 23 | }, 24 | ); 25 | } 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | final _size = MediaQuery.of(context).size; 30 | return GestureDetector( 31 | onTap: () => Get.toNamed('/product'), 32 | child: Container( 33 | margin: EdgeInsets.only( 34 | bottom: 4.0, 35 | ), 36 | padding: EdgeInsets.symmetric( 37 | horizontal: 4.0, 38 | vertical: 8.0, 39 | ), 40 | decoration: BoxDecoration( 41 | color: Colors.white, 42 | boxShadow: [ 43 | BoxShadow( 44 | color: Color(0xFFABBAD5), 45 | spreadRadius: 1.15, 46 | blurRadius: 1.25, 47 | offset: Offset(.0, 2.5), // changes position of shadow 48 | ), 49 | ], 50 | ), 51 | child: Row( 52 | crossAxisAlignment: CrossAxisAlignment.start, 53 | mainAxisAlignment: MainAxisAlignment.start, 54 | children: [ 55 | Container( 56 | height: _size.width * .25, 57 | width: _size.width * .25, 58 | decoration: BoxDecoration( 59 | borderRadius: BorderRadius.circular(2.0), 60 | image: DecorationImage( 61 | image: NetworkImage( 62 | 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTRcMynRQ0TtZ0YwF6jgzgqqiZ4ukK7s5Qjrg&usqp=CAU'), 63 | fit: BoxFit.cover, 64 | ), 65 | ), 66 | ), 67 | SizedBox( 68 | width: 10.0, 69 | ), 70 | Expanded( 71 | child: Container( 72 | height: _size.width * .25, 73 | child: Column( 74 | crossAxisAlignment: CrossAxisAlignment.start, 75 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 76 | children: [ 77 | Column( 78 | crossAxisAlignment: CrossAxisAlignment.start, 79 | mainAxisAlignment: MainAxisAlignment.start, 80 | children: [ 81 | Text( 82 | 'Highlands Coffee', 83 | style: TextStyle( 84 | color: Colors.grey.shade800, 85 | fontSize: _size.width / 22.5, 86 | fontWeight: FontWeight.bold, 87 | ), 88 | ), 89 | Row( 90 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 91 | children: [ 92 | Text( 93 | '500 Sold | 1 like', 94 | style: TextStyle( 95 | color: Colors.grey.shade800, 96 | fontSize: _size.width / 28.0, 97 | fontWeight: FontWeight.w400, 98 | ), 99 | ), 100 | IconButton( 101 | onPressed: () => showBuyBottomSheet(), 102 | icon: Icon( 103 | Feather.plus_circle, 104 | color: Colors.blueAccent, 105 | size: _size.width / 15.0, 106 | ), 107 | ), 108 | ], 109 | ), 110 | ], 111 | ), 112 | Text( 113 | '39,000đ', 114 | style: TextStyle( 115 | fontSize: _size.width / 24.0, 116 | color: Colors.grey.shade900, 117 | fontWeight: FontWeight.bold, 118 | ), 119 | ), 120 | ], 121 | ), 122 | ), 123 | ), 124 | ], 125 | ), 126 | ), 127 | ); 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /lib/src/widgets/top_snackbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class GetSnackBar { 5 | final String title; 6 | final String subTitle; 7 | final Size size; 8 | GetSnackBar({this.title, this.subTitle, this.size}); 9 | 10 | show() { 11 | Get.snackbar( 12 | '', 13 | '', 14 | colorText: Colors.white, 15 | backgroundColor: Colors.black45, 16 | duration: Duration( 17 | milliseconds: 2000, 18 | ), 19 | titleText: Text( 20 | 'Comming Soon!', 21 | style: TextStyle( 22 | fontSize: size.width / 24.5, 23 | color: Colors.white, 24 | fontWeight: FontWeight.bold, 25 | ), 26 | ), 27 | messageText: Text( 28 | 'This feature will available in next version.', 29 | style: TextStyle( 30 | fontSize: size.width / 26.0, 31 | color: Colors.white.withOpacity(.85), 32 | fontWeight: FontWeight.w400, 33 | ), 34 | ), 35 | padding: EdgeInsets.fromLTRB( 36 | 20.0, 37 | 20.0, 38 | 8.0, 39 | 18.0, 40 | ), 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/src/widgets/voucher_horizontal_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:now/src/widgets/bottom_get_voucher.dart'; 3 | 4 | import '../models/voucher.dart'; 5 | 6 | class VoucherCard extends StatefulWidget { 7 | final int index; 8 | VoucherCard({this.index}); 9 | @override 10 | State createState() => _VoucherCardState(); 11 | } 12 | 13 | class _VoucherCardState extends State { 14 | void showVoucherBottomSheet() { 15 | showModalBottomSheet( 16 | shape: RoundedRectangleBorder( 17 | borderRadius: BorderRadius.all( 18 | Radius.circular(4.0), 19 | ), 20 | ), 21 | isScrollControlled: true, 22 | context: context, 23 | builder: (context) { 24 | return BottomGetVoucher(); 25 | }, 26 | ); 27 | } 28 | 29 | @override 30 | Widget build(BuildContext context) { 31 | final _size = MediaQuery.of(context).size; 32 | return GestureDetector( 33 | onTap: () => showVoucherBottomSheet(), 34 | child: Container( 35 | margin: EdgeInsets.only( 36 | left: widget.index != 0 ? 10.0 : 6.0, 37 | ), 38 | child: Column( 39 | crossAxisAlignment: CrossAxisAlignment.start, 40 | mainAxisAlignment: MainAxisAlignment.start, 41 | children: [ 42 | Container( 43 | height: _size.width * .35, 44 | width: _size.width * .35, 45 | decoration: BoxDecoration( 46 | image: DecorationImage( 47 | image: NetworkImage(vouchers[widget.index].urlToImage), 48 | fit: BoxFit.cover, 49 | ), 50 | ), 51 | ), 52 | SizedBox( 53 | height: 6.0, 54 | ), 55 | Container( 56 | width: _size.width * .35, 57 | child: Text( 58 | vouchers[widget.index].title, 59 | style: TextStyle( 60 | fontSize: _size.width / 24.0, 61 | color: Colors.grey.shade800, 62 | fontWeight: FontWeight.w600, 63 | ), 64 | ), 65 | ), 66 | ], 67 | ), 68 | ), 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /lib/src/widgets/voucher_verical_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:now/src/widgets/bottom_get_voucher.dart'; 3 | 4 | class VoucherVerticalCard extends StatefulWidget { 5 | final String title; 6 | final String urlToImage; 7 | VoucherVerticalCard({this.title, this.urlToImage}); 8 | @override 9 | State createState() => _VoucherVerticalCardState(); 10 | } 11 | 12 | class _VoucherVerticalCardState extends State { 13 | void showVoucherBottomSheet() { 14 | showModalBottomSheet( 15 | shape: RoundedRectangleBorder( 16 | borderRadius: BorderRadius.all( 17 | Radius.circular(4.0), 18 | ), 19 | ), 20 | isScrollControlled: true, 21 | context: context, 22 | builder: (context) { 23 | return BottomGetVoucher(); 24 | }, 25 | ); 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | final _size = MediaQuery.of(context).size; 31 | return GestureDetector( 32 | onTap: () => showVoucherBottomSheet(), 33 | child: Container( 34 | margin: EdgeInsets.only( 35 | bottom: 4.0, 36 | ), 37 | padding: EdgeInsets.symmetric( 38 | horizontal: 4.0, 39 | vertical: 8.0, 40 | ), 41 | decoration: BoxDecoration( 42 | color: Colors.white, 43 | ), 44 | child: Row( 45 | crossAxisAlignment: CrossAxisAlignment.start, 46 | mainAxisAlignment: MainAxisAlignment.start, 47 | children: [ 48 | Container( 49 | height: _size.width * .25, 50 | width: _size.width * .25, 51 | decoration: BoxDecoration( 52 | borderRadius: BorderRadius.circular(2.0), 53 | image: DecorationImage( 54 | image: NetworkImage(widget.urlToImage), 55 | fit: BoxFit.cover, 56 | ), 57 | ), 58 | ), 59 | SizedBox( 60 | width: 10.0, 61 | ), 62 | Expanded( 63 | child: Container( 64 | height: _size.width * .25, 65 | child: Column( 66 | crossAxisAlignment: CrossAxisAlignment.start, 67 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 68 | children: [ 69 | Column( 70 | crossAxisAlignment: CrossAxisAlignment.start, 71 | mainAxisAlignment: MainAxisAlignment.start, 72 | children: [ 73 | Text( 74 | widget.title, 75 | style: TextStyle( 76 | color: Colors.grey.shade800, 77 | fontSize: _size.width / 22.5, 78 | fontWeight: FontWeight.bold, 79 | ), 80 | ), 81 | SizedBox( 82 | height: 4.0, 83 | ), 84 | Text( 85 | '20 Voucher Left', 86 | style: TextStyle( 87 | color: Colors.grey.shade800, 88 | fontSize: _size.width / 28.0, 89 | fontWeight: FontWeight.w400, 90 | ), 91 | ), 92 | ], 93 | ), 94 | Text( 95 | 'GET', 96 | style: TextStyle( 97 | fontSize: _size.width / 25.0, 98 | color: Colors.blueAccent, 99 | fontWeight: FontWeight.w600, 100 | ), 101 | ), 102 | ], 103 | ), 104 | ), 105 | ), 106 | ], 107 | ), 108 | ), 109 | ); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: now 2 | description: A new Flutter application. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | 27 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^1.0.1 31 | get: ^3.23.1 32 | provider: 33 | intl: ^0.16.1 34 | firebase_messaging: 35 | flutter_screenutil: ^4.0.2+1 36 | flutter_icons: ^1.1.0 37 | font_awesome_flutter: ^8.8.1 38 | line_awesome_flutter: ^1.0.1 39 | simple_animations: ^1.3.3 40 | photo_view: ^0.9.2 41 | cached_network_image: ^2.2.0+1 42 | image_picker: ^0.6.4 43 | 44 | location: ^3.2.1 45 | geocoder: ^0.2.1 46 | google_maps_place_picker: ^1.0.1 47 | google_maps_flutter: ^1.0.6 48 | 49 | flutter_datetime_picker: ^1.4.0 50 | 51 | fl_chart: ^0.9.4 52 | bubble_tab_indicator: ^0.1.4 53 | carousel_slider: ^2.3.1 54 | 55 | dev_dependencies: 56 | flutter_test: 57 | sdk: flutter 58 | integration_test: 59 | sdk: flutter 60 | 61 | # For information on the generic Dart part of this file, see the 62 | # following page: https://dart.dev/tools/pub/pubspec 63 | 64 | # The following section is specific to Flutter. 65 | flutter: 66 | # The following line ensures that the Material Icons font is 67 | # included with your application, so that you can use the icons in 68 | # the material Icons class. 69 | uses-material-design: true 70 | 71 | assets: 72 | - images/ 73 | 74 | fonts: 75 | 76 | - family: Lobster 77 | fonts: 78 | - asset: assets/fonts/Lobster-Regular.ttf 79 | 80 | - family: Raleway 81 | fonts: 82 | - asset: assets/fonts/Raleway-Regular.ttf 83 | 84 | - family: Raleway-Bold 85 | fonts: 86 | - asset: assets/fonts/Raleway-Bold.ttf 87 | # An image asset can refer to one or more resolution-specific "variants", see 88 | # https://flutter.dev/assets-and-images/#resolution-aware. 89 | 90 | # For details regarding adding assets from package dependencies, see 91 | # https://flutter.dev/assets-and-images/#from-packages 92 | 93 | # To add custom fonts to your application, add a fonts section here, 94 | # in this "flutter" section. Each entry in this list should have a 95 | # "family" key with the font family name, and a "fonts" key with a 96 | # list giving the asset and other descriptors for the font. For 97 | # example: 98 | # fonts: 99 | # - family: Schyler 100 | # fonts: 101 | # - asset: fonts/Schyler-Regular.ttf 102 | # - asset: fonts/Schyler-Italic.ttf 103 | # style: italic 104 | # - family: Trajan Pro 105 | # fonts: 106 | # - asset: fonts/TrajanPro.ttf 107 | # - asset: fonts/TrajanPro_Bold.ttf 108 | # weight: 700 109 | # 110 | # For details regarding fonts from package dependencies, 111 | # see https://flutter.dev/custom-fonts/#from-packages 112 | -------------------------------------------------------------------------------- /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:now/src/app.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(App()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lambiengcode/flutter-ecommerce-app-sandbox/8e02d84aee32adc0819fb34f044163ac48baef67/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | now 30 | 31 | 32 | 33 | 36 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "now", 3 | "short_name": "now", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter application.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | --------------------------------------------------------------------------------