├── .github └── FUNDING.yml ├── .gitignore ├── .metadata ├── README.md ├── android ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.buildship.core.prefs ├── app │ ├── .classpath │ ├── .project │ ├── .settings │ │ └── org.eclipse.buildship.core.prefs │ ├── build.gradle │ ├── proguard-rules.pro │ ├── release │ │ ├── app-release.apk │ │ └── output.json │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── ic_launcher-web.png │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── flutteruikit │ │ │ └── MainActivity.java │ │ └── res │ │ ├── drawable │ │ ├── ic_launcher_background.xml │ │ ├── launch_background.xml │ │ └── ui_kit.png │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.png │ │ ├── ic_launcher_foreground.png │ │ └── ic_launcher_round.png │ │ └── values │ │ ├── ic_launcher_background.xml │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── release │ ├── app-release.apk │ └── output.json └── settings.gradle ├── assets ├── fonts │ ├── Quicksand-Medium.ttf │ ├── Quicksand_Bold.otf │ ├── Quicksand_Book.otf │ ├── Quicksand_Light.otf │ ├── Raleway-Medium.ttf │ └── Raleway-Regular.ttf └── images │ ├── blank.jpg │ ├── dashboard.jpg │ ├── login.jpg │ ├── map.png │ ├── payment.jpg │ ├── pk.jpg │ ├── profile.jpg │ ├── setting.jpeg │ ├── shopping.jpeg │ ├── timeline.jpeg │ └── verification.jpg ├── changelog.md ├── flutter_01.log ├── flutter_uikit.iml ├── flutter_uikit_android.iml ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── main.m ├── lib ├── di │ └── dependency_injection.dart ├── inherited │ ├── login_provider.dart │ └── product_provider.dart ├── logic │ ├── bloc │ │ ├── cart_bloc.dart │ │ ├── credit_card_bloc.dart │ │ ├── login_bloc.dart │ │ ├── menu_bloc.dart │ │ ├── post_bloc.dart │ │ └── product_bloc.dart │ └── viewmodel │ │ ├── cart_view_model.dart │ │ ├── menu_view_model.dart │ │ ├── post_view_model.dart │ │ ├── product_view_model.dart │ │ └── user_login_view_model.dart ├── main.dart ├── model │ ├── fetch_process.dart │ ├── login.dart │ ├── menu.dart │ ├── otp.dart │ ├── post.dart │ └── product.dart ├── myapp.dart ├── services │ ├── abstract │ │ └── i_otp_service.dart │ ├── fetch_exception.dart │ ├── mock │ │ └── mock_otp_service.dart │ ├── network_service.dart │ ├── network_service_response.dart │ ├── real │ │ └── real_otp_service.dart │ └── restclient.dart ├── ui │ ├── page │ │ ├── dashboard │ │ │ ├── dashboard_one.page.dart │ │ │ ├── dashboard_one │ │ │ │ └── dashboard_menu_row.dart │ │ │ ├── dashboard_two │ │ │ │ └── dashboard_menu_row_two.dart │ │ │ └── dashboard_two_page.dart │ │ ├── home_page.dart │ │ ├── login │ │ │ ├── login_one │ │ │ │ ├── login_card.dart │ │ │ │ └── login_widget.dart │ │ │ ├── login_page.dart │ │ │ └── login_two_page.dart │ │ ├── notfound │ │ │ └── notfound_page.dart │ │ ├── payment │ │ │ ├── credit_card_page.dart │ │ │ └── payment_success_page.dart │ │ ├── profile │ │ │ ├── profile_one_page.dart │ │ │ └── profile_two_page.dart │ │ ├── settings │ │ │ └── settings_one_page.dart │ │ ├── shopping │ │ │ ├── product_detail_page.dart │ │ │ ├── shopping_details │ │ │ │ ├── shopping_action.dart │ │ │ │ └── shopping_widget.dart │ │ │ ├── shopping_details_page.dart │ │ │ ├── shopping_one_page.dart │ │ │ └── shopping_two │ │ │ │ ├── product_card.dart │ │ │ │ ├── product_desc.dart │ │ │ │ └── product_detail_widgets.dart │ │ └── timeline │ │ │ ├── timeline_one_page.dart │ │ │ └── timeline_two_page.dart │ ├── tools │ │ └── arc_clipper.dart │ └── widgets │ │ ├── about_tile.dart │ │ ├── api_subscription.dart │ │ ├── common_dialogs.dart │ │ ├── common_divider.dart │ │ ├── common_drawer.dart │ │ ├── common_scaffold.dart │ │ ├── common_switch.dart │ │ ├── custom_float.dart │ │ ├── gradient_button.dart │ │ ├── label_below_icon.dart │ │ ├── label_icon.dart │ │ ├── login_background.dart │ │ └── profile_tile.dart └── utils │ ├── translations.dart │ └── uidata.dart ├── licence.txt ├── locale ├── i18n_en.json └── i18n_hi.json ├── pubspec.lock ├── pubspec.yaml ├── raw ├── flutter_uikit_top.png ├── fu1.png ├── fu10.png ├── fu11.png ├── fu12.png ├── fu2.png ├── fu3.png ├── fu4.png ├── fu5.png ├── fu6.png ├── fu7.png ├── fu8.png └── fu9.png └── test └── widget_test.dart /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: ['https://www.paypal.me/imthepk/'] 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | 9 | .flutter-plugins 10 | 11 | .properties 12 | key.properties 13 | .idea 14 | .vscode -------------------------------------------------------------------------------- /.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: a18f5e84a1045551774a6c12fd40fa4997356931 8 | channel: master 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /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 | throw new GradleException("versionCode not found. Define flutter.versionCode in the local.properties file.") 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | throw new GradleException("versionName not found. Define flutter.versionName in the local.properties file.") 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | def keystorePropertiesFile = rootProject.file("key.properties") 28 | def keystoreProperties = new Properties() 29 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 30 | 31 | android { 32 | compileSdkVersion 28 33 | 34 | lintOptions { 35 | disable 'InvalidPackage' 36 | } 37 | 38 | defaultConfig { 39 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 40 | applicationId "com.mtechviral.flutteruikit" 41 | minSdkVersion 16 42 | targetSdkVersion 28 43 | versionCode flutterVersionCode.toInteger() 44 | versionName flutterVersionName 45 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 46 | 47 | } 48 | signingConfigs { 49 | release { 50 | keyAlias keystoreProperties['keyAlias'] 51 | keyPassword keystoreProperties['keyPassword'] 52 | storeFile file(keystoreProperties['storeFile']) 53 | storePassword keystoreProperties['storePassword'] 54 | } 55 | } 56 | 57 | buildTypes { 58 | release { 59 | // TODO: Add your own signing config for the release build. 60 | // Signing with the debug keys for now, so `flutter run --release` works. 61 | signingConfig signingConfigs.release 62 | minifyEnabled true 63 | useProguard true 64 | 65 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 66 | } 67 | 68 | } 69 | 70 | } 71 | 72 | flutter { 73 | source '../..' 74 | } 75 | 76 | dependencies { 77 | testImplementation 'junit:junit:4.12' 78 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 79 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 80 | } 81 | -------------------------------------------------------------------------------- /android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | #Flutter Wrapper 2 | -keep class io.flutter.app.** { *; } 3 | -keep class io.flutter.plugin.** { *; } 4 | -keep class io.flutter.util.** { *; } 5 | -keep class io.flutter.view.** { *; } 6 | -keep class io.flutter.** { *; } 7 | -keep class io.flutter.plugins.** { *; } -------------------------------------------------------------------------------- /android/app/release/app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/release/app-release.apk -------------------------------------------------------------------------------- /android/app/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1,"versionName":"1.0.0","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /android/app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/flutteruikit/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.flutteruikit; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | import android.view.WindowManager.LayoutParams; 7 | 8 | public class MainActivity extends FlutterActivity { 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | GeneratedPluginRegistrant.registerWith(this); 13 | getWindow().addFlags(LayoutParams.FLAG_SECURE); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 10 | 12 | 14 | 16 | 18 | 20 | 22 | 24 | 26 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | 54 | 56 | 58 | 60 | 62 | 64 | 66 | 68 | 70 | 72 | 74 | 75 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/ui_kit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/drawable/ui_kit.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #1C1C1C 4 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.1.2' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /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-4.4-all.zip 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/release/app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/android/release/app-release.apk -------------------------------------------------------------------------------- /android/release/output.json: -------------------------------------------------------------------------------- 1 | [{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":2,"versionName":"1.0.1","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release"},"path":"app-release.apk","properties":{}}] -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /assets/fonts/Quicksand-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/fonts/Quicksand-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/Quicksand_Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/fonts/Quicksand_Bold.otf -------------------------------------------------------------------------------- /assets/fonts/Quicksand_Book.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/fonts/Quicksand_Book.otf -------------------------------------------------------------------------------- /assets/fonts/Quicksand_Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/fonts/Quicksand_Light.otf -------------------------------------------------------------------------------- /assets/fonts/Raleway-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/fonts/Raleway-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/Raleway-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/fonts/Raleway-Regular.ttf -------------------------------------------------------------------------------- /assets/images/blank.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/images/blank.jpg -------------------------------------------------------------------------------- /assets/images/dashboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/images/dashboard.jpg -------------------------------------------------------------------------------- /assets/images/login.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/images/login.jpg -------------------------------------------------------------------------------- /assets/images/map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/images/map.png -------------------------------------------------------------------------------- /assets/images/payment.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/images/payment.jpg -------------------------------------------------------------------------------- /assets/images/pk.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/images/pk.jpg -------------------------------------------------------------------------------- /assets/images/profile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/images/profile.jpg -------------------------------------------------------------------------------- /assets/images/setting.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/images/setting.jpeg -------------------------------------------------------------------------------- /assets/images/shopping.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/images/shopping.jpeg -------------------------------------------------------------------------------- /assets/images/timeline.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/images/timeline.jpeg -------------------------------------------------------------------------------- /assets/images/verification.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/assets/images/verification.jpg -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | ## 1.0.1 2 | 3 | - 3 New Screens Added 4 | 5 | - Profile 2 6 | - Login 2 7 | - Payment Success 8 | 9 | - Minor Bug Fixes 10 | 11 | ## 1.0.0 12 | 13 | - Initial(Early) Release 14 | -------------------------------------------------------------------------------- /flutter_01.log: -------------------------------------------------------------------------------- 1 | Flutter crash report; please file at https://github.com/flutter/flutter/issues. 2 | 3 | ## command 4 | 5 | flutter packages get 6 | 7 | ## exception 8 | 9 | YamlException: Error on line 59, column 10: While parsing a block collection, expected '-'. 10 | style: normal 11 | ^ 12 | 13 | ``` 14 | #0 Parser._parseBlockSequenceEntry (package:yaml/src/parser.dart:376) 15 | #1 Parser._stateMachine (package:yaml/src/parser.dart:77) 16 | #2 Parser.parse (package:yaml/src/parser.dart:47) 17 | #3 Loader._loadSequence (package:yaml/src/loader.dart:142) 18 | #4 Loader._loadNode (package:yaml/src/loader.dart:84) 19 | #5 Loader._loadMapping (package:yaml/src/loader.dart:165) 20 | #6 Loader._loadNode (package:yaml/src/loader.dart:86) 21 | #7 Loader._loadSequence (package:yaml/src/loader.dart:141) 22 | #8 Loader._loadNode (package:yaml/src/loader.dart:84) 23 | #9 Loader._loadMapping (package:yaml/src/loader.dart:165) 24 | #10 Loader._loadNode (package:yaml/src/loader.dart:86) 25 | #11 Loader._loadMapping (package:yaml/src/loader.dart:165) 26 | #12 Loader._loadNode (package:yaml/src/loader.dart:86) 27 | #13 Loader._loadDocument (package:yaml/src/loader.dart:62) 28 | #14 Loader.load (package:yaml/src/loader.dart:54) 29 | #15 loadYamlDocument (package:yaml/yaml.dart:51) 30 | #16 loadYamlNode (package:yaml/yaml.dart:42) 31 | #17 loadYaml (package:yaml/yaml.dart:34) 32 | #18 _pluginFromPubspec (package:flutter_tools/src/plugins.dart:52) 33 | #19 _findPlugins. (package:flutter_tools/src/plugins.dart:75) 34 | #20 _HashVMBase&MapMixin&&_LinkedHashMapMixin.forEach (dart:collection-patch/dart:collection/compact_hash.dart:363) 35 | #21 _findPlugins (package:flutter_tools/src/plugins.dart:73) 36 | #22 injectPlugins (package:flutter_tools/src/plugins.dart:234) 37 | #23 FlutterProject.ensureReadyForPlatformSpecificTooling (package:flutter_tools/src/project.dart:62) 38 | 39 | #24 PackagesGetCommand.runCommand (package:flutter_tools/src/commands/packages.dart:85) 40 | 41 | #25 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:347) 42 | #26 _asyncThenWrapperHelper. (dart:async-patch/dart:async/async_patch.dart:77) 43 | #27 _rootRunUnary (dart:async/zone.dart:1134) 44 | #28 _CustomZone.runUnary (dart:async/zone.dart:1031) 45 | #29 _FutureListener.handleValue (dart:async/future_impl.dart:129) 46 | #30 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:638) 47 | #31 Future._propagateToListeners (dart:async/future_impl.dart:667) 48 | #32 Future._complete (dart:async/future_impl.dart:472) 49 | #33 _SyncCompleter.complete (dart:async/future_impl.dart:51) 50 | #34 _AsyncAwaitCompleter.complete. (dart:async-patch/dart:async/async_patch.dart:33) 51 | #35 _rootRun (dart:async/zone.dart:1126) 52 | #36 _CustomZone.run (dart:async/zone.dart:1023) 53 | #37 _CustomZone.bindCallback. (dart:async/zone.dart:949) 54 | #38 _microtaskLoop (dart:async/schedule_microtask.dart:41) 55 | #39 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50) 56 | #40 _runPendingImmediateCallback (dart:isolate-patch/dart:isolate/isolate_patch.dart:113) 57 | #41 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:166) 58 | ``` 59 | 60 | ## flutter doctor 61 | 62 | ``` 63 | [✓] Flutter (Channel master, v0.5.6-pre.39, on Mac OS X 10.13.5 17F77, locale en-IN) 64 | • Flutter version 0.5.6-pre.39 at /Users/pawankumar/Desktop/flutter/flutter 65 | • Framework revision a18f5e84a1 (2 days ago), 2018-06-20 20:23:51 -0400 66 | • Engine revision 549c855e89 67 | • Dart version 2.0.0-dev.63.0.flutter-4c9689c1d2 68 | 69 | [✓] Android toolchain - develop for Android devices (Android SDK 28.0.0-rc2) 70 | • Android SDK at /Users/pawankumar/Library/Android/sdk 71 | • Android NDK location not configured (optional; useful for native profiling support) 72 | • Platform android-28, build-tools 28.0.0-rc2 73 | • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java 74 | • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01) 75 | • All Android licenses accepted. 76 | 77 | [✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1) 78 | • Xcode at /Applications/Xcode.app/Contents/Developer 79 | • Xcode 9.4.1, Build version 9F2000 80 | • ios-deploy 1.9.2 81 | • CocoaPods version 1.5.2 82 | 83 | [✓] Android Studio 84 | • Android Studio at /Applications/Android Studio 3.2 Preview.app/Contents 85 | ✗ Flutter plugin not installed; this adds Flutter specific functionality. 86 | ✗ Dart plugin not installed; this adds Dart specific functionality. 87 | • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b02) 88 | 89 | [✓] Android Studio (version 3.1) 90 | • Android Studio at /Applications/Android Studio.app/Contents 91 | • Flutter plugin version 25.0.1 92 | • Dart plugin version 173.4700 93 | • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01) 94 | 95 | [✓] IntelliJ IDEA Ultimate Edition (version 2018.1.5) 96 | • IntelliJ at /Applications/IntelliJ IDEA.app 97 | • Flutter plugin version 25.0.2 98 | • Dart plugin version 181.4892.1 99 | 100 | [✓] Connected devices (1 available) 101 | • PK iPhone • 582f750ea2e93342895f4ce99785ede563d5461c • ios • iOS 11.4 102 | 103 | • No issues found! 104 | ``` 105 | -------------------------------------------------------------------------------- /flutter_uikit.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /flutter_uikit_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/app.flx 37 | /Flutter/app.zip 38 | /Flutter/flutter_assets/ 39 | /Flutter/App.framework 40 | /Flutter/Flutter.framework 41 | /Flutter/Generated.xcconfig 42 | /ServiceDefinitions.json 43 | 44 | Pods/ 45 | .symlinks/ 46 | -------------------------------------------------------------------------------- /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 | def parse_KV_file(file, separator='=') 8 | file_abs_path = File.expand_path(file) 9 | if !File.exists? file_abs_path 10 | return []; 11 | end 12 | pods_ary = [] 13 | skip_line_start_symbols = ["#", "/"] 14 | File.foreach(file_abs_path) { |line| 15 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 16 | plugin = line.split(pattern=separator) 17 | if plugin.length == 2 18 | podname = plugin[0].strip() 19 | path = plugin[1].strip() 20 | podpath = File.expand_path("#{path}", file_abs_path) 21 | pods_ary.push({:name => podname, :path => podpath}); 22 | else 23 | puts "Invalid plugin specification: #{line}" 24 | end 25 | } 26 | return pods_ary 27 | end 28 | 29 | target 'Runner' do 30 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 31 | # referring to absolute paths on developers' machines. 32 | system('rm -rf .symlinks') 33 | system('mkdir -p .symlinks/plugins') 34 | 35 | # Flutter Pods 36 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 37 | if generated_xcode_build_settings.empty? 38 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 39 | end 40 | generated_xcode_build_settings.map { |p| 41 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 42 | symlink = File.join('.symlinks', 'flutter') 43 | File.symlink(File.dirname(p[:path]), symlink) 44 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 45 | end 46 | } 47 | 48 | # Plugin Pods 49 | plugin_pods = parse_KV_file('../.flutter-plugins') 50 | plugin_pods.map { |p| 51 | symlink = File.join('.symlinks', 'plugins', p[:name]) 52 | File.symlink(p[:path], symlink) 53 | pod p[:name], :path => File.join(symlink, 'ios') 54 | } 55 | end 56 | 57 | post_install do |installer| 58 | installer.pods_project.targets.each do |target| 59 | target.build_configurations.each do |config| 60 | config.build_settings['ENABLE_BITCODE'] = 'NO' 61 | end 62 | end 63 | end 64 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - Flutter (from `.symlinks/flutter/ios`) 6 | 7 | EXTERNAL SOURCES: 8 | Flutter: 9 | :path: ".symlinks/flutter/ios" 10 | 11 | SPEC CHECKSUMS: 12 | Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a 13 | 14 | PODFILE CHECKSUM: 1e5af4103afd21ca5ead147d7b81d06f494f51a2 15 | 16 | COCOAPODS: 1.6.1 17 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/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 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | - (void)applicationWillResignActive:(UIApplication *)application{ 14 | self.window.hidden = YES; 15 | } 16 | 17 | - (void)applicationDidBecomeActive:(UIApplication *)application{ 18 | self.window.hidden = NO; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/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/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_uikit 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/di/dependency_injection.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_uikit/services/abstract/i_otp_service.dart'; 2 | import 'package:flutter_uikit/services/mock/mock_otp_service.dart'; 3 | import 'package:flutter_uikit/services/real/real_otp_service.dart'; 4 | import 'package:flutter_uikit/services/restclient.dart'; 5 | 6 | enum Flavor { MOCK, PRO } 7 | 8 | //Simple DI 9 | class Injector { 10 | static final Injector _singleton = new Injector._internal(); 11 | static Flavor _flavor; 12 | 13 | static void configure(Flavor flavor) async { 14 | _flavor = flavor; 15 | } 16 | 17 | factory Injector() => _singleton; 18 | 19 | Injector._internal(); 20 | 21 | IOTPService get otpService { 22 | switch (_flavor) { 23 | case Flavor.MOCK: 24 | return MockOTPService(); 25 | default: 26 | return OTPService(new RestClient()); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/inherited/login_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LoginProvider extends InheritedWidget { 4 | final Function validationErrorCallback; 5 | final Widget child; 6 | 7 | LoginProvider({this.validationErrorCallback, this.child}) 8 | : super(child: child); 9 | 10 | static LoginProvider of(BuildContext context) => 11 | context.inheritFromWidgetOfExactType(LoginProvider); 12 | 13 | @override 14 | bool updateShouldNotify(LoginProvider oldWidget) => 15 | validationErrorCallback != oldWidget.validationErrorCallback; 16 | } 17 | -------------------------------------------------------------------------------- /lib/inherited/product_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/logic/bloc/product_bloc.dart'; 3 | 4 | class ProductProvider extends InheritedWidget { 5 | final ProductBloc productBloc; 6 | final Widget child; 7 | 8 | ProductProvider({this.productBloc, this.child}) : super(child: child); 9 | 10 | static ProductProvider of(BuildContext context) => 11 | context.inheritFromWidgetOfExactType(ProductProvider); 12 | 13 | @override 14 | bool updateShouldNotify(ProductProvider oldWidget) => 15 | productBloc != oldWidget.productBloc; 16 | } 17 | -------------------------------------------------------------------------------- /lib/logic/bloc/cart_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter_uikit/logic/viewmodel/cart_view_model.dart'; 4 | import 'package:flutter_uikit/model/product.dart'; 5 | 6 | class CartBloc { 7 | CartViewModel _cartViewModel; 8 | final additionalController = StreamController(); 9 | final subtractionController = StreamController(); 10 | final countController = StreamController(); 11 | Sink get addItem => additionalController.sink; 12 | Sink get subtractItem => subtractionController.sink; 13 | Stream get getCount => countController.stream; 14 | 15 | CartBloc(Product p) { 16 | _cartViewModel = CartViewModel(product: p); 17 | additionalController.stream.listen(onAdd); 18 | subtractionController.stream.listen(onDelete); 19 | } 20 | 21 | void onAdd(bool done) { 22 | _cartViewModel.addQuantity(); 23 | countController.add(_cartViewModel.totalQuantity); 24 | } 25 | 26 | void onDelete(bool done) { 27 | _cartViewModel.deleteQuantity(); 28 | countController.add(_cartViewModel.totalQuantity); 29 | } 30 | 31 | void dispose() { 32 | additionalController?.close(); 33 | subtractionController?.close(); 34 | countController?.close(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/logic/bloc/credit_card_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | class CreditCardBloc { 4 | final ccInputController = StreamController(); 5 | final expInputController = StreamController(); 6 | final cvvInputController = StreamController(); 7 | final nameInputController = StreamController(); 8 | 9 | Sink get ccInputSink => ccInputController.sink; 10 | Sink get expInputSink => expInputController.sink; 11 | Sink get cvvInputSink => cvvInputController.sink; 12 | Sink get nameInputSink => nameInputController.sink; 13 | 14 | final ccOutputController = StreamController(); 15 | final expOutputController = StreamController(); 16 | final cvvOutputController = StreamController(); 17 | final nameOutputController = StreamController(); 18 | 19 | Stream get ccOutputStream => ccOutputController.stream; 20 | Stream get expOutputStream => expOutputController.stream; 21 | Stream get cvvOutputStream => cvvOutputController.stream; 22 | Stream get nameOutputStream => nameOutputController.stream; 23 | 24 | CreditCardBloc() { 25 | ccInputController.stream.listen(onCCInput); 26 | expInputController.stream.listen(onExpInput); 27 | cvvInputController.stream.listen(onCvvInput); 28 | nameInputController.stream.listen(onNameInput); 29 | } 30 | 31 | onCCInput(String input) { 32 | ccOutputController.add(input.toString()); 33 | } 34 | 35 | onExpInput(String input) { 36 | expOutputController.add(input); 37 | } 38 | 39 | onCvvInput(String input) { 40 | cvvOutputController.add(input); 41 | } 42 | 43 | onNameInput(String input) { 44 | nameOutputController.add(input); 45 | } 46 | 47 | void ccFormat(String s) { 48 | print(s); 49 | ccInputSink.add(s); 50 | } 51 | 52 | void dispose() { 53 | ccInputController?.close(); 54 | cvvInputController?.close(); 55 | expInputController?.close(); 56 | nameInputController?.close(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/logic/bloc/login_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter_uikit/logic/viewmodel/user_login_view_model.dart'; 3 | import 'package:flutter_uikit/model/fetch_process.dart'; 4 | import 'package:rxdart/rxdart.dart'; 5 | 6 | class LoginBloc { 7 | final otpController = StreamController(); 8 | final loginController = StreamController(); 9 | final apiController = BehaviorSubject(); 10 | final otpResendController = StreamController(); 11 | final otpResultController = BehaviorSubject(); 12 | Sink get otpSink => otpController.sink; 13 | Sink get loginSink => otpController.sink; 14 | Sink get resendOtpSink => otpResendController.sink; 15 | Stream get otpResult => otpResultController.stream; 16 | Stream get apiResult => apiController.stream; 17 | 18 | LoginBloc() { 19 | otpController.stream.listen(apiCall); 20 | otpResendController.stream.listen(resendOtp); 21 | loginController.stream.listen(apiCall); 22 | } 23 | 24 | void apiCall(UserLoginViewModel userLogin) async { 25 | FetchProcess process = new FetchProcess(loading: true); 26 | //for progress loading 27 | apiController.add(process); 28 | if (userLogin.otp == null) { 29 | process.type = ApiType.performOTP; 30 | await userLogin.getOtp(userLogin.phonenumber); 31 | otpResultController.add(userLogin.otpResult); 32 | } else { 33 | process.type = ApiType.performLogin; 34 | await userLogin.performLogin(userLogin); 35 | } 36 | 37 | process.loading = false; 38 | process.response = userLogin.apiResult; 39 | //for error dialog 40 | apiController.add(process); 41 | userLogin = null; 42 | } 43 | 44 | void resendOtp(bool flag) { 45 | otpResultController.add(false); 46 | } 47 | 48 | void dispose() { 49 | otpController.close(); 50 | otpResendController.close(); 51 | apiController.close(); 52 | otpResultController.close(); 53 | loginController.close(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/logic/bloc/menu_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter_uikit/logic/viewmodel/menu_view_model.dart'; 4 | import 'package:flutter_uikit/model/menu.dart'; 5 | 6 | class MenuBloc { 7 | final _menuVM = MenuViewModel(); 8 | final menuController = StreamController>(); 9 | 10 | Stream> get menuItems => menuController.stream; 11 | 12 | MenuBloc() { 13 | menuController.add(_menuVM.getMenuItems()); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/logic/bloc/post_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter_uikit/logic/viewmodel/post_view_model.dart'; 4 | import 'package:flutter_uikit/model/post.dart'; 5 | 6 | class PostBloc { 7 | final PostViewModel postViewModel = PostViewModel(); 8 | final postController = StreamController>(); 9 | final fabController = StreamController(); 10 | final fabVisibleController = StreamController(); 11 | Sink get fabSink => fabController.sink; 12 | Stream> get postItems => postController.stream; 13 | Stream get fabVisible => fabVisibleController.stream; 14 | 15 | PostBloc() { 16 | postController.add(postViewModel.getPosts()); 17 | fabController.stream.listen(onScroll); 18 | } 19 | onScroll(bool visible) { 20 | fabVisibleController.add(visible); 21 | } 22 | 23 | void dispose() { 24 | postController?.close(); 25 | fabController?.close(); 26 | fabVisibleController?.close(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/logic/bloc/product_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter_uikit/logic/viewmodel/product_view_model.dart'; 4 | import 'package:flutter_uikit/model/product.dart'; 5 | 6 | class ProductBloc { 7 | final ProductViewModel productViewModel = ProductViewModel(); 8 | final productController = StreamController>(); 9 | Stream> get productItems => productController.stream; 10 | 11 | ProductBloc() { 12 | productController.add(productViewModel.getProducts()); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/logic/viewmodel/cart_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_uikit/model/product.dart'; 2 | 3 | class CartViewModel { 4 | final Product product; 5 | int get totalQuantity => product.quantity; 6 | void addQuantity() => product.quantity < 10 ? product.quantity++ : null; 7 | void deleteQuantity() => product.quantity > 0 ? product.quantity-- : null; 8 | 9 | CartViewModel({this.product}); 10 | } 11 | -------------------------------------------------------------------------------- /lib/logic/viewmodel/menu_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/model/menu.dart'; 3 | import 'package:flutter_uikit/utils/uidata.dart'; 4 | 5 | class MenuViewModel { 6 | List menuItems; 7 | 8 | MenuViewModel({this.menuItems}); 9 | 10 | getMenuItems() { 11 | return menuItems = [ 12 | Menu( 13 | title: "Profile", 14 | menuColor: Color(0xff050505), 15 | icon: Icons.person, 16 | image: UIData.profileImage, 17 | items: ["View Profile", "Profile 2", "Profile 3", "Profile 4"]), 18 | Menu( 19 | title: "Shopping", 20 | menuColor: Color(0xffc8c4bd), 21 | icon: Icons.shopping_cart, 22 | image: UIData.shoppingImage, 23 | items: [ 24 | "Shopping List", 25 | "Shopping Details", 26 | "Product Details", 27 | "Shopping 4" 28 | ]), 29 | Menu( 30 | title: "Login", 31 | menuColor: Color(0xffc7d8f4), 32 | icon: Icons.send, 33 | image: UIData.loginImage, 34 | items: ["Login With OTP", "Login 2", "Sign Up", "Login 4"]), 35 | Menu( 36 | title: "Timeline", 37 | menuColor: Color(0xff7f5741), 38 | icon: Icons.timeline, 39 | image: UIData.timelineImage, 40 | items: ["Feed", "Tweets", "Timeline 3", "Timeline 4"]), 41 | Menu( 42 | title: "Dashboard", 43 | menuColor: Color(0xff261d33), 44 | icon: Icons.dashboard, 45 | image: UIData.dashboardImage, 46 | items: ["Dashboard 1", "Dashboard 2", "Dashboard 3", "Dashboard 4"]), 47 | Menu( 48 | title: "Settings", 49 | menuColor: Color(0xff2a8ccf), 50 | icon: Icons.settings, 51 | image: UIData.settingsImage, 52 | items: ["Device Settings", "Settings 2", "Settings 3", "Settings 4"]), 53 | Menu( 54 | title: "No Item", 55 | menuColor: Color(0xffe19b6b), 56 | icon: Icons.not_interested, 57 | image: UIData.blankImage, 58 | items: ["No Search Result", "No Internet", "No Item 3", "No Item 4"]), 59 | Menu( 60 | title: "Payment", 61 | menuColor: Color(0xffddcec2), 62 | icon: Icons.payment, 63 | image: UIData.paymentImage, 64 | items: ["Credit Card", "Payment Success", "Payment 3", "Payment 4"]), 65 | ]; 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /lib/logic/viewmodel/post_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_uikit/model/post.dart'; 2 | 3 | class PostViewModel { 4 | List postItems; 5 | 6 | PostViewModel({this.postItems}); 7 | 8 | getPosts() => [ 9 | Post( 10 | personName: "Pawan", 11 | address: "New Delhi, India", 12 | likesCount: 100, 13 | commentsCount: 10, 14 | message: 15 | "Google Developer Expert for Flutter. Passionate #Flutter, #Android Developer. #Entrepreneur #YouTuber", 16 | personImage: 17 | "https://avatars0.githubusercontent.com/u/12619420?s=460&v=4", 18 | messageImage: 19 | "https://cdn.pixabay.com/photo/2018/03/09/16/32/woman-3211957_1280.jpg", 20 | postTime: "Just Now"), 21 | Post( 22 | personName: "Amanda", 23 | address: "Canada", 24 | likesCount: 123, 25 | commentsCount: 78, 26 | messageImage: 27 | "https://cdn.pixabay.com/photo/2016/04/10/21/34/woman-1320810_960_720.jpg", 28 | message: 29 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s", 30 | personImage: 31 | "https://cdn.pixabay.com/photo/2016/04/10/21/34/woman-1320810_960_720.jpg", 32 | postTime: "5h ago"), 33 | Post( 34 | personName: "Eric", 35 | address: "California", 36 | likesCount: 50, 37 | commentsCount: 5, 38 | message: 39 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s", 40 | personImage: 41 | "https://cdn.pixabay.com/photo/2013/07/18/20/24/brad-pitt-164880_960_720.jpg", 42 | postTime: "2h ago"), 43 | Post( 44 | personName: "Jack", 45 | address: "California", 46 | likesCount: 23, 47 | commentsCount: 4, 48 | messageImage: 49 | "https://cdn.pixabay.com/photo/2014/09/07/16/53/hands-437968_960_720.jpg", 50 | message: 51 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s", 52 | personImage: 53 | "https://cdn.pixabay.com/photo/2016/04/01/09/51/actor-1299629_960_720.png", 54 | postTime: "3h ago"), 55 | Post( 56 | personName: "Neha", 57 | address: "Punjab", 58 | likesCount: 35, 59 | commentsCount: 2, 60 | messageImage: 61 | "https://cdn.pixabay.com/photo/2015/11/26/00/14/fashion-1063100_960_720.jpg", 62 | message: 63 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s", 64 | personImage: 65 | "https://cdn.pixabay.com/photo/2015/11/26/00/14/fashion-1063100_960_720.jpg", 66 | postTime: "1d ago"), 67 | Post( 68 | personName: "Pawan", 69 | address: "New Delhi, India", 70 | likesCount: 100, 71 | commentsCount: 10, 72 | message: 73 | "Google Developer Expert for Flutter. Passionate #Flutter, #Android Developer. #Entrepreneur #YouTuber", 74 | personImage: 75 | "https://avatars0.githubusercontent.com/u/12619420?s=460&v=4", 76 | messageImage: 77 | "https://cdn.pixabay.com/photo/2018/03/09/16/32/woman-3211957_1280.jpg", 78 | postTime: "Just Now"), 79 | Post( 80 | personName: "Eric", 81 | address: "California", 82 | likesCount: 50, 83 | commentsCount: 5, 84 | message: 85 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s", 86 | personImage: 87 | "https://cdn.pixabay.com/photo/2013/07/18/20/24/brad-pitt-164880_960_720.jpg", 88 | postTime: "2h ago"), 89 | Post( 90 | personName: "Jack", 91 | address: "California", 92 | likesCount: 23, 93 | commentsCount: 4, 94 | messageImage: 95 | "https://cdn.pixabay.com/photo/2014/09/07/16/53/hands-437968_960_720.jpg", 96 | message: 97 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s", 98 | personImage: 99 | "https://cdn.pixabay.com/photo/2016/04/01/09/51/actor-1299629_960_720.png", 100 | postTime: "3h ago"), 101 | Post( 102 | personName: "Amanda", 103 | address: "Canada", 104 | likesCount: 123, 105 | commentsCount: 78, 106 | messageImage: 107 | "https://cdn.pixabay.com/photo/2016/04/10/21/34/woman-1320810_960_720.jpg", 108 | message: 109 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s", 110 | personImage: 111 | "https://cdn.pixabay.com/photo/2016/04/10/21/34/woman-1320810_960_720.jpg", 112 | postTime: "5h ago"), 113 | Post( 114 | personName: "Neha", 115 | address: "Punjab", 116 | likesCount: 35, 117 | commentsCount: 2, 118 | messageImage: 119 | "https://cdn.pixabay.com/photo/2015/11/26/00/14/fashion-1063100_960_720.jpg", 120 | message: 121 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s", 122 | personImage: 123 | "https://cdn.pixabay.com/photo/2015/11/26/00/14/fashion-1063100_960_720.jpg", 124 | postTime: "1d ago"), 125 | ]; 126 | } 127 | -------------------------------------------------------------------------------- /lib/logic/viewmodel/product_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/model/product.dart'; 3 | 4 | class ProductViewModel { 5 | 6 | List productsItems; 7 | 8 | ProductViewModel({this.productsItems}); 9 | 10 | getProducts() => [ 11 | Product( 12 | brand: "Levis", 13 | description: "Print T-shirt", 14 | image: 15 | "https://mosaic02.ztat.net/vgs/media/pdp-zoom/LE/22/1D/02/2A/12/LE221D022-A12@16.1.jpg", 16 | name: "THE PERFECT", 17 | price: "£19.99", 18 | rating: 4.0, 19 | colors: [ 20 | ProductColor( 21 | color: Colors.red, 22 | colorName: "Red", 23 | ), 24 | ProductColor( 25 | color: Colors.green, 26 | colorName: "Green", 27 | ), 28 | ProductColor( 29 | color: Colors.blue, 30 | colorName: "Blue", 31 | ), 32 | ProductColor( 33 | color: Colors.cyan, 34 | colorName: "Cyan", 35 | ) 36 | ], 37 | quantity: 0, 38 | sizes: ["S", "M", "L", "XL"], 39 | totalReviews: 170), 40 | Product( 41 | brand: "adidas Performance", 42 | description: "Pool sliders", 43 | image: 44 | "https://mosaic02.ztat.net/vgs/media/catalog-lg/AD/58/1D/00/9Q/12/AD581D009-Q12@13.jpg", 45 | name: "AQUALETTE", 46 | price: "£13.49", 47 | rating: 5.0, 48 | totalReviews: 10), 49 | Product( 50 | brand: "Produkt", 51 | description: "Men's Shirt", 52 | image: 53 | "https://mosaic01.ztat.net/vgs/media/pdp-zoom/PY/52/2D/01/FG/11/PY522D01F-G11@8.jpg", 54 | name: "ROBI CHECK", 55 | price: "£16.49", 56 | rating: 4.5, 57 | totalReviews: 0), 58 | Product( 59 | brand: "adidas Originals", 60 | description: "Hoodie", 61 | image: 62 | "https://mosaic01.ztat.net/vgs/media/pdp-zoom/AD/12/2S/07/QN/11/AD122S07Q-N11@8.jpg", 63 | name: "TREF OVER HOOD", 64 | price: "£34.99", 65 | rating: 4.0, 66 | totalReviews: 5), 67 | Product( 68 | brand: "ION", 69 | description: "Hydration rucksack", 70 | image: 71 | "https://mosaic01.ztat.net/vgs/media/packshot/pdp-zoom/N1/94/4E/00/4G/11/N1944E004-G11@10.jpg", 72 | name: "BACKPACK VILLAIN 4", 73 | price: "£55.99", 74 | rating: 4.8, 75 | totalReviews: 12), 76 | Product( 77 | brand: "Diesel", 78 | description: "Straight leg jeans", 79 | image: 80 | "https://mosaic01.ztat.net/vgs/media/pdp-gallery/DI/12/2G/0H/5K/11/DI122G0H5-K11@10.jpg", 81 | name: "THYTAN", 82 | price: "£83.99", 83 | rating: 4.2, 84 | totalReviews: 28), 85 | Product( 86 | brand: "YOURTURN", 87 | description: "Watch in budget", 88 | image: 89 | "https://mosaic02.ztat.net/vgs/media/packshot/pdp-zoom/YO/15/2M/00/6Q/11/YO152M006-Q11@6.jpg", 90 | name: "Watch", 91 | price: "£11.99", 92 | rating: 4.7, 93 | totalReviews: 120), 94 | Product( 95 | brand: "Vero Moda", 96 | description: "Day dress - black/off", 97 | image: 98 | "https://mosaic01.ztat.net/vgs/media/pdp-zoom/VE/12/1C/1B/RQ/11/VE121C1BR-Q11@15.jpg", 99 | name: "VMKANA", 100 | price: "£26.59", 101 | rating: 4.0, 102 | totalReviews: 33), 103 | Product( 104 | brand: "ONLY", 105 | description: "A-line skirt", 106 | image: 107 | "https://mosaic01.ztat.net/vgs/media/pdp-zoom/ON/32/1B/0B/JG/11/ON321B0BJ-G11@8.jpg", 108 | name: "ONLTHAI FRILL", 109 | price: "£25.59", 110 | rating: 4.4, 111 | totalReviews: 44), 112 | Product( 113 | brand: "MAI PIÙ SENZA", 114 | description: "Awesome Heels", 115 | image: 116 | "https://mosaic01.ztat.net/vgs/media/pdp-zoom/M6/61/1B/02/9A/11/M6611B029-A11@13.jpg", 117 | name: "HIGH HEELS", 118 | price: "£59.99", 119 | rating: 4.1, 120 | totalReviews: 22), 121 | ]; 122 | } 123 | -------------------------------------------------------------------------------- /lib/logic/viewmodel/user_login_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter_uikit/di/dependency_injection.dart'; 4 | import 'package:flutter_uikit/model/login.dart'; 5 | import 'package:flutter_uikit/model/otp.dart'; 6 | import 'package:flutter_uikit/services/abstract/i_otp_service.dart'; 7 | import 'package:flutter_uikit/services/network_service_response.dart'; 8 | import 'package:meta/meta.dart'; 9 | 10 | class UserLoginViewModel { 11 | String phonenumber; 12 | String otp; 13 | bool otpResult = false; 14 | NetworkServiceResponse apiResult; 15 | IOTPService otpRepo = new Injector().otpService; 16 | 17 | //for otp 18 | UserLoginViewModel({@required this.phonenumber}); 19 | 20 | //for login 21 | UserLoginViewModel.withOTP({@required this.phonenumber, @required this.otp}); 22 | 23 | Future getOtp(String phoneNumber) async { 24 | NetworkServiceResponse result = 25 | await otpRepo.createOTP(phoneNumber); 26 | this.otpResult = result.success; 27 | this.apiResult = result; 28 | } 29 | 30 | Future performLogin(UserLoginViewModel userLogin) async { 31 | NetworkServiceResponse result = 32 | await otpRepo.fetchOTPLoginResponse( 33 | Login(phonenumber: userLogin.phonenumber, otp: userLogin.otp)); 34 | this.apiResult = result; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/di/dependency_injection.dart'; 3 | import 'package:flutter_uikit/myapp.dart'; 4 | 5 | void main() { 6 | // SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); 7 | Injector.configure(Flavor.MOCK); 8 | runApp(MyApp()); 9 | } 10 | -------------------------------------------------------------------------------- /lib/model/fetch_process.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_uikit/services/network_service_response.dart'; 2 | 3 | enum ApiType { performOTP, performLogin, getProductInfo } 4 | 5 | class FetchProcess { 6 | ApiType type; 7 | bool loading; 8 | NetworkServiceResponse response; 9 | 10 | FetchProcess({this.loading, this.response, this.type}); 11 | } 12 | -------------------------------------------------------------------------------- /lib/model/login.dart: -------------------------------------------------------------------------------- 1 | class Login { 2 | String phonenumber; 3 | String otp; 4 | 5 | Login({this.phonenumber, this.otp}); 6 | 7 | Map toJson() => { 8 | 'phonenumber': phonenumber, 9 | 'otp': otp, 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /lib/model/menu.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Menu { 4 | String title; 5 | IconData icon; 6 | String image; 7 | List items; 8 | BuildContext context; 9 | Color menuColor; 10 | 11 | Menu( 12 | {this.title, 13 | this.icon, 14 | this.image, 15 | this.items, 16 | this.context, 17 | this.menuColor = Colors.black}); 18 | } 19 | -------------------------------------------------------------------------------- /lib/model/otp.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CreateOTPResponse { 4 | String status; 5 | CreateOTPResponse({this.status}); 6 | 7 | CreateOTPResponse.fromJson(Map json) 8 | : status = json['status']; 9 | } 10 | 11 | class OTPResponse { 12 | String status; 13 | OTPData data; 14 | OTPResponse({this.status, this.data}); 15 | 16 | OTPResponse.fromJson(Map json) 17 | : status = json['status'], 18 | data = OTPData.fromJson(json['data']); 19 | } 20 | 21 | class OTPData { 22 | final String authToken; 23 | final String userId; 24 | const OTPData({@required this.authToken, @required this.userId}); 25 | 26 | OTPData.fromJson(Map json) 27 | : authToken = json['authToken'], 28 | userId = json['userId']; 29 | } 30 | -------------------------------------------------------------------------------- /lib/model/post.dart: -------------------------------------------------------------------------------- 1 | class Post { 2 | String personName; 3 | String personImage; 4 | String address; 5 | String message; 6 | String messageImage; 7 | int likesCount; 8 | int commentsCount; 9 | String postTime; 10 | List photos; 11 | 12 | Post( 13 | {this.personName, 14 | this.personImage, 15 | this.address, 16 | this.message, 17 | this.commentsCount, 18 | this.likesCount, 19 | this.messageImage, 20 | this.postTime, 21 | this.photos}); 22 | } 23 | -------------------------------------------------------------------------------- /lib/model/product.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Product { 4 | String name; 5 | String image; 6 | double rating; 7 | String price; 8 | String brand; 9 | String description; 10 | int totalReviews; 11 | List sizes; 12 | List colors; 13 | int quantity = 0; 14 | 15 | 16 | 17 | Product( 18 | {this.name, 19 | this.image, 20 | this.brand, 21 | this.price, 22 | this.rating, 23 | this.description, 24 | this.totalReviews, 25 | this.sizes, 26 | this.colors, 27 | this.quantity}); 28 | 29 | 30 | } 31 | 32 | class ProductColor { 33 | final String colorName; 34 | final MaterialColor color; 35 | 36 | ProductColor({this.colorName, this.color}); 37 | } 38 | -------------------------------------------------------------------------------- /lib/myapp.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_localizations/flutter_localizations.dart'; 3 | import 'package:flutter_uikit/ui/page/dashboard/dashboard_one.page.dart'; 4 | import 'package:flutter_uikit/ui/page/dashboard/dashboard_two_page.dart'; 5 | import 'package:flutter_uikit/ui/page/home_page.dart'; 6 | import 'package:flutter_uikit/ui/page/login/login_page.dart'; 7 | import 'package:flutter_uikit/ui/page/login/login_two_page.dart'; 8 | import 'package:flutter_uikit/ui/page/notfound/notfound_page.dart'; 9 | import 'package:flutter_uikit/ui/page/payment/credit_card_page.dart'; 10 | import 'package:flutter_uikit/ui/page/payment/payment_success_page.dart'; 11 | import 'package:flutter_uikit/ui/page/profile/profile_one_page.dart'; 12 | import 'package:flutter_uikit/ui/page/profile/profile_two_page.dart'; 13 | import 'package:flutter_uikit/ui/page/settings/settings_one_page.dart'; 14 | import 'package:flutter_uikit/ui/page/shopping/product_detail_page.dart'; 15 | import 'package:flutter_uikit/ui/page/shopping/shopping_details_page.dart'; 16 | import 'package:flutter_uikit/ui/page/shopping/shopping_one_page.dart'; 17 | import 'package:flutter_uikit/ui/page/timeline/timeline_one_page.dart'; 18 | import 'package:flutter_uikit/ui/page/timeline/timeline_two_page.dart'; 19 | import 'package:flutter_uikit/utils/translations.dart'; 20 | import 'package:flutter_uikit/utils/uidata.dart'; 21 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 22 | 23 | class MyApp extends StatelessWidget { 24 | final materialApp = MaterialApp( 25 | title: UIData.appName, 26 | theme: ThemeData( 27 | primaryColor: Colors.black, 28 | fontFamily: UIData.quickFont, 29 | primarySwatch: Colors.amber), 30 | debugShowCheckedModeBanner: false, 31 | showPerformanceOverlay: false, 32 | home: HomePage(), 33 | localizationsDelegates: [ 34 | const TranslationsDelegate(), 35 | GlobalMaterialLocalizations.delegate, 36 | GlobalWidgetsLocalizations.delegate, 37 | ], 38 | supportedLocales: [ 39 | const Locale("en", "US"), 40 | const Locale("hi", "IN"), 41 | ], 42 | // initialRoute: UIData.notFoundRoute, 43 | 44 | //routes 45 | routes: { 46 | UIData.homeRoute: (BuildContext context) => HomePage(), 47 | UIData.profileOneRoute: (BuildContext context) => ProfileOnePage(), 48 | UIData.profileTwoRoute: (BuildContext context) => ProfileTwoPage(), 49 | UIData.timelineOneRoute: (BuildContext context) => TimelineOnePage(), 50 | UIData.timelineTwoRoute: (BuildContext context) => TimelineTwoPage(), 51 | UIData.notFoundRoute: (BuildContext context) => NotFoundPage(), 52 | UIData.settingsOneRoute: (BuildContext context) => SettingsOnePage(), 53 | UIData.shoppingOneRoute: (BuildContext context) => ShoppingOnePage(), 54 | UIData.shoppingTwoRoute: (BuildContext context) => 55 | ShoppingDetailsPage(), 56 | UIData.shoppingThreeRoute: (BuildContext context) => 57 | ProductDetailPage(), 58 | UIData.loginOneRoute: (BuildContext context) => LoginPage(), 59 | UIData.loginTwoRoute: (BuildContext context) => LoginTwoPage(), 60 | UIData.paymentOneRoute: (BuildContext context) => CreditCardPage(), 61 | UIData.paymentTwoRoute: (BuildContext context) => PaymentSuccessPage(), 62 | UIData.dashboardOneRoute: (BuildContext context) => DashboardOnePage(), 63 | UIData.dashboardTwoRoute: (BuildContext context) => DashboardTwoPage(), 64 | }, 65 | onUnknownRoute: (RouteSettings rs) => new MaterialPageRoute( 66 | builder: (context) => new NotFoundPage( 67 | appTitle: UIData.coming_soon, 68 | icon: FontAwesomeIcons.solidSmile, 69 | title: UIData.coming_soon, 70 | message: "Under Development", 71 | iconColor: Colors.green, 72 | ))); 73 | 74 | @override 75 | Widget build(BuildContext context) { 76 | return materialApp; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /lib/services/abstract/i_otp_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter_uikit/model/login.dart'; 4 | import 'package:flutter_uikit/model/otp.dart'; 5 | import 'package:flutter_uikit/services/network_service_response.dart'; 6 | 7 | abstract class IOTPService { 8 | Future> createOTP( 9 | String phoneNumber); 10 | Future> fetchOTPLoginResponse( 11 | Login userLogin); 12 | } 13 | -------------------------------------------------------------------------------- /lib/services/fetch_exception.dart: -------------------------------------------------------------------------------- 1 | class FetchDataException implements Exception { 2 | String message; 3 | FetchDataException(this.message); 4 | 5 | @override 6 | String toString() { 7 | // TODO: implement toString 8 | return "Exception: $message"; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/services/mock/mock_otp_service.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'dart:async'; 3 | 4 | import 'package:flutter_uikit/model/login.dart'; 5 | import 'package:flutter_uikit/model/otp.dart'; 6 | import 'package:flutter_uikit/services/abstract/i_otp_service.dart'; 7 | import 'package:flutter_uikit/services/network_service_response.dart'; 8 | import 'package:flutter_uikit/utils/uidata.dart'; 9 | 10 | class MockOTPService implements IOTPService { 11 | @override 12 | Future> createOTP( 13 | String phoneNumber) async { 14 | await Future.delayed(Duration(seconds: 2)); 15 | return Future.value(NetworkServiceResponse( 16 | success: true, 17 | content: null, 18 | )); 19 | } 20 | 21 | @override 22 | Future> fetchOTPLoginResponse( 23 | Login userLogin) async { 24 | await Future.delayed(Duration(seconds: 2)); 25 | return Future.value(NetworkServiceResponse( 26 | success: true, 27 | content: kOTPResponse, 28 | message: UIData.something_went_wrong)); 29 | } 30 | } 31 | 32 | var kOTPResponse = new OTPResponse( 33 | data: const OTPData(authToken: "abcd", userId: "1245"), status: "success"); 34 | -------------------------------------------------------------------------------- /lib/services/network_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_uikit/services/restclient.dart'; 2 | 3 | abstract class NetworkService { 4 | RestClient rest; 5 | NetworkService(this.rest); 6 | } 7 | -------------------------------------------------------------------------------- /lib/services/network_service_response.dart: -------------------------------------------------------------------------------- 1 | class NetworkServiceResponse { 2 | T content; 3 | bool success; 4 | String message; 5 | 6 | NetworkServiceResponse({this.content, this.success, this.message}); 7 | } 8 | 9 | class MappedNetworkServiceResponse { 10 | dynamic mappedResult; 11 | NetworkServiceResponse networkServiceResponse; 12 | MappedNetworkServiceResponse( 13 | {this.mappedResult, this.networkServiceResponse}); 14 | } 15 | -------------------------------------------------------------------------------- /lib/services/real/real_otp_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter_uikit/model/login.dart'; 4 | import 'package:flutter_uikit/model/otp.dart'; 5 | import 'package:flutter_uikit/services/abstract/i_otp_service.dart'; 6 | import 'package:flutter_uikit/services/network_service.dart'; 7 | import 'package:flutter_uikit/services/network_service_response.dart'; 8 | import 'package:flutter_uikit/services/restclient.dart'; 9 | 10 | class OTPService extends NetworkService implements IOTPService { 11 | static const _kCreateOtpUrl = "/createOtpForUser/{1}"; 12 | static const _kUserOtpLogin = "/userotplogin"; 13 | 14 | OTPService(RestClient rest) : super(rest); 15 | 16 | @override 17 | Future> createOTP( 18 | String phoneNumber) async { 19 | var result = await rest.getAsync( 20 | Uri.parse(_kCreateOtpUrl.replaceFirst("{1}", phoneNumber)).toString()); 21 | if (result.mappedResult != null) { 22 | var res = CreateOTPResponse.fromJson(result.mappedResult); 23 | return new NetworkServiceResponse( 24 | content: res, 25 | success: result.networkServiceResponse.success, 26 | ); 27 | } 28 | return new NetworkServiceResponse( 29 | success: result.networkServiceResponse.success, 30 | message: result.networkServiceResponse.message); 31 | } 32 | 33 | @override 34 | Future> fetchOTPLoginResponse( 35 | Login userLogin) async { 36 | var result = await rest.postAsync(_kUserOtpLogin, userLogin); 37 | 38 | if (result.mappedResult != null) { 39 | var res = OTPResponse.fromJson(result.mappedResult); 40 | return new NetworkServiceResponse( 41 | content: res, 42 | success: result.networkServiceResponse.success, 43 | ); 44 | } 45 | return new NetworkServiceResponse( 46 | success: result.networkServiceResponse.success, 47 | message: result.networkServiceResponse.message); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/services/restclient.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | import 'package:flutter_uikit/services/network_service_response.dart'; 4 | import 'package:http/http.dart' as http; 5 | 6 | class RestClient { 7 | Map headers = { 8 | "CONTENT_TYPE": 'application/json', 9 | "ACCEPT": 'application/json', 10 | }; 11 | 12 | Future> getAsync( 13 | String resourcePath) async { 14 | var response = await http.get(resourcePath); 15 | return processResponse(response); 16 | } 17 | 18 | Future> postAsync( 19 | String resourcePath, dynamic data) async { 20 | var content = json.encoder.convert(data); 21 | var response = 22 | await http.post(resourcePath, body: content, headers: headers); 23 | return processResponse(response); 24 | } 25 | 26 | MappedNetworkServiceResponse processResponse(http.Response response) { 27 | if (!((response.statusCode < 200) || 28 | (response.statusCode >= 300) || 29 | (response.body == null))) { 30 | var jsonResult = response.body; 31 | dynamic resultClass = jsonDecode(jsonResult); 32 | 33 | return new MappedNetworkServiceResponse( 34 | mappedResult: resultClass, 35 | networkServiceResponse: new NetworkServiceResponse(success: true)); 36 | } else { 37 | var errorResponse = response.body; 38 | return new MappedNetworkServiceResponse( 39 | networkServiceResponse: new NetworkServiceResponse( 40 | success: false, 41 | message: "(${response.statusCode}) ${errorResponse.toString()}")); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/ui/page/dashboard/dashboard_one/dashboard_menu_row.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/ui/widgets/label_below_icon.dart'; 3 | 4 | class DashboardMenuRow extends StatelessWidget { 5 | final firstLabel; 6 | final IconData firstIcon; 7 | final firstIconCircleColor; 8 | final secondLabel; 9 | final IconData secondIcon; 10 | final secondIconCircleColor; 11 | final thirdLabel; 12 | final IconData thirdIcon; 13 | final thirdIconCircleColor; 14 | final fourthLabel; 15 | final IconData fourthIcon; 16 | final fourthIconCircleColor; 17 | 18 | const DashboardMenuRow( 19 | {Key key, 20 | this.firstLabel, 21 | this.firstIcon, 22 | this.firstIconCircleColor, 23 | this.secondLabel, 24 | this.secondIcon, 25 | this.secondIconCircleColor, 26 | this.thirdLabel, 27 | this.thirdIcon, 28 | this.thirdIconCircleColor, 29 | this.fourthLabel, 30 | this.fourthIcon, 31 | this.fourthIconCircleColor}) 32 | : super(key: key); 33 | @override 34 | Widget build(BuildContext context) { 35 | return Padding( 36 | padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 15.0), 37 | child: Row( 38 | mainAxisAlignment: MainAxisAlignment.spaceAround, 39 | mainAxisSize: MainAxisSize.max, 40 | children: [ 41 | LabelBelowIcon( 42 | icon: firstIcon, 43 | label: firstLabel, 44 | circleColor: firstIconCircleColor, 45 | ), 46 | LabelBelowIcon( 47 | icon: secondIcon, 48 | label: secondLabel, 49 | circleColor: secondIconCircleColor, 50 | ), 51 | LabelBelowIcon( 52 | icon: thirdIcon, 53 | label: thirdLabel, 54 | circleColor: thirdIconCircleColor, 55 | ), 56 | LabelBelowIcon( 57 | icon: fourthIcon, 58 | label: fourthLabel, 59 | circleColor: fourthIconCircleColor, 60 | ), 61 | ], 62 | ), 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/ui/page/dashboard/dashboard_two/dashboard_menu_row_two.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/ui/widgets/label_below_icon.dart'; 3 | 4 | class DashboardMenuRowTwo extends StatelessWidget { 5 | final firstLabel; 6 | final IconData firstIcon; 7 | final secondLabel; 8 | final IconData secondIcon; 9 | final thirdLabel; 10 | final IconData thirdIcon; 11 | 12 | const DashboardMenuRowTwo({ 13 | Key key, 14 | this.firstLabel, 15 | this.firstIcon, 16 | this.secondLabel, 17 | this.secondIcon, 18 | this.thirdLabel, 19 | this.thirdIcon, 20 | }) : super(key: key); 21 | @override 22 | Widget build(BuildContext context) { 23 | Size deviceSize = MediaQuery.of(context).size; 24 | return Padding( 25 | padding: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 2.0), 26 | child: Row( 27 | mainAxisSize: MainAxisSize.max, 28 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 29 | crossAxisAlignment: CrossAxisAlignment.center, 30 | children: [ 31 | SizedBox.fromSize( 32 | size: Size.square(deviceSize.width / 3.3), 33 | child: Card( 34 | color: Colors.grey.shade300, 35 | child: LabelBelowIcon( 36 | betweenHeight: 15.0, 37 | icon: firstIcon, 38 | label: firstLabel, 39 | iconColor: Colors.indigo.shade800, 40 | isCircleEnabled: false, 41 | ), 42 | ), 43 | ), 44 | SizedBox.fromSize( 45 | size: Size.square(deviceSize.width / 3.3), 46 | child: Card( 47 | color: Colors.grey.shade300, 48 | child: LabelBelowIcon( 49 | betweenHeight: 15.0, 50 | icon: secondIcon, 51 | label: secondLabel, 52 | iconColor: Colors.indigo.shade800, 53 | isCircleEnabled: false, 54 | ), 55 | ), 56 | ), 57 | SizedBox.fromSize( 58 | size: Size.square(deviceSize.width / 3.3), 59 | child: Card( 60 | color: Colors.grey.shade300, 61 | child: LabelBelowIcon( 62 | betweenHeight: 15.0, 63 | icon: thirdIcon, 64 | label: thirdLabel, 65 | iconColor: Colors.indigo.shade800, 66 | isCircleEnabled: false, 67 | ), 68 | ), 69 | ), 70 | ], 71 | ), 72 | ); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/ui/page/dashboard/dashboard_two_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/ui/page/dashboard/dashboard_two/dashboard_menu_row_two.dart'; 3 | import 'package:flutter_uikit/ui/widgets/common_scaffold.dart'; 4 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 5 | 6 | class DashboardTwoPage extends StatelessWidget { 7 | Widget bodyData() => SingleChildScrollView( 8 | child: Padding( 9 | padding: const EdgeInsets.all(8.0), 10 | child: Column( 11 | children: [ 12 | Padding( 13 | padding: const EdgeInsets.all(8.0), 14 | child: Center( 15 | child: Text( 16 | "Pay Your Bills", 17 | style: 18 | TextStyle(fontWeight: FontWeight.w700, fontSize: 20.0), 19 | ), 20 | ), 21 | ), 22 | SizedBox( 23 | height: 10.0, 24 | ), 25 | DashboardMenuRowTwo( 26 | firstIcon: FontAwesomeIcons.bolt, 27 | firstLabel: "ELECTRICITY", 28 | secondIcon: FontAwesomeIcons.tint, 29 | secondLabel: "WATER", 30 | thirdIcon: FontAwesomeIcons.mobile, 31 | thirdLabel: "MOBILE", 32 | ), 33 | DashboardMenuRowTwo( 34 | firstIcon: Icons.phone, 35 | firstLabel: "LANDLINE", 36 | secondIcon: FontAwesomeIcons.tv, 37 | secondLabel: "CABLE TV", 38 | thirdIcon: FontAwesomeIcons.chrome, 39 | thirdLabel: "INTERNET", 40 | ), 41 | SizedBox( 42 | height: 10.0, 43 | ), 44 | Padding( 45 | padding: const EdgeInsets.all(8.0), 46 | child: Center( 47 | child: Text( 48 | "Purchase Tickets", 49 | style: 50 | TextStyle(fontWeight: FontWeight.w700, fontSize: 20.0), 51 | ), 52 | ), 53 | ), 54 | DashboardMenuRowTwo( 55 | firstIcon: FontAwesomeIcons.film, 56 | firstLabel: "MOVIE", 57 | secondIcon: FontAwesomeIcons.calendarAlt, 58 | secondLabel: "EVENT", 59 | thirdIcon: FontAwesomeIcons.footballBall, 60 | thirdLabel: "SPORT", 61 | ), 62 | ], 63 | ), 64 | ), 65 | ); 66 | 67 | @override 68 | Widget build(BuildContext context) { 69 | return CommonScaffold( 70 | appTitle: "Pay", 71 | showFAB: false, 72 | bodyData: bodyData(), 73 | ); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /lib/ui/page/login/login_one/login_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/ui/page/login/login_one/login_card.dart'; 3 | 4 | class LoginWidgets extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Center( 8 | child: SingleChildScrollView( 9 | child: Column( 10 | children: [ 11 | SizedBox( 12 | height: 100.0, 13 | ), 14 | LoginCard(), 15 | // new Padding( 16 | // padding: const EdgeInsets.only(top: 30.0), 17 | // child: new Text( 18 | // ISRData.forgot_password, 19 | // style: new TextStyle(fontWeight: FontWeight.normal), 20 | // ), 21 | // ) 22 | ], 23 | ), 24 | ), 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/ui/page/login/login_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/inherited/login_provider.dart'; 3 | import 'package:flutter_uikit/ui/page/login/login_one/login_widget.dart'; 4 | import 'package:flutter_uikit/ui/widgets/login_background.dart'; 5 | import 'package:flutter_uikit/utils/uidata.dart'; 6 | 7 | enum LoginValidationType { phone, otp } 8 | 9 | class LoginPage extends StatefulWidget { 10 | @override 11 | LoginPageState createState() { 12 | return LoginPageState(); 13 | } 14 | } 15 | 16 | class LoginPageState extends State { 17 | final scaffoldState = GlobalKey(); 18 | Widget loginScaffold() => LoginProvider( 19 | validationErrorCallback: showValidationError, 20 | child: Scaffold( 21 | key: scaffoldState, 22 | backgroundColor: Color(0xffeeeeee), 23 | body: Stack( 24 | fit: StackFit.expand, 25 | children: [LoginBackground(), LoginWidgets()], 26 | ), 27 | ), 28 | ); 29 | 30 | showValidationError(LoginValidationType type) { 31 | scaffoldState.currentState.showSnackBar(SnackBar( 32 | content: Text(type == LoginValidationType.phone 33 | ? UIData.enter_valid_number 34 | : UIData.enter_valid_otp), 35 | duration: Duration(seconds: 2), 36 | )); 37 | } 38 | 39 | @override 40 | void initState() { 41 | super.initState(); 42 | } 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | return loginScaffold(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/ui/page/login/login_two_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/utils/uidata.dart'; 3 | 4 | class LoginTwoPage extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return Scaffold( 8 | backgroundColor: Colors.white, 9 | body: Center( 10 | child: loginBody(), 11 | ), 12 | ); 13 | } 14 | 15 | loginBody() => SingleChildScrollView( 16 | child: Column( 17 | mainAxisAlignment: MainAxisAlignment.spaceAround, 18 | children: [loginHeader(), loginFields()], 19 | ), 20 | ); 21 | 22 | loginHeader() => Column( 23 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 24 | children: [ 25 | FlutterLogo( 26 | colors: Colors.green, 27 | size: 80.0, 28 | ), 29 | SizedBox( 30 | height: 30.0, 31 | ), 32 | Text( 33 | "Welcome to ${UIData.appName}", 34 | style: TextStyle(fontWeight: FontWeight.w700, color: Colors.green), 35 | ), 36 | SizedBox( 37 | height: 5.0, 38 | ), 39 | Text( 40 | "Sign in to continue", 41 | style: TextStyle(color: Colors.grey), 42 | ), 43 | ], 44 | ); 45 | 46 | loginFields() => Container( 47 | child: Column( 48 | mainAxisAlignment: MainAxisAlignment.spaceAround, 49 | mainAxisSize: MainAxisSize.min, 50 | children: [ 51 | Container( 52 | padding: EdgeInsets.symmetric(vertical: 16.0, horizontal: 30.0), 53 | child: TextField( 54 | maxLines: 1, 55 | decoration: InputDecoration( 56 | hintText: "Enter your username", 57 | labelText: "Username", 58 | ), 59 | ), 60 | ), 61 | Container( 62 | padding: EdgeInsets.symmetric(vertical: 0.0, horizontal: 30.0), 63 | child: TextField( 64 | maxLines: 1, 65 | obscureText: true, 66 | decoration: InputDecoration( 67 | hintText: "Enter your password", 68 | labelText: "Password", 69 | ), 70 | ), 71 | ), 72 | SizedBox( 73 | height: 30.0, 74 | ), 75 | Container( 76 | padding: EdgeInsets.symmetric(vertical: 0.0, horizontal: 30.0), 77 | width: double.infinity, 78 | child: RaisedButton( 79 | padding: EdgeInsets.all(12.0), 80 | shape: StadiumBorder(), 81 | child: Text( 82 | "SIGN IN", 83 | style: TextStyle(color: Colors.white), 84 | ), 85 | color: Colors.green, 86 | onPressed: () {}, 87 | ), 88 | ), 89 | SizedBox( 90 | height: 5.0, 91 | ), 92 | Text( 93 | "SIGN UP FOR AN ACCOUNT", 94 | style: TextStyle(color: Colors.grey), 95 | ), 96 | ], 97 | ), 98 | ); 99 | } 100 | -------------------------------------------------------------------------------- /lib/ui/page/notfound/notfound_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/ui/widgets/common_scaffold.dart'; 3 | import 'package:flutter_uikit/ui/widgets/profile_tile.dart'; 4 | 5 | class NotFoundPage extends StatelessWidget { 6 | final appTitle; 7 | final title; 8 | final message; 9 | final IconData icon; 10 | final String image; 11 | final iconColor; 12 | 13 | NotFoundPage( 14 | {this.appTitle = "Search", 15 | this.title = "No Result", 16 | this.message = "Try a more general keyword.", 17 | this.icon = Icons.search, 18 | this.image, 19 | this.iconColor = Colors.black}); 20 | 21 | Widget bodyData() => Center( 22 | child: Column( 23 | mainAxisAlignment: MainAxisAlignment.center, 24 | children: [ 25 | Icon( 26 | icon, 27 | size: 100.0, 28 | color: iconColor, 29 | ), 30 | SizedBox( 31 | height: 20.0, 32 | ), 33 | ProfileTile( 34 | title: title, 35 | subtitle: message, 36 | ) 37 | ], 38 | ), 39 | ); 40 | 41 | @override 42 | Widget build(BuildContext context) { 43 | return CommonScaffold( 44 | appTitle: appTitle, 45 | bodyData: bodyData(), 46 | showDrawer: false, 47 | showFAB: false, 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /lib/ui/page/payment/payment_success_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_uikit/ui/widgets/common_scaffold.dart'; 5 | import 'package:flutter_uikit/ui/widgets/profile_tile.dart'; 6 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 7 | 8 | class PaymentSuccessPage extends StatefulWidget { 9 | @override 10 | PaymentSuccessPageState createState() { 11 | return new PaymentSuccessPageState(); 12 | } 13 | } 14 | 15 | class PaymentSuccessPageState extends State { 16 | bool isDataAvailable = true; 17 | Widget bodyData() => Center( 18 | child: isDataAvailable 19 | ? RaisedButton( 20 | shape: StadiumBorder(), 21 | onPressed: () => showSuccessDialog(), 22 | color: Colors.amber, 23 | child: Text("Process Payment"), 24 | ) 25 | : CircularProgressIndicator(), 26 | ); 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return CommonScaffold( 31 | appTitle: "Payment Success", 32 | actionFirstIcon: null, 33 | bodyData: bodyData(), 34 | ); 35 | } 36 | 37 | void showSuccessDialog() { 38 | setState(() { 39 | isDataAvailable = false; 40 | Future.delayed(Duration(seconds: 3)).then((_) => goToDialog()); 41 | }); 42 | } 43 | 44 | goToDialog() { 45 | setState(() { 46 | isDataAvailable = true; 47 | }); 48 | showDialog( 49 | context: context, 50 | barrierDismissible: true, 51 | builder: (context) => Center( 52 | child: SingleChildScrollView( 53 | child: Column( 54 | mainAxisAlignment: MainAxisAlignment.center, 55 | children: [ 56 | successTicket(), 57 | SizedBox( 58 | height: 10.0, 59 | ), 60 | FloatingActionButton( 61 | backgroundColor: Colors.black, 62 | child: Icon( 63 | Icons.clear, 64 | color: Colors.white, 65 | ), 66 | onPressed: () { 67 | Navigator.pop(context); 68 | }, 69 | ) 70 | ], 71 | ), 72 | ), 73 | )); 74 | } 75 | 76 | successTicket() => Container( 77 | width: double.infinity, 78 | padding: const EdgeInsets.all(16.0), 79 | child: Material( 80 | clipBehavior: Clip.antiAlias, 81 | elevation: 2.0, 82 | borderRadius: BorderRadius.circular(4.0), 83 | child: Padding( 84 | padding: const EdgeInsets.all(16.0), 85 | child: Column( 86 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 87 | children: [ 88 | ProfileTile( 89 | title: "Thank You!", 90 | textColor: Colors.purple, 91 | subtitle: "Your transaction was successful", 92 | ), 93 | ListTile( 94 | title: Text("Date"), 95 | subtitle: Text("26 June 2018"), 96 | trailing: Text("11:00 AM"), 97 | ), 98 | ListTile( 99 | title: Text("Pawan Kumar"), 100 | subtitle: Text("mtechviral@gmail.com"), 101 | trailing: CircleAvatar( 102 | radius: 20.0, 103 | backgroundImage: NetworkImage( 104 | "https://avatars0.githubusercontent.com/u/12619420?s=460&v=4"), 105 | ), 106 | ), 107 | ListTile( 108 | title: Text("Amount"), 109 | subtitle: Text("\$299"), 110 | trailing: Text("Completed"), 111 | ), 112 | Card( 113 | clipBehavior: Clip.antiAlias, 114 | elevation: 0.0, 115 | color: Colors.grey.shade300, 116 | child: ListTile( 117 | leading: Icon( 118 | FontAwesomeIcons.ccAmex, 119 | color: Colors.blue, 120 | ), 121 | title: Text("Credit/Debit Card"), 122 | subtitle: Text("Amex Card ending ***6"), 123 | ), 124 | ) 125 | ], 126 | ), 127 | ), 128 | ), 129 | ); 130 | } 131 | -------------------------------------------------------------------------------- /lib/ui/page/profile/profile_two_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/ui/page/profile/profile_one_page.dart'; 3 | import 'package:flutter_uikit/ui/widgets/common_scaffold.dart'; 4 | 5 | class ProfileTwoPage extends StatelessWidget { 6 | Size deviceSize; 7 | 8 | Widget profileHeader() => Container( 9 | height: deviceSize.height / 4, 10 | width: double.infinity, 11 | color: Colors.black, 12 | child: Padding( 13 | padding: const EdgeInsets.all(10.0), 14 | child: Card( 15 | clipBehavior: Clip.antiAlias, 16 | color: Colors.black, 17 | child: FittedBox( 18 | child: Column( 19 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 20 | children: [ 21 | Container( 22 | decoration: BoxDecoration( 23 | borderRadius: BorderRadius.circular(50.0), 24 | border: Border.all(width: 2.0, color: Colors.white)), 25 | child: CircleAvatar( 26 | radius: 40.0, 27 | backgroundImage: NetworkImage( 28 | "https://avatars0.githubusercontent.com/u/12619420?s=460&v=4"), 29 | ), 30 | ), 31 | Text( 32 | "Pawan Kumar", 33 | style: TextStyle(color: Colors.white, fontSize: 20.0), 34 | ), 35 | Text( 36 | "Flutter Developer", 37 | style: TextStyle(color: Colors.white), 38 | ) 39 | ], 40 | ), 41 | ), 42 | ), 43 | ), 44 | ); 45 | Widget imagesCard() => Container( 46 | height: deviceSize.height / 6, 47 | child: Padding( 48 | padding: const EdgeInsets.symmetric(horizontal: 18.0, vertical: 5.0), 49 | child: Column( 50 | crossAxisAlignment: CrossAxisAlignment.start, 51 | children: [ 52 | Padding( 53 | padding: const EdgeInsets.all(8.0), 54 | child: Text( 55 | "Photos", 56 | style: TextStyle(fontWeight: FontWeight.w700, fontSize: 18.0), 57 | ), 58 | ), 59 | Expanded( 60 | child: Card( 61 | child: ListView.builder( 62 | scrollDirection: Axis.horizontal, 63 | itemCount: 5, 64 | itemBuilder: (context, i) => Padding( 65 | padding: const EdgeInsets.all(8.0), 66 | child: Image.network( 67 | "https://cdn.pixabay.com/photo/2016/10/31/18/14/ice-1786311_960_720.jpg"), 68 | ), 69 | ), 70 | ), 71 | ), 72 | ], 73 | ), 74 | ), 75 | ); 76 | 77 | Widget profileColumn() => Padding( 78 | padding: const EdgeInsets.all(8.0), 79 | child: Row( 80 | mainAxisAlignment: MainAxisAlignment.start, 81 | children: [ 82 | CircleAvatar( 83 | backgroundImage: NetworkImage( 84 | "https://avatars0.githubusercontent.com/u/12619420?s=460&v=4"), 85 | ), 86 | Expanded( 87 | child: Padding( 88 | padding: const EdgeInsets.symmetric(horizontal: 20.0), 89 | child: Column( 90 | mainAxisAlignment: MainAxisAlignment.center, 91 | crossAxisAlignment: CrossAxisAlignment.start, 92 | children: [ 93 | Text( 94 | "Pawan Kumar posted a photo", 95 | ), 96 | SizedBox( 97 | height: 5.0, 98 | ), 99 | Text( 100 | "25 mins ago", 101 | ) 102 | ], 103 | ), 104 | )) 105 | ], 106 | ), 107 | ); 108 | 109 | Widget postCard() => Container( 110 | width: double.infinity, 111 | height: deviceSize.height / 3, 112 | child: Padding( 113 | padding: const EdgeInsets.symmetric(horizontal: 18.0, vertical: 5.0), 114 | child: Column( 115 | crossAxisAlignment: CrossAxisAlignment.stretch, 116 | children: [ 117 | Padding( 118 | padding: const EdgeInsets.all(8.0), 119 | child: Text( 120 | "Post", 121 | style: TextStyle(fontWeight: FontWeight.w700, fontSize: 18.0), 122 | ), 123 | ), 124 | profileColumn(), 125 | Expanded( 126 | child: Card( 127 | elevation: 2.0, 128 | child: Image.network( 129 | "https://cdn.pixabay.com/photo/2018/06/12/01/04/road-3469810_960_720.jpg", 130 | fit: BoxFit.cover, 131 | ), 132 | ), 133 | ), 134 | ], 135 | ), 136 | ), 137 | ); 138 | Widget bodyData() => SingleChildScrollView( 139 | child: Column( 140 | children: [ 141 | profileHeader(), 142 | followColumn(deviceSize), 143 | imagesCard(), 144 | postCard(), 145 | ], 146 | ), 147 | ); 148 | 149 | @override 150 | Widget build(BuildContext context) { 151 | deviceSize = MediaQuery.of(context).size; 152 | return CommonScaffold( 153 | appTitle: "Profile", 154 | bodyData: bodyData(), 155 | elevation: 0.0, 156 | ); 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /lib/ui/page/shopping/product_detail_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_uikit/inherited/product_provider.dart'; 5 | import 'package:flutter_uikit/logic/bloc/product_bloc.dart'; 6 | import 'package:flutter_uikit/model/product.dart'; 7 | import 'package:flutter_uikit/ui/page/shopping/shopping_two/product_detail_widgets.dart'; 8 | import 'package:flutter_uikit/ui/widgets/login_background.dart'; 9 | 10 | class ProductDetailPage extends StatelessWidget { 11 | Widget productScaffold(Stream> products) => new Scaffold( 12 | backgroundColor: new Color(0xffeeeeee), 13 | body: StreamBuilder>( 14 | stream: products, 15 | builder: (context, snapshot) { 16 | return snapshot.hasData 17 | ? Stack( 18 | fit: StackFit.expand, 19 | children: [ 20 | LoginBackground( 21 | showIcon: false, 22 | ), 23 | ProductDetailWidgets(product:snapshot.data[0]), 24 | ], 25 | ) 26 | : Center(child: CircularProgressIndicator()); 27 | })); 28 | @override 29 | Widget build(BuildContext context) { 30 | ProductBloc productBloc = ProductBloc(); 31 | return ProductProvider( 32 | productBloc: productBloc, 33 | child: productScaffold(productBloc.productItems)); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/ui/page/shopping/shopping_details/shopping_action.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/logic/bloc/cart_bloc.dart'; 3 | import 'package:flutter_uikit/model/product.dart'; 4 | import 'package:flutter_uikit/ui/widgets/common_divider.dart'; 5 | import 'package:flutter_uikit/ui/widgets/custom_float.dart'; 6 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 7 | 8 | class ShoppingAction extends StatefulWidget { 9 | final Product product; 10 | ShoppingAction({this.product}); 11 | 12 | @override 13 | ShoppingActionState createState() { 14 | return new ShoppingActionState(); 15 | } 16 | } 17 | 18 | class ShoppingActionState extends State { 19 | String _value = "Cyan"; 20 | String _sizeValue = "M"; 21 | 22 | Widget colorsCard() => Column( 23 | crossAxisAlignment: CrossAxisAlignment.start, 24 | children: [ 25 | Text( 26 | "Colors", 27 | style: TextStyle(fontWeight: FontWeight.w700, fontSize: 20.0), 28 | ), 29 | SizedBox( 30 | height: 10.0, 31 | ), 32 | Wrap( 33 | alignment: WrapAlignment.spaceBetween, 34 | children: widget.product.colors 35 | .map((pc) => Padding( 36 | padding: const EdgeInsets.all(8.0), 37 | child: ChoiceChip( 38 | selectedColor: pc.color, 39 | label: Text( 40 | pc.colorName, 41 | style: TextStyle(fontWeight: FontWeight.bold), 42 | ), 43 | selected: _value == pc.colorName, 44 | onSelected: (selected) { 45 | setState(() { 46 | _value = selected ? pc.colorName : null; 47 | }); 48 | }), 49 | )) 50 | .toList(), 51 | ), 52 | ], 53 | ); 54 | 55 | Widget sizesCard() => Column( 56 | crossAxisAlignment: CrossAxisAlignment.start, 57 | children: [ 58 | Text( 59 | "Sizes", 60 | style: TextStyle(fontWeight: FontWeight.w700, fontSize: 20.0), 61 | ), 62 | SizedBox( 63 | height: 10.0, 64 | ), 65 | Wrap( 66 | alignment: WrapAlignment.spaceEvenly, 67 | children: widget.product.sizes 68 | .map((pc) => Padding( 69 | padding: const EdgeInsets.all(8.0), 70 | child: ChoiceChip( 71 | selectedColor: Colors.yellow, 72 | label: Text( 73 | pc, 74 | style: TextStyle(fontWeight: FontWeight.bold), 75 | ), 76 | selected: _sizeValue == pc, 77 | onSelected: (selected) { 78 | setState(() { 79 | _sizeValue = selected ? pc : null; 80 | }); 81 | }), 82 | )) 83 | .toList(), 84 | ), 85 | ], 86 | ); 87 | 88 | Widget quantityCard() { 89 | CartBloc cartBloc = CartBloc(widget.product); 90 | return Column( 91 | crossAxisAlignment: CrossAxisAlignment.start, 92 | children: [ 93 | Text( 94 | "Sizes", 95 | style: TextStyle(fontWeight: FontWeight.w700, fontSize: 20.0), 96 | ), 97 | SizedBox( 98 | height: 10.0, 99 | ), 100 | Row( 101 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 102 | children: [ 103 | CustomFloat( 104 | isMini: true, 105 | icon: FontAwesomeIcons.minus, 106 | qrCallback: () => cartBloc.subtractionController.add(true), 107 | ), 108 | StreamBuilder( 109 | stream: cartBloc.getCount, 110 | initialData: 0, 111 | builder: (context, snapshot) => Text( 112 | snapshot.data.toString(), 113 | style: 114 | TextStyle(fontWeight: FontWeight.w700, fontSize: 20.0), 115 | ), 116 | ), 117 | CustomFloat( 118 | isMini: true, 119 | icon: FontAwesomeIcons.plus, 120 | qrCallback: () => cartBloc.additionalController.add(true), 121 | ), 122 | ], 123 | ) 124 | ], 125 | ); 126 | } 127 | 128 | @override 129 | Widget build(BuildContext context) { 130 | return Column( 131 | crossAxisAlignment: CrossAxisAlignment.start, 132 | children: [ 133 | colorsCard(), 134 | CommonDivider(), 135 | SizedBox( 136 | height: 5.0, 137 | ), 138 | sizesCard(), 139 | CommonDivider(), 140 | SizedBox( 141 | height: 5.0, 142 | ), 143 | quantityCard(), 144 | SizedBox( 145 | height: 20.0, 146 | ), 147 | ], 148 | ); 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /lib/ui/page/shopping/shopping_details/shopping_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/model/product.dart'; 3 | import 'package:flutter_uikit/ui/page/shopping/shopping_details/shopping_action.dart'; 4 | import 'package:flutter_uikit/ui/widgets/label_icon.dart'; 5 | 6 | class ShoppingWidgets extends StatelessWidget { 7 | Size deviceSize; 8 | final Product product; 9 | 10 | ShoppingWidgets({Key key, this.product}) : super(key: key); 11 | Widget mainCard() => Padding( 12 | padding: const EdgeInsets.symmetric(horizontal: 18.0), 13 | child: Card( 14 | elevation: 2.0, 15 | child: Padding( 16 | padding: const EdgeInsets.all(16.0), 17 | child: Column( 18 | crossAxisAlignment: CrossAxisAlignment.stretch, 19 | children: [ 20 | Text( 21 | product.name, 22 | style: TextStyle(fontWeight: FontWeight.w700, fontSize: 20.0), 23 | ), 24 | SizedBox( 25 | height: 10.0, 26 | ), 27 | Text(product.brand), 28 | SizedBox( 29 | height: 10.0, 30 | ), 31 | Row( 32 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 33 | children: [ 34 | LabelIcon( 35 | icon: Icons.star, 36 | iconColor: Colors.cyan, 37 | label: product.rating.toString(), 38 | ), 39 | Text( 40 | product.price, 41 | style: TextStyle( 42 | color: Colors.orange.shade800, 43 | fontWeight: FontWeight.w700, 44 | fontSize: 25.0), 45 | ) 46 | ], 47 | ) 48 | ], 49 | ), 50 | ), 51 | ), 52 | ); 53 | 54 | Widget imagesCard() => SizedBox( 55 | height: deviceSize.height / 5, 56 | child: Padding( 57 | padding: const EdgeInsets.symmetric(horizontal: 18.0), 58 | child: Card( 59 | elevation: 2.0, 60 | child: ListView.builder( 61 | scrollDirection: Axis.horizontal, 62 | itemCount: 5, 63 | itemBuilder: (context, i) => Padding( 64 | padding: const EdgeInsets.all(8.0), 65 | child: Image.network(product.image), 66 | ), 67 | ), 68 | ), 69 | ), 70 | ); 71 | 72 | Widget descCard() => Container( 73 | width: double.infinity, 74 | padding: const EdgeInsets.symmetric(horizontal: 18.0), 75 | child: Card( 76 | child: Padding( 77 | padding: const EdgeInsets.all(8.0), 78 | child: Column( 79 | crossAxisAlignment: CrossAxisAlignment.start, 80 | children: [ 81 | Text( 82 | "Description", 83 | style: TextStyle( 84 | fontSize: 20.0, 85 | fontWeight: FontWeight.w700, 86 | ), 87 | ), 88 | SizedBox( 89 | height: 5.0, 90 | ), 91 | Text( 92 | product.description, 93 | style: 94 | TextStyle(fontSize: 15.0, fontWeight: FontWeight.normal), 95 | ), 96 | ], 97 | ), 98 | ), 99 | ), 100 | ); 101 | 102 | Widget actionCard() => Padding( 103 | padding: const EdgeInsets.symmetric(horizontal: 18.0), 104 | child: Card( 105 | child: Padding( 106 | padding: const EdgeInsets.all(8.0), 107 | child: ShoppingAction(product: product)), 108 | ), 109 | ); 110 | @override 111 | Widget build(BuildContext context) { 112 | deviceSize = MediaQuery.of(context).size; 113 | return SingleChildScrollView( 114 | child: Column( 115 | children: [ 116 | SizedBox( 117 | height: deviceSize.height / 4, 118 | ), 119 | mainCard(), 120 | imagesCard(), 121 | descCard(), 122 | actionCard(), 123 | ], 124 | ), 125 | ); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/ui/page/shopping/shopping_details_page.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_uikit/inherited/product_provider.dart'; 5 | import 'package:flutter_uikit/logic/bloc/product_bloc.dart'; 6 | import 'package:flutter_uikit/model/product.dart'; 7 | import 'package:flutter_uikit/ui/page/shopping/shopping_details/shopping_widget.dart'; 8 | import 'package:flutter_uikit/ui/widgets/common_scaffold.dart'; 9 | import 'package:flutter_uikit/ui/widgets/login_background.dart'; 10 | 11 | class ShoppingDetailsPage extends StatelessWidget { 12 | final _scaffoldState = GlobalKey(); 13 | 14 | Widget bodyData(Stream> products) => 15 | StreamBuilder>( 16 | stream: products, 17 | builder: (context, snapshot) { 18 | return snapshot.hasData 19 | ? Stack( 20 | fit: StackFit.expand, 21 | children: [ 22 | LoginBackground( 23 | showIcon: false, 24 | image: snapshot.data[0].image, 25 | ), 26 | ShoppingWidgets(product: snapshot.data[0]), 27 | ], 28 | ) 29 | : Center(child: CircularProgressIndicator()); 30 | }); 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | ProductBloc productBloc = ProductBloc(); 35 | return ProductProvider( 36 | productBloc: productBloc, 37 | child: CommonScaffold( 38 | backGroundColor: Colors.grey.shade100, 39 | actionFirstIcon: null, 40 | appTitle: "Product Detail", 41 | showFAB: true, 42 | scaffoldKey: _scaffoldState, 43 | showDrawer: false, 44 | centerDocked: true, 45 | floatingIcon: Icons.add_shopping_cart, 46 | bodyData: bodyData(productBloc.productItems), 47 | showBottomNav: true, 48 | ), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/ui/page/shopping/shopping_one_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/logic/bloc/product_bloc.dart'; 3 | import 'package:flutter_uikit/model/product.dart'; 4 | import 'package:flutter_uikit/ui/widgets/common_scaffold.dart'; 5 | 6 | class ShoppingOnePage extends StatelessWidget { 7 | final scaffoldKey = GlobalKey(); 8 | BuildContext _context; 9 | 10 | //stack1 11 | Widget imageStack(String img) => Image.network( 12 | img, 13 | fit: BoxFit.cover, 14 | ); 15 | 16 | //stack2 17 | Widget descStack(Product product) => Positioned( 18 | bottom: 0.0, 19 | left: 0.0, 20 | right: 0.0, 21 | child: Container( 22 | decoration: BoxDecoration(color: Colors.black.withOpacity(0.5)), 23 | child: Padding( 24 | padding: const EdgeInsets.all(8.0), 25 | child: Row( 26 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 27 | children: [ 28 | Expanded( 29 | child: Text( 30 | product.name, 31 | softWrap: true, 32 | overflow: TextOverflow.ellipsis, 33 | style: TextStyle(color: Colors.white), 34 | ), 35 | ), 36 | Text(product.price, 37 | style: TextStyle( 38 | color: Colors.yellow, 39 | fontSize: 18.0, 40 | fontWeight: FontWeight.bold)) 41 | ], 42 | ), 43 | ), 44 | ), 45 | ); 46 | 47 | //stack3 48 | Widget ratingStack(double rating) => Positioned( 49 | top: 0.0, 50 | left: 0.0, 51 | child: Container( 52 | padding: EdgeInsets.all(4.0), 53 | decoration: BoxDecoration( 54 | color: Colors.black.withOpacity(0.9), 55 | borderRadius: BorderRadius.only( 56 | topRight: Radius.circular(10.0), 57 | bottomRight: Radius.circular(10.0))), 58 | child: Row( 59 | children: [ 60 | Icon( 61 | Icons.star, 62 | color: Colors.cyanAccent, 63 | size: 10.0, 64 | ), 65 | SizedBox( 66 | width: 2.0, 67 | ), 68 | Text( 69 | rating.toString(), 70 | style: TextStyle(color: Colors.white, fontSize: 10.0), 71 | ) 72 | ], 73 | ), 74 | ), 75 | ); 76 | 77 | Widget productGrid(List products) => GridView.count( 78 | crossAxisCount: 79 | MediaQuery.of(_context).orientation == Orientation.portrait ? 2 : 3, 80 | shrinkWrap: true, 81 | children: products 82 | .map((product) => Padding( 83 | padding: const EdgeInsets.all(8.0), 84 | child: InkWell( 85 | splashColor: Colors.yellow, 86 | onDoubleTap: () => showSnackBar(), 87 | child: Material( 88 | clipBehavior: Clip.antiAlias, 89 | elevation: 2.0, 90 | child: Stack( 91 | fit: StackFit.expand, 92 | children: [ 93 | imageStack(product.image), 94 | descStack(product), 95 | ratingStack(product.rating), 96 | ], 97 | ), 98 | ), 99 | ), 100 | )) 101 | .toList(), 102 | ); 103 | 104 | Widget bodyData() { 105 | ProductBloc productBloc = ProductBloc(); 106 | return StreamBuilder>( 107 | stream: productBloc.productItems, 108 | builder: (context, snapshot) { 109 | return snapshot.hasData 110 | ? productGrid(snapshot.data) 111 | : Center(child: CircularProgressIndicator()); 112 | }); 113 | } 114 | 115 | void showSnackBar() { 116 | scaffoldKey.currentState.showSnackBar(SnackBar( 117 | content: Text( 118 | "Added to cart.", 119 | ), 120 | action: SnackBarAction( 121 | label: "Undo", 122 | onPressed: () {}, 123 | ), 124 | )); 125 | } 126 | 127 | @override 128 | Widget build(BuildContext context) { 129 | _context = context; 130 | return CommonScaffold( 131 | scaffoldKey: scaffoldKey, 132 | appTitle: "Products", 133 | showDrawer: true, 134 | showFAB: false, 135 | actionFirstIcon: Icons.shopping_cart, 136 | bodyData: bodyData(), 137 | ); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /lib/ui/page/shopping/shopping_two/product_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/model/product.dart'; 3 | import 'package:flutter_uikit/ui/page/shopping/shopping_two/product_desc.dart'; 4 | import 'package:flutter_uikit/utils/uidata.dart'; 5 | 6 | class ProductCard extends StatefulWidget { 7 | final Product product; 8 | 9 | const ProductCard({Key key, this.product}) : super(key: key); 10 | @override 11 | _ProductCardState createState() => new _ProductCardState(); 12 | } 13 | 14 | class _ProductCardState extends State 15 | with SingleTickerProviderStateMixin { 16 | var deviceSize; 17 | AnimationController controller; 18 | Animation animation; 19 | 20 | Widget productCard() { 21 | var cardHeight = deviceSize.height * 0.8; 22 | var cardWidth = deviceSize.width * 0.85; 23 | return Card( 24 | clipBehavior: Clip.antiAlias, 25 | elevation: 1.0, 26 | shape: new RoundedRectangleBorder( 27 | borderRadius: new BorderRadius.circular(15.0)), 28 | color: Colors.white, 29 | child: Ink( 30 | height: cardHeight, 31 | width: cardWidth, 32 | child: new Stack( 33 | children: [ 34 | Container( 35 | height: cardHeight - cardHeight / 2 * 1.1, 36 | width: double.infinity, 37 | child: new Image.network( 38 | widget.product.image, 39 | fit: BoxFit.cover, 40 | ), 41 | ), 42 | Align( 43 | alignment: Alignment.bottomCenter, 44 | child: new Container( 45 | width: double.infinity, 46 | height: cardHeight / 2 * 1.2, 47 | decoration: new BoxDecoration( 48 | gradient: new LinearGradient(colors: UIData.kitGradients), 49 | borderRadius: new BorderRadius.only( 50 | topLeft: const Radius.circular(30.0), 51 | topRight: const Radius.circular(30.0)), 52 | color: Colors.white, 53 | ), 54 | child: new ProductDesc(product: widget.product), 55 | ), 56 | ), 57 | ], 58 | ), 59 | ), 60 | ); 61 | } 62 | 63 | @override 64 | initState() { 65 | super.initState(); 66 | controller = new AnimationController( 67 | vsync: this, duration: new Duration(milliseconds: 1500)); 68 | animation = new Tween(begin: 0.0, end: 1.0).animate( 69 | new CurvedAnimation(parent: controller, curve: Curves.fastOutSlowIn)); 70 | animation.addListener(() => this.setState(() {})); 71 | controller.forward(); 72 | } 73 | 74 | @override 75 | void dispose() { 76 | controller.dispose(); 77 | super.dispose(); 78 | } 79 | 80 | @override 81 | Widget build(BuildContext context) { 82 | deviceSize = MediaQuery.of(context).size; 83 | return productCard(); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/ui/page/shopping/shopping_two/product_desc.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/model/product.dart'; 3 | 4 | class ProductDesc extends StatelessWidget { 5 | final Product product; 6 | 7 | const ProductDesc({Key key, this.product}) : super(key: key); 8 | @override 9 | Widget build(BuildContext context) { 10 | return SingleChildScrollView( 11 | child: new Column( 12 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 13 | children: [ 14 | Padding( 15 | padding: const EdgeInsets.all(16.0), 16 | child: new ListTile( 17 | title: new Text( 18 | product.name, 19 | style: new TextStyle( 20 | fontSize: 18.0, 21 | color: Colors.white, 22 | fontWeight: FontWeight.w700), 23 | ), 24 | subtitle: new Text( 25 | product.brand, 26 | style: new TextStyle( 27 | fontSize: 15.0, 28 | color: Colors.white, 29 | fontWeight: FontWeight.normal), 30 | ), 31 | trailing: new Text(product.price, 32 | style: new TextStyle( 33 | fontSize: 25.0, 34 | fontWeight: FontWeight.bold, 35 | color: Colors.yellow)), 36 | ), 37 | ), 38 | new SizedBox( 39 | height: 10.0, 40 | ), 41 | Padding( 42 | padding: const EdgeInsets.symmetric(horizontal: 28.0), 43 | child: new Text( 44 | product.description, 45 | style: TextStyle(color: Colors.white), 46 | textAlign: TextAlign.start, 47 | ), 48 | ), 49 | new SizedBox( 50 | height: 30.0, 51 | ), 52 | new Card( 53 | clipBehavior: Clip.antiAlias, 54 | shape: new RoundedRectangleBorder( 55 | borderRadius: new BorderRadius.circular(8.0)), 56 | color: Colors.white, 57 | child: Padding( 58 | padding: const EdgeInsets.all(8.0), 59 | child: new Row( 60 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 61 | crossAxisAlignment: CrossAxisAlignment.center, 62 | children: [ 63 | new Column( 64 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 65 | children: [ 66 | new Text( 67 | "Your Size", 68 | style: TextStyle(fontWeight: FontWeight.w700), 69 | ), 70 | new RawChip( 71 | label: new Text( 72 | "M", 73 | style: TextStyle(color: Colors.white), 74 | ), 75 | backgroundColor: Colors.cyan) 76 | ], 77 | ), 78 | new Column( 79 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 80 | children: [ 81 | new Text("Color", 82 | style: TextStyle(fontWeight: FontWeight.w700)), 83 | new RawChip( 84 | label: new Text( 85 | "Red Blue", 86 | style: TextStyle(color: Colors.white), 87 | ), 88 | backgroundColor: Colors.red, 89 | ) 90 | ], 91 | ), 92 | new Column( 93 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 94 | children: [ 95 | new Text("Product ID", 96 | style: TextStyle(fontWeight: FontWeight.w700)), 97 | new RawChip( 98 | label: new Text( 99 | "PQ1001", 100 | style: TextStyle(color: Colors.white), 101 | ), 102 | backgroundColor: Colors.green, 103 | ) 104 | ], 105 | ) 106 | ], 107 | ), 108 | ), 109 | ) 110 | ], 111 | ), 112 | ); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /lib/ui/page/shopping/shopping_two/product_detail_widgets.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_uikit/logic/bloc/cart_bloc.dart'; 4 | import 'package:flutter_uikit/model/product.dart'; 5 | import 'package:flutter_uikit/ui/page/shopping/shopping_two/product_card.dart'; 6 | import 'package:flutter_uikit/utils/uidata.dart'; 7 | 8 | class ProductDetailWidgets extends StatelessWidget { 9 | final Product product; 10 | 11 | const ProductDetailWidgets({Key key, this.product}) : super(key: key); 12 | 13 | Widget appBarColumn(BuildContext context) => new Column( 14 | mainAxisAlignment: MainAxisAlignment.center, 15 | children: [ 16 | new Row( 17 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 18 | children: [ 19 | new IconButton( 20 | icon: new Icon( 21 | defaultTargetPlatform == TargetPlatform.android 22 | ? Icons.arrow_back 23 | : Icons.arrow_back_ios, 24 | color: Colors.white, 25 | ), 26 | onPressed: () => 27 | Navigator.canPop(context) ? Navigator.pop(context) : null, 28 | ), 29 | new Text( 30 | "Product Detail", 31 | style: new TextStyle(color: Colors.white, fontSize: 20.0), 32 | ), 33 | new Opacity( 34 | opacity: 0.0, 35 | child: new IconButton( 36 | icon: new Icon( 37 | Icons.arrow_back, 38 | color: Colors.white, 39 | ), 40 | onPressed: () {}, 41 | ), 42 | ) 43 | ], 44 | ), 45 | new SizedBox( 46 | height: 10.0, 47 | ), 48 | ProductCard(product: product) 49 | ], 50 | ); 51 | Widget quantityCard(Size deviceSize, CartBloc cartBloc) => new Positioned( 52 | top: (deviceSize.height - deviceSize.height * 0.1), 53 | left: deviceSize.width / 2 - deviceSize.width / 5, 54 | width: deviceSize.width / 2 - 30, 55 | child: new Material( 56 | clipBehavior: Clip.antiAlias, 57 | shape: new StadiumBorder(), 58 | shadowColor: Colors.black, 59 | elevation: 2.0, 60 | color: Colors.transparent, 61 | child: Ink( 62 | decoration: new BoxDecoration( 63 | gradient: new LinearGradient(colors: UIData.kitGradients), 64 | ), 65 | child: new Row( 66 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 67 | children: [ 68 | new IconButton( 69 | icon: new Icon( 70 | Icons.remove, 71 | color: Colors.white, 72 | ), 73 | onPressed: () => cartBloc.subtractionController.add(true), 74 | ), 75 | StreamBuilder( 76 | stream: cartBloc.getCount, 77 | initialData: 0, 78 | builder: (context, snapshot) => new Text( 79 | snapshot.data.toString(), 80 | style: new TextStyle( 81 | color: Colors.white, 82 | fontSize: 18.0, 83 | fontWeight: FontWeight.bold), 84 | ), 85 | ), 86 | new IconButton( 87 | icon: new Icon( 88 | Icons.add, 89 | color: Colors.white, 90 | ), 91 | onPressed: () => cartBloc.additionalController.add(true), 92 | ) 93 | ], 94 | ), 95 | ), 96 | ), 97 | ); 98 | @override 99 | Widget build(BuildContext context) { 100 | var deviceSize = MediaQuery.of(context).size; 101 | CartBloc cartBloc = CartBloc(product); 102 | return Stack( 103 | fit: StackFit.expand, 104 | children: [ 105 | appBarColumn(context), 106 | quantityCard(deviceSize, cartBloc), 107 | ], 108 | ); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /lib/ui/page/timeline/timeline_one_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/logic/bloc/post_bloc.dart'; 3 | import 'package:flutter_uikit/model/post.dart'; 4 | import 'package:flutter_uikit/ui/widgets/common_divider.dart'; 5 | import 'package:flutter_uikit/ui/widgets/common_drawer.dart'; 6 | import 'package:flutter_uikit/ui/widgets/label_icon.dart'; 7 | import 'package:flutter_uikit/utils/uidata.dart'; 8 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 9 | 10 | class TimelineOnePage extends StatelessWidget { 11 | //column1 12 | Widget profileColumn(BuildContext context, Post post) => Row( 13 | mainAxisAlignment: MainAxisAlignment.start, 14 | children: [ 15 | CircleAvatar( 16 | backgroundImage: NetworkImage(post.personImage), 17 | ), 18 | Expanded( 19 | child: Padding( 20 | padding: const EdgeInsets.symmetric(horizontal: 20.0), 21 | child: Column( 22 | mainAxisAlignment: MainAxisAlignment.center, 23 | crossAxisAlignment: CrossAxisAlignment.start, 24 | children: [ 25 | Text( 26 | post.personName, 27 | style: Theme.of(context) 28 | .textTheme 29 | .body1 30 | .apply(fontWeightDelta: 700), 31 | ), 32 | SizedBox( 33 | height: 5.0, 34 | ), 35 | Text( 36 | post.address, 37 | style: Theme.of(context).textTheme.caption.apply( 38 | fontFamily: UIData.ralewayFont, color: Colors.pink), 39 | ) 40 | ], 41 | ), 42 | )) 43 | ], 44 | ); 45 | 46 | //column last 47 | Widget actionColumn(Post post) => FittedBox( 48 | fit: BoxFit.contain, 49 | child: ButtonBar( 50 | alignment: MainAxisAlignment.center, 51 | children: [ 52 | LabelIcon( 53 | label: "${post.likesCount} Likes", 54 | icon: FontAwesomeIcons.solidThumbsUp, 55 | iconColor: Colors.green, 56 | ), 57 | LabelIcon( 58 | label: "${post.commentsCount} Comments", 59 | icon: FontAwesomeIcons.comment, 60 | iconColor: Colors.blue, 61 | ), 62 | Text( 63 | post.postTime, 64 | style: TextStyle(fontFamily: UIData.ralewayFont), 65 | ) 66 | ], 67 | ), 68 | ); 69 | 70 | //post cards 71 | Widget postCard(BuildContext context, Post post) { 72 | return Card( 73 | elevation: 2.0, 74 | child: Column( 75 | children: [ 76 | Padding( 77 | padding: const EdgeInsets.all(8.0), 78 | child: profileColumn(context, post), 79 | ), 80 | Padding( 81 | padding: const EdgeInsets.all(8.0), 82 | child: Text( 83 | post.message, 84 | style: TextStyle( 85 | fontWeight: FontWeight.normal, 86 | fontFamily: UIData.ralewayFont), 87 | ), 88 | ), 89 | SizedBox( 90 | height: 10.0, 91 | ), 92 | post.messageImage != null 93 | ? Image.network( 94 | post.messageImage, 95 | fit: BoxFit.cover, 96 | ) 97 | : Container(), 98 | post.messageImage != null ? Container() : CommonDivider(), 99 | actionColumn(post), 100 | ], 101 | ), 102 | ); 103 | } 104 | 105 | //allposts dropdown 106 | Widget bottomBar() => PreferredSize( 107 | preferredSize: Size(double.infinity, 50.0), 108 | child: Container( 109 | color: Colors.black, 110 | child: Align( 111 | alignment: Alignment.bottomCenter, 112 | child: Container( 113 | height: 50.0, 114 | padding: const EdgeInsets.symmetric(horizontal: 10.0), 115 | color: Colors.white, 116 | child: Row( 117 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 118 | children: [ 119 | Text( 120 | "All Posts", 121 | style: TextStyle( 122 | color: Colors.black, fontWeight: FontWeight.w700), 123 | ), 124 | Icon(Icons.arrow_drop_down) 125 | ], 126 | ), 127 | ), 128 | ))); 129 | 130 | Widget appBar() => SliverAppBar( 131 | backgroundColor: Colors.black, 132 | elevation: 2.0, 133 | title: Text("Feed"), 134 | forceElevated: true, 135 | pinned: true, 136 | floating: true, 137 | bottom: bottomBar(), 138 | ); 139 | 140 | Widget bodyList(List posts) => SliverList( 141 | delegate: SliverChildBuilderDelegate((BuildContext context, int index) { 142 | return Padding( 143 | padding: const EdgeInsets.all(8.0), 144 | child: postCard(context, posts[index]), 145 | ); 146 | }, childCount: posts.length), 147 | ); 148 | 149 | Widget bodySliverList() { 150 | PostBloc postBloc = PostBloc(); 151 | return StreamBuilder>( 152 | stream: postBloc.postItems, 153 | builder: (context, snapshot) { 154 | return snapshot.hasData 155 | ? CustomScrollView( 156 | slivers: [ 157 | appBar(), 158 | bodyList(snapshot.data), 159 | ], 160 | ) 161 | : Center(child: CircularProgressIndicator()); 162 | }); 163 | } 164 | 165 | @override 166 | Widget build(BuildContext context) { 167 | return Scaffold( 168 | drawer: CommonDrawer(), 169 | body: bodySliverList(), 170 | ); 171 | } 172 | } 173 | -------------------------------------------------------------------------------- /lib/ui/tools/arc_clipper.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ArcClipper extends CustomClipper { 4 | @override 5 | Path getClip(Size size) { 6 | var path = new Path(); 7 | path.lineTo(0.0, size.height - 30); 8 | 9 | var firstControlPoint = new Offset(size.width / 4, size.height); 10 | var firstPoint = new Offset(size.width / 2, size.height); 11 | path.quadraticBezierTo(firstControlPoint.dx, firstControlPoint.dy, 12 | firstPoint.dx, firstPoint.dy); 13 | 14 | var secondControlPoint = 15 | new Offset(size.width - (size.width / 4), size.height); 16 | var secondPoint = new Offset(size.width, size.height - 30); 17 | path.quadraticBezierTo(secondControlPoint.dx, secondControlPoint.dy, 18 | secondPoint.dx, secondPoint.dy); 19 | 20 | path.lineTo(size.width, 0.0); 21 | path.close(); 22 | 23 | return path; 24 | } 25 | 26 | @override 27 | bool shouldReclip(CustomClipper oldClipper) => false; 28 | } 29 | -------------------------------------------------------------------------------- /lib/ui/widgets/about_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/utils/uidata.dart'; 3 | 4 | class MyAboutTile extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return AboutListTile( 8 | applicationIcon: FlutterLogo( 9 | colors: Colors.yellow, 10 | ), 11 | icon: FlutterLogo( 12 | colors: Colors.yellow, 13 | ), 14 | aboutBoxChildren: [ 15 | SizedBox( 16 | height: 10.0, 17 | ), 18 | Text( 19 | "Developed By Pawan Kumar", 20 | ), 21 | Text( 22 | "MTechViral", 23 | ), 24 | ], 25 | applicationName: UIData.appName, 26 | applicationVersion: "1.0.1", 27 | applicationLegalese: "Apache License 2.0", 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/ui/widgets/api_subscription.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_uikit/model/fetch_process.dart'; 5 | import 'package:flutter_uikit/ui/widgets/common_dialogs.dart'; 6 | import 'package:flutter_uikit/utils/uidata.dart'; 7 | import 'package:font_awesome_flutter/font_awesome_flutter.dart'; 8 | 9 | apiSubscription(Stream apiResult, BuildContext context) { 10 | apiResult.listen((FetchProcess p) { 11 | if (p.loading) { 12 | showProgress(context); 13 | } else { 14 | hideProgress(context); 15 | if (p.response.success == false) { 16 | fetchApiResult(context, p.response); 17 | } else { 18 | switch (p.type) { 19 | case ApiType.performLogin: 20 | showSuccess(context, UIData.success, FontAwesomeIcons.check); 21 | break; 22 | case ApiType.getProductInfo: 23 | break; 24 | case ApiType.performOTP: 25 | break; 26 | } 27 | } 28 | } 29 | }); 30 | } 31 | 32 | // void afterLogin(FetchProcess p, BuildContext context) { 33 | // NetworkServiceResponse res = p.response; 34 | // ISRData.prefs.setString(ISRData.pref_auth_token, res.content.data.authToken); 35 | // ISRData.prefs.setString(ISRData.pref_user_id, res.content.data.userId); 36 | // ISRData.prefs.setBool(ISRData.pref_logged_in, true); 37 | // Navigator.of(context).pushReplacementNamed(ISRData.homeRoute); 38 | // } 39 | -------------------------------------------------------------------------------- /lib/ui/widgets/common_dialogs.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/services/network_service_response.dart'; 3 | import 'package:flutter_uikit/utils/uidata.dart'; 4 | 5 | fetchApiResult(BuildContext context, NetworkServiceResponse snapshot) { 6 | showDialog( 7 | context: context, 8 | builder: (context) => AlertDialog( 9 | title: Text(UIData.error), 10 | content: Text(snapshot.message), 11 | actions: [ 12 | FlatButton( 13 | child: Text(UIData.ok), 14 | onPressed: () => Navigator.pop(context), 15 | ) 16 | ], 17 | ), 18 | ); 19 | } 20 | 21 | showSuccess(BuildContext context, String message, IconData icon) { 22 | showDialog( 23 | context: context, 24 | builder: (context) => Center( 25 | child: Material( 26 | borderRadius: BorderRadius.circular(8.0), 27 | color: Colors.black, 28 | elevation: 5.0, 29 | child: Padding( 30 | padding: const EdgeInsets.all(32.0), 31 | child: Column( 32 | mainAxisAlignment: MainAxisAlignment.center, 33 | mainAxisSize: MainAxisSize.min, 34 | children: [ 35 | Icon( 36 | icon, 37 | color: Colors.green, 38 | ), 39 | SizedBox( 40 | height: 10.0, 41 | ), 42 | Text( 43 | message, 44 | style: TextStyle( 45 | fontFamily: UIData.ralewayFont, color: Colors.white), 46 | ) 47 | ], 48 | ), 49 | ), 50 | ), 51 | )); 52 | } 53 | 54 | showProgress(BuildContext context) { 55 | showDialog( 56 | context: context, 57 | barrierDismissible: false, 58 | builder: (context) => Center( 59 | child: CircularProgressIndicator( 60 | backgroundColor: Colors.yellow, 61 | ), 62 | )); 63 | } 64 | 65 | hideProgress(BuildContext context) { 66 | Navigator.pop(context); 67 | } 68 | -------------------------------------------------------------------------------- /lib/ui/widgets/common_divider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CommonDivider extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return Divider( 7 | color: Colors.grey.shade300, 8 | height: 8.0, 9 | ); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/ui/widgets/common_drawer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/ui/widgets/about_tile.dart'; 3 | import 'package:flutter_uikit/utils/uidata.dart'; 4 | 5 | class CommonDrawer extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Drawer( 9 | child: ListView( 10 | padding: EdgeInsets.zero, 11 | children: [ 12 | UserAccountsDrawerHeader( 13 | accountName: Text( 14 | "Pawan Kumar", 15 | ), 16 | accountEmail: Text( 17 | "mtechviral@gmail.com", 18 | ), 19 | currentAccountPicture: new CircleAvatar( 20 | backgroundImage: new AssetImage(UIData.pkImage), 21 | ), 22 | ), 23 | new ListTile( 24 | title: Text( 25 | "Profile", 26 | style: TextStyle(fontWeight: FontWeight.w700, fontSize: 18.0), 27 | ), 28 | leading: Icon( 29 | Icons.person, 30 | color: Colors.blue, 31 | ), 32 | ), 33 | new ListTile( 34 | title: Text( 35 | "Shopping", 36 | style: TextStyle(fontWeight: FontWeight.w700, fontSize: 18.0), 37 | ), 38 | leading: Icon( 39 | Icons.shopping_cart, 40 | color: Colors.green, 41 | ), 42 | ), 43 | new ListTile( 44 | title: Text( 45 | "Dashboard", 46 | style: TextStyle(fontWeight: FontWeight.w700, fontSize: 18.0), 47 | ), 48 | leading: Icon( 49 | Icons.dashboard, 50 | color: Colors.red, 51 | ), 52 | ), 53 | new ListTile( 54 | title: Text( 55 | "Timeline", 56 | style: TextStyle(fontWeight: FontWeight.w700, fontSize: 18.0), 57 | ), 58 | leading: Icon( 59 | Icons.timeline, 60 | color: Colors.cyan, 61 | ), 62 | ), 63 | Divider(), 64 | new ListTile( 65 | title: Text( 66 | "Settings", 67 | style: TextStyle(fontWeight: FontWeight.w700, fontSize: 18.0), 68 | ), 69 | leading: Icon( 70 | Icons.settings, 71 | color: Colors.brown, 72 | ), 73 | ), 74 | Divider(), 75 | MyAboutTile() 76 | ], 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/ui/widgets/common_scaffold.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/ui/widgets/common_drawer.dart'; 3 | import 'package:flutter_uikit/ui/widgets/custom_float.dart'; 4 | import 'package:flutter_uikit/utils/uidata.dart'; 5 | 6 | class CommonScaffold extends StatelessWidget { 7 | final appTitle; 8 | final Widget bodyData; 9 | final showFAB; 10 | final showDrawer; 11 | final backGroundColor; 12 | final actionFirstIcon; 13 | final scaffoldKey; 14 | final showBottomNav; 15 | final floatingIcon; 16 | final centerDocked; 17 | final elevation; 18 | 19 | CommonScaffold( 20 | {this.appTitle, 21 | this.bodyData, 22 | this.showFAB = false, 23 | this.showDrawer = false, 24 | this.backGroundColor, 25 | this.actionFirstIcon = Icons.search, 26 | this.scaffoldKey, 27 | this.showBottomNav = false, 28 | this.centerDocked = false, 29 | this.floatingIcon, 30 | this.elevation = 4.0}); 31 | 32 | Widget myBottomBar() => BottomAppBar( 33 | clipBehavior: Clip.antiAlias, 34 | shape: CircularNotchedRectangle(), 35 | child: Ink( 36 | height: 50.0, 37 | decoration: new BoxDecoration( 38 | gradient: new LinearGradient(colors: UIData.kitGradients)), 39 | child: new Row( 40 | mainAxisAlignment: MainAxisAlignment.spaceAround, 41 | crossAxisAlignment: CrossAxisAlignment.center, 42 | children: [ 43 | SizedBox( 44 | height: double.infinity, 45 | child: new InkWell( 46 | radius: 10.0, 47 | splashColor: Colors.yellow, 48 | onTap: () {}, 49 | child: Center( 50 | child: new Text( 51 | "ADD TO WISHLIST", 52 | style: new TextStyle( 53 | fontSize: 12.0, 54 | fontWeight: FontWeight.bold, 55 | color: Colors.white), 56 | ), 57 | ), 58 | ), 59 | ), 60 | new SizedBox( 61 | width: 20.0, 62 | ), 63 | SizedBox( 64 | height: double.infinity, 65 | child: new InkWell( 66 | onTap: () {}, 67 | radius: 10.0, 68 | splashColor: Colors.yellow, 69 | child: Center( 70 | child: new Text( 71 | "ORDER PAGE", 72 | style: new TextStyle( 73 | fontSize: 12.0, 74 | fontWeight: FontWeight.bold, 75 | color: Colors.white), 76 | ), 77 | ), 78 | ), 79 | ), 80 | ], 81 | ), 82 | ), 83 | ); 84 | 85 | @override 86 | Widget build(BuildContext context) { 87 | return Scaffold( 88 | key: scaffoldKey != null ? scaffoldKey : null, 89 | backgroundColor: backGroundColor != null ? backGroundColor : null, 90 | appBar: AppBar( 91 | elevation: elevation, 92 | backgroundColor: Colors.black, 93 | title: Text(appTitle), 94 | actions: [ 95 | SizedBox( 96 | width: 5.0, 97 | ), 98 | IconButton( 99 | onPressed: () {}, 100 | icon: Icon(actionFirstIcon), 101 | ), 102 | IconButton( 103 | onPressed: () {}, 104 | icon: Icon(Icons.more_vert), 105 | ) 106 | ], 107 | ), 108 | drawer: showDrawer ? CommonDrawer() : null, 109 | body: bodyData, 110 | floatingActionButton: showFAB 111 | ? CustomFloat( 112 | builder: centerDocked 113 | ? Text( 114 | "5", 115 | style: TextStyle(color: Colors.white, fontSize: 10.0), 116 | ) 117 | : null, 118 | icon: floatingIcon, 119 | qrCallback: () {}, 120 | ) 121 | : null, 122 | floatingActionButtonLocation: centerDocked 123 | ? FloatingActionButtonLocation.centerDocked 124 | : FloatingActionButtonLocation.endFloat, 125 | bottomNavigationBar: showBottomNav ? myBottomBar() : null, 126 | ); 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /lib/ui/widgets/common_switch.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | 5 | class CommonSwitch extends StatelessWidget { 6 | final defValue; 7 | CommonSwitch({this.defValue = false}); 8 | @override 9 | Widget build(BuildContext context) { 10 | return defaultTargetPlatform == TargetPlatform.android 11 | ? Switch( 12 | value: defValue, 13 | onChanged: (val) {}, 14 | ) 15 | : CupertinoSwitch( 16 | value: defValue, 17 | onChanged: (val) {}, 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/ui/widgets/custom_float.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/utils/uidata.dart'; 3 | 4 | class CustomFloat extends StatelessWidget { 5 | final IconData icon; 6 | final Widget builder; 7 | final VoidCallback qrCallback; 8 | final isMini; 9 | 10 | CustomFloat({this.icon, this.builder, this.qrCallback, this.isMini = false}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return FloatingActionButton( 15 | clipBehavior: Clip.antiAlias, 16 | mini: isMini, 17 | onPressed: qrCallback, 18 | child: Ink( 19 | decoration: new BoxDecoration( 20 | gradient: new LinearGradient(colors: UIData.kitGradients)), 21 | child: Stack( 22 | fit: StackFit.expand, 23 | children: [ 24 | Icon( 25 | icon, 26 | color: Colors.white, 27 | ), 28 | builder != null 29 | ? Positioned( 30 | right: 7.0, 31 | top: 7.0, 32 | child: CircleAvatar( 33 | backgroundColor: Colors.red, 34 | child: builder, 35 | radius: 10.0, 36 | ), 37 | ) 38 | : Container(), 39 | // builder 40 | ], 41 | ), 42 | ), 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/ui/widgets/gradient_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/utils/uidata.dart'; 3 | 4 | class GradientButton extends StatelessWidget { 5 | final GestureTapCallback onPressed; 6 | final String text; 7 | 8 | GradientButton({@required this.onPressed, @required this.text}); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Material( 13 | elevation: 10.0, 14 | color: Colors.transparent, 15 | shape: const StadiumBorder(), 16 | child: InkWell( 17 | onTap: onPressed, 18 | splashColor: Colors.yellow, 19 | child: Ink( 20 | height: 50.0, 21 | decoration: ShapeDecoration( 22 | shape: const StadiumBorder(), 23 | gradient: LinearGradient( 24 | colors: UIData.kitGradients, 25 | )), 26 | child: Center( 27 | child: Text( 28 | text, 29 | textAlign: TextAlign.center, 30 | style: TextStyle( 31 | color: Colors.white, 32 | fontWeight: FontWeight.normal, 33 | fontSize: 20.0), 34 | ), 35 | ), 36 | ), 37 | ), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/ui/widgets/label_below_icon.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/utils/uidata.dart'; 3 | 4 | class LabelBelowIcon extends StatelessWidget { 5 | final label; 6 | final IconData icon; 7 | final iconColor; 8 | final onPressed; 9 | final circleColor; 10 | final isCircleEnabled; 11 | final betweenHeight; 12 | 13 | LabelBelowIcon( 14 | {this.label, 15 | this.icon, 16 | this.onPressed, 17 | this.iconColor = Colors.white, 18 | this.circleColor, 19 | this.isCircleEnabled = true, 20 | this.betweenHeight = 5.0}); 21 | @override 22 | Widget build(BuildContext context) { 23 | return InkWell( 24 | onTap: () => onPressed, 25 | child: Column( 26 | mainAxisAlignment: MainAxisAlignment.center, 27 | crossAxisAlignment: CrossAxisAlignment.center, 28 | children: [ 29 | isCircleEnabled 30 | ? CircleAvatar( 31 | backgroundColor: circleColor, 32 | radius: 20.0, 33 | child: Icon( 34 | icon, 35 | size: 12.0, 36 | color: iconColor, 37 | ), 38 | ) 39 | : Icon( 40 | icon, 41 | size: 23.0, 42 | color: iconColor, 43 | ), 44 | SizedBox( 45 | height: betweenHeight, 46 | ), 47 | Text( 48 | label, 49 | textAlign: TextAlign.center, 50 | style: TextStyle(fontFamily: UIData.ralewayFont), 51 | ) 52 | ], 53 | ), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/ui/widgets/label_icon.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LabelIcon extends StatelessWidget { 4 | final label; 5 | final icon; 6 | final iconColor; 7 | final onPressed; 8 | 9 | LabelIcon( 10 | {this.label, this.icon, this.onPressed, this.iconColor = Colors.grey}); 11 | @override 12 | Widget build(BuildContext context) { 13 | return InkWell( 14 | onTap: () => onPressed, 15 | child: Row( 16 | children: [ 17 | Icon( 18 | icon, 19 | color: iconColor, 20 | ), 21 | SizedBox( 22 | width: 5.0, 23 | ), 24 | Text( 25 | label, 26 | style: TextStyle(fontWeight: FontWeight.w700), 27 | ) 28 | ], 29 | ), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/ui/widgets/login_background.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_uikit/ui/tools/arc_clipper.dart'; 3 | import 'package:flutter_uikit/utils/uidata.dart'; 4 | 5 | class LoginBackground extends StatelessWidget { 6 | final showIcon; 7 | final image; 8 | LoginBackground({this.showIcon = true, this.image}); 9 | 10 | Widget topHalf(BuildContext context) { 11 | var deviceSize = MediaQuery.of(context).size; 12 | return new Flexible( 13 | flex: 2, 14 | child: ClipPath( 15 | clipper: new ArcClipper(), 16 | child: Stack( 17 | children: [ 18 | new Container( 19 | decoration: new BoxDecoration( 20 | gradient: new LinearGradient( 21 | colors: UIData.kitGradients, 22 | )), 23 | ), 24 | showIcon 25 | ? new Center( 26 | child: SizedBox( 27 | height: deviceSize.height / 8, 28 | width: deviceSize.width / 2, 29 | child: FlutterLogo( 30 | colors: Colors.yellow, 31 | )), 32 | ) 33 | : new Container( 34 | width: double.infinity, 35 | child: image != null 36 | ? Image.network( 37 | image, 38 | fit: BoxFit.cover, 39 | ) 40 | : new Container()) 41 | ], 42 | ), 43 | ), 44 | ); 45 | } 46 | 47 | final bottomHalf = new Flexible( 48 | flex: 3, 49 | child: new Container(), 50 | ); 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | return new Column( 55 | children: [topHalf(context), bottomHalf], 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/ui/widgets/profile_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ProfileTile extends StatelessWidget { 4 | final title; 5 | final subtitle; 6 | final textColor; 7 | ProfileTile({this.title, this.subtitle, this.textColor = Colors.black}); 8 | @override 9 | Widget build(BuildContext context) { 10 | return Column( 11 | // crossAxisAlignment: CrossAxisAlignment.start, 12 | mainAxisAlignment: MainAxisAlignment.center, 13 | children: [ 14 | Text( 15 | title, 16 | style: TextStyle( 17 | fontSize: 20.0, fontWeight: FontWeight.w700, color: textColor), 18 | ), 19 | SizedBox( 20 | height: 5.0, 21 | ), 22 | Text( 23 | subtitle, 24 | style: TextStyle( 25 | fontSize: 15.0, fontWeight: FontWeight.normal, color: textColor), 26 | ), 27 | ], 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/utils/translations.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:convert'; 3 | 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/services.dart' show rootBundle; 6 | 7 | class Translations { 8 | Translations(Locale locale) { 9 | this.locale = locale; 10 | _localizedValues = null; 11 | } 12 | 13 | Locale locale; 14 | static Map _localizedValues; 15 | 16 | static Translations of(BuildContext context) { 17 | return Localizations.of(context, Translations); 18 | } 19 | 20 | String text(String key) { 21 | return _localizedValues[key] ?? '** $key not found'; 22 | } 23 | 24 | static Future load(Locale locale) async { 25 | Translations translations = new Translations(locale); 26 | String jsonContent = 27 | await rootBundle.loadString("locale/i18n_${locale.languageCode}.json"); 28 | _localizedValues = json.decode(jsonContent); 29 | return translations; 30 | } 31 | 32 | get currentLanguage => locale.languageCode; 33 | } 34 | 35 | class TranslationsDelegate extends LocalizationsDelegate { 36 | const TranslationsDelegate(); 37 | 38 | @override 39 | bool isSupported(Locale locale) => ['en', 'hi'].contains(locale.languageCode); 40 | 41 | @override 42 | Future load(Locale locale) => Translations.load(locale); 43 | 44 | @override 45 | bool shouldReload(TranslationsDelegate old) => false; 46 | } 47 | -------------------------------------------------------------------------------- /lib/utils/uidata.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | import 'dart:ui'; 3 | 4 | import 'package:flutter/material.dart'; 5 | 6 | class UIData { 7 | //routes 8 | static const String homeRoute = "/home"; 9 | static const String profileOneRoute = "/View Profile"; 10 | static const String profileTwoRoute = "/Profile 2"; 11 | static const String notFoundRoute = "/No Search Result"; 12 | static const String timelineOneRoute = "/Feed"; 13 | static const String timelineTwoRoute = "/Tweets"; 14 | static const String settingsOneRoute = "/Device Settings"; 15 | static const String shoppingOneRoute = "/Shopping List"; 16 | static const String shoppingTwoRoute = "/Shopping Details"; 17 | static const String shoppingThreeRoute = "/Product Details"; 18 | static const String paymentOneRoute = "/Credit Card"; 19 | static const String paymentTwoRoute = "/Payment Success"; 20 | static const String loginOneRoute = "/Login With OTP"; 21 | static const String loginTwoRoute = "/Login 2"; 22 | static const String dashboardOneRoute = "/Dashboard 1"; 23 | static const String dashboardTwoRoute = "/Dashboard 2"; 24 | 25 | //strings 26 | static const String appName = "Flutter UIKit"; 27 | 28 | //fonts 29 | static const String quickFont = "Quicksand"; 30 | static const String ralewayFont = "Raleway"; 31 | static const String quickBoldFont = "Quicksand_Bold.otf"; 32 | static const String quickNormalFont = "Quicksand_Book.otf"; 33 | static const String quickLightFont = "Quicksand_Light.otf"; 34 | 35 | //images 36 | static const String imageDir = "assets/images"; 37 | static const String pkImage = "$imageDir/pk.jpg"; 38 | static const String profileImage = "$imageDir/profile.jpg"; 39 | static const String blankImage = "$imageDir/blank.jpg"; 40 | static const String dashboardImage = "$imageDir/dashboard.jpg"; 41 | static const String loginImage = "$imageDir/login.jpg"; 42 | static const String paymentImage = "$imageDir/payment.jpg"; 43 | static const String settingsImage = "$imageDir/setting.jpeg"; 44 | static const String shoppingImage = "$imageDir/shopping.jpeg"; 45 | static const String timelineImage = "$imageDir/timeline.jpeg"; 46 | static const String verifyImage = "$imageDir/verification.jpg"; 47 | 48 | //login 49 | static const String enter_code_label = "Phone Number"; 50 | static const String enter_code_hint = "10 Digit Phone Number"; 51 | static const String enter_otp_label = "OTP"; 52 | static const String enter_otp_hint = "4 Digit OTP"; 53 | static const String get_otp = "Get OTP"; 54 | static const String resend_otp = "Resend OTP"; 55 | static const String login = "Login"; 56 | static const String enter_valid_number = "Enter 10 digit phone number"; 57 | static const String enter_valid_otp = "Enter 4 digit otp"; 58 | 59 | //gneric 60 | static const String error = "Error"; 61 | static const String success = "Success"; 62 | static const String ok = "OK"; 63 | static const String forgot_password = "Forgot Password?"; 64 | static const String something_went_wrong = "Something went wrong"; 65 | static const String coming_soon = "Coming Soon"; 66 | 67 | static const MaterialColor ui_kit_color = Colors.grey; 68 | 69 | //colors 70 | static List kitGradients = [ 71 | // new Color.fromRGBO(103, 218, 255, 1.0), 72 | // new Color.fromRGBO(3, 169, 244, 1.0), 73 | // new Color.fromRGBO(0, 122, 193, 1.0), 74 | Colors.blueGrey.shade800, 75 | Colors.black87, 76 | ]; 77 | static List kitGradients2 = [ 78 | Colors.cyan.shade600, 79 | Colors.blue.shade900 80 | ]; 81 | 82 | //randomcolor 83 | static final Random _random = new Random(); 84 | 85 | /// Returns a random color. 86 | static Color next() { 87 | return new Color(0xFF000000 + _random.nextInt(0x00FFFFFF)); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /locale/i18n_en.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_name":"Flutter UI-Kit ", 3 | "enter_code_label":"Phone Number", 4 | "enter_code_hint":"10 Digit Phone Number", 5 | "enter_otp_label":"OTP", 6 | "enter_otp_hint":"4 Digit OTP", 7 | "get_otp":"Get OTP", 8 | "resend_otp":"Resend OTP", 9 | "login":"Login", 10 | "enter_valid_number":"Enter 10 digit phone number", 11 | "enter_valid_otp":"Enter 4 digit otp" 12 | } 13 | -------------------------------------------------------------------------------- /locale/i18n_hi.json: -------------------------------------------------------------------------------- 1 | { 2 | "app_name":"फ़्लटर यूआई-किट ", 3 | "enter_code_label":"फ़ोन नम्बर", 4 | "enter_code_hint":"10 डिजिट का फ़ोन नम्बर ", 5 | "enter_otp_label":"ओ टी पी", 6 | "enter_otp_hint":"4 डिजिट ओ टी पी", 7 | "get_otp":"ओ टी पी मँगायें ", 8 | "resend_otp":"ओ टी पी दुबारा मँगायें", 9 | "login":"लॉगिन", 10 | "enter_valid_number":"10 डिजिट का ही नम्बर डालें", 11 | "enter_valid_otp":"4 डिजिट का ही ओ टी पी डालें" 12 | } 13 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.1.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.0.4" 18 | charcode: 19 | dependency: transitive 20 | description: 21 | name: charcode 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.2" 25 | collection: 26 | dependency: transitive 27 | description: 28 | name: collection 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.14.11" 32 | cupertino_icons: 33 | dependency: "direct main" 34 | description: 35 | name: cupertino_icons 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "0.1.2" 39 | flutter: 40 | dependency: "direct main" 41 | description: flutter 42 | source: sdk 43 | version: "0.0.0" 44 | flutter_localizations: 45 | dependency: "direct main" 46 | description: flutter 47 | source: sdk 48 | version: "0.0.0" 49 | flutter_masked_text: 50 | dependency: "direct main" 51 | description: 52 | name: flutter_masked_text 53 | url: "https://pub.dartlang.org" 54 | source: hosted 55 | version: "0.8.0" 56 | flutter_test: 57 | dependency: "direct dev" 58 | description: flutter 59 | source: sdk 60 | version: "0.0.0" 61 | font_awesome_flutter: 62 | dependency: "direct main" 63 | description: 64 | name: font_awesome_flutter 65 | url: "https://pub.dartlang.org" 66 | source: hosted 67 | version: "8.0.1" 68 | http: 69 | dependency: "direct main" 70 | description: 71 | name: http 72 | url: "https://pub.dartlang.org" 73 | source: hosted 74 | version: "0.12.0+1" 75 | http_parser: 76 | dependency: transitive 77 | description: 78 | name: http_parser 79 | url: "https://pub.dartlang.org" 80 | source: hosted 81 | version: "3.1.3" 82 | intl: 83 | dependency: transitive 84 | description: 85 | name: intl 86 | url: "https://pub.dartlang.org" 87 | source: hosted 88 | version: "0.15.8" 89 | matcher: 90 | dependency: transitive 91 | description: 92 | name: matcher 93 | url: "https://pub.dartlang.org" 94 | source: hosted 95 | version: "0.12.5" 96 | meta: 97 | dependency: transitive 98 | description: 99 | name: meta 100 | url: "https://pub.dartlang.org" 101 | source: hosted 102 | version: "1.1.6" 103 | path: 104 | dependency: transitive 105 | description: 106 | name: path 107 | url: "https://pub.dartlang.org" 108 | source: hosted 109 | version: "1.6.2" 110 | pedantic: 111 | dependency: transitive 112 | description: 113 | name: pedantic 114 | url: "https://pub.dartlang.org" 115 | source: hosted 116 | version: "1.5.0" 117 | quiver: 118 | dependency: transitive 119 | description: 120 | name: quiver 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "2.0.2" 124 | random_pk: 125 | dependency: "direct dev" 126 | description: 127 | name: random_pk 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "0.0.3" 131 | rxdart: 132 | dependency: "direct main" 133 | description: 134 | name: rxdart 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "0.21.0" 138 | sky_engine: 139 | dependency: transitive 140 | description: flutter 141 | source: sdk 142 | version: "0.0.99" 143 | source_span: 144 | dependency: transitive 145 | description: 146 | name: source_span 147 | url: "https://pub.dartlang.org" 148 | source: hosted 149 | version: "1.5.5" 150 | stack_trace: 151 | dependency: transitive 152 | description: 153 | name: stack_trace 154 | url: "https://pub.dartlang.org" 155 | source: hosted 156 | version: "1.9.3" 157 | stream_channel: 158 | dependency: transitive 159 | description: 160 | name: stream_channel 161 | url: "https://pub.dartlang.org" 162 | source: hosted 163 | version: "2.0.0" 164 | string_scanner: 165 | dependency: transitive 166 | description: 167 | name: string_scanner 168 | url: "https://pub.dartlang.org" 169 | source: hosted 170 | version: "1.0.4" 171 | term_glyph: 172 | dependency: transitive 173 | description: 174 | name: term_glyph 175 | url: "https://pub.dartlang.org" 176 | source: hosted 177 | version: "1.1.0" 178 | test_api: 179 | dependency: transitive 180 | description: 181 | name: test_api 182 | url: "https://pub.dartlang.org" 183 | source: hosted 184 | version: "0.2.4" 185 | typed_data: 186 | dependency: transitive 187 | description: 188 | name: typed_data 189 | url: "https://pub.dartlang.org" 190 | source: hosted 191 | version: "1.1.6" 192 | vector_math: 193 | dependency: transitive 194 | description: 195 | name: vector_math 196 | url: "https://pub.dartlang.org" 197 | source: hosted 198 | version: "2.0.8" 199 | sdks: 200 | dart: ">=2.2.0 <3.0.0" 201 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_uikit 2 | description: A new Flutter project. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # Read more about versioning at semver.org. 10 | version: 1.0.1+2 11 | 12 | dependencies: 13 | flutter: 14 | sdk: flutter 15 | 16 | # The following adds the Cupertino Icons font to your application. 17 | # Use with the CupertinoIcons class for iOS style icons. 18 | cupertino_icons: ^0.1.2 19 | font_awesome_flutter: 20 | http: ^0.12.0+1 21 | rxdart: ^0.21.0 22 | flutter_masked_text: ^0.8.0 23 | flutter_localizations: 24 | sdk: flutter 25 | 26 | dev_dependencies: 27 | random_pk: 28 | flutter_test: 29 | sdk: flutter 30 | 31 | # For information on the generic Dart part of this file, see the 32 | # following page: https://www.dartlang.org/tools/pub/pubspec 33 | 34 | # The following section is specific to Flutter. 35 | flutter: 36 | # The following line ensures that the Material Icons font is 37 | # included with your application, so that you can use the icons in 38 | # the material Icons class. 39 | uses-material-design: true 40 | 41 | # To add assets to your application, add an assets section, like this: 42 | assets: 43 | - assets/images/ 44 | - locale/i18n_en.json 45 | - locale/i18n_hi.json 46 | # - images/a_dot_ham.jpeg 47 | 48 | # An image asset can refer to one or more resolution-specific "variants", see 49 | # https://flutter.io/assets-and-images/#resolution-aware. 50 | 51 | # For details regarding adding assets from package dependencies, see 52 | # https://flutter.io/assets-and-images/#from-packages 53 | 54 | # To add custom fonts to your application, add a fonts section here, 55 | # in this "flutter" section. Each entry in this list should have a 56 | # "family" key with the font family name, and a "fonts" key with a 57 | # list giving the asset and other descriptors for the font. For 58 | # example: 59 | fonts: 60 | - family: Quicksand 61 | fonts: 62 | - asset: assets/fonts/Quicksand-Medium.ttf 63 | style: normal 64 | - asset: assets/fonts/Quicksand_Bold.otf 65 | weight: 700 66 | 67 | - family: Raleway 68 | fonts: 69 | - asset: assets/fonts/Raleway-Regular.ttf 70 | style: normal 71 | - asset: assets/fonts/Raleway-Medium.ttf 72 | # 73 | # For details regarding fonts from package dependencies, 74 | # see https://flutter.io/custom-fonts/#from-packages 75 | -------------------------------------------------------------------------------- /raw/flutter_uikit_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/flutter_uikit_top.png -------------------------------------------------------------------------------- /raw/fu1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/fu1.png -------------------------------------------------------------------------------- /raw/fu10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/fu10.png -------------------------------------------------------------------------------- /raw/fu11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/fu11.png -------------------------------------------------------------------------------- /raw/fu12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/fu12.png -------------------------------------------------------------------------------- /raw/fu2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/fu2.png -------------------------------------------------------------------------------- /raw/fu3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/fu3.png -------------------------------------------------------------------------------- /raw/fu4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/fu4.png -------------------------------------------------------------------------------- /raw/fu5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/fu5.png -------------------------------------------------------------------------------- /raw/fu6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/fu6.png -------------------------------------------------------------------------------- /raw/fu7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/fu7.png -------------------------------------------------------------------------------- /raw/fu8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/fu8.png -------------------------------------------------------------------------------- /raw/fu9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/Flutter-UI-Kit/04dc321f7a6e909904cfeb7f9782ac9afbae0078/raw/fu9.png -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter 3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to 4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties 5 | // are correct. 6 | 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_test/flutter_test.dart'; 9 | 10 | import 'package:flutter_uikit/myapp.dart'; 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(new MyApp()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | --------------------------------------------------------------------------------