├── .gitignore ├── .metadata ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── assignment │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── apk └── app-release.apk ├── assets └── lottiefile │ └── splashlogo.json ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── application │ └── shopdata │ │ ├── shopdata_bloc.dart │ │ ├── shopdata_bloc.freezed.dart │ │ ├── shopdata_event.dart │ │ └── shopdata_state.dart ├── domain │ └── i_shopdata_repository.dart ├── infrastructure │ └── shopdata │ │ ├── data_entity.dart │ │ ├── detail.dart │ │ ├── longDescription.dart │ │ └── shopdata_repository.dart ├── injection.config.dart ├── injection.dart ├── main.dart └── presentation │ ├── core │ ├── assignmentapp.dart │ ├── empty.dart │ ├── failure.dart │ └── loading.dart │ ├── pages │ ├── detailpage.dart │ ├── homepage.dart │ └── widgets │ │ ├── product_details.dart │ │ ├── shirtBox.dart │ │ └── sizechart_card.dart │ ├── routes │ ├── router.dart │ └── router.gr.dart │ ├── splash │ └── splashscreen.dart │ └── theme │ └── theme.dart ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart └── web ├── favicon.png ├── icons ├── Icon-192.png └── Icon-512.png ├── index.html └── manifest.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 0941968447ea8058e56e1479f7e53147149b739e 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FLutter E-commerce app Template 2 | 3 | This is a Flutter Web,ios,Android Ecommerce app Template by using 4 | BLoC+DDD ❤ 5 | 6 | Some ScreenShots: 7 | 8 | 2021-04-19 (1) 9 | 10 | 2021-04-19 (2) 11 | 12 | 2021-04-19 13 | 14 | 2021-04-19 (3) 15 | 16 | 17 | This project is a starting point for a Flutter application. 18 | 19 | A few resources to get you started if this is your first Flutter project: 20 | 21 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 22 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 23 | 24 | For help getting started with Flutter, view our 25 | [online documentation](https://flutter.dev/docs), which offers tutorials, 26 | samples, guidance on mobile development, and a full API reference. 27 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 30 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | defaultConfig { 36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 37 | applicationId "com.example.assignment" 38 | minSdkVersion 16 39 | targetSdkVersion 30 40 | versionCode flutterVersionCode.toInteger() 41 | versionName flutterVersionName 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 59 | } 60 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 9 | 16 | 20 | 24 | 29 | 33 | 34 | 35 | 36 | 37 | 38 | 40 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/assignment/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.assignment 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | 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.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /apk/app-release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/apk/app-release.apk -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/ephemeral/ 22 | Flutter/app.flx 23 | Flutter/app.zip 24 | Flutter/flutter_assets/ 25 | Flutter/flutter_export_environment.sh 26 | ServiceDefinitions.json 27 | Runner/GeneratedPluginRegistrant.* 28 | 29 | # Exceptions to above rules. 30 | !default.mode1v3 31 | !default.mode2v3 32 | !default.pbxuser 33 | !default.perspectivev3 34 | -------------------------------------------------------------------------------- /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 "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1020; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | ENABLE_BITCODE = NO; 292 | INFOPLIST_FILE = Runner/Info.plist; 293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 294 | PRODUCT_BUNDLE_IDENTIFIER = com.example.assignment; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 297 | SWIFT_VERSION = 5.0; 298 | VERSIONING_SYSTEM = "apple-generic"; 299 | }; 300 | name = Profile; 301 | }; 302 | 97C147031CF9000F007C117D /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_COMMA = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNREACHABLE_CODE = YES; 329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = dwarf; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | ENABLE_TESTABILITY = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_DYNAMIC_NO_PIC = NO; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 350 | MTL_ENABLE_DEBUG_INFO = YES; 351 | ONLY_ACTIVE_ARCH = YES; 352 | SDKROOT = iphoneos; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | }; 355 | name = Debug; 356 | }; 357 | 97C147041CF9000F007C117D /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ALWAYS_SEARCH_USER_PATHS = NO; 361 | CLANG_ANALYZER_NONNULL = YES; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 367 | CLANG_WARN_BOOL_CONVERSION = YES; 368 | CLANG_WARN_COMMA = YES; 369 | CLANG_WARN_CONSTANT_CONVERSION = YES; 370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 372 | CLANG_WARN_EMPTY_BODY = YES; 373 | CLANG_WARN_ENUM_CONVERSION = YES; 374 | CLANG_WARN_INFINITE_RECURSION = YES; 375 | CLANG_WARN_INT_CONVERSION = YES; 376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 381 | CLANG_WARN_STRICT_PROTOTYPES = YES; 382 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SUPPORTED_PLATFORMS = iphoneos; 402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 403 | TARGETED_DEVICE_FAMILY = "1,2"; 404 | VALIDATE_PRODUCT = YES; 405 | }; 406 | name = Release; 407 | }; 408 | 97C147061CF9000F007C117D /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | CLANG_ENABLE_MODULES = YES; 414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 415 | ENABLE_BITCODE = NO; 416 | INFOPLIST_FILE = Runner/Info.plist; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 418 | PRODUCT_BUNDLE_IDENTIFIER = com.example.assignment; 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | SWIFT_VERSION = 5.0; 423 | VERSIONING_SYSTEM = "apple-generic"; 424 | }; 425 | name = Debug; 426 | }; 427 | 97C147071CF9000F007C117D /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | INFOPLIST_FILE = Runner/Info.plist; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 437 | PRODUCT_BUNDLE_IDENTIFIER = com.example.assignment; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 440 | SWIFT_VERSION = 5.0; 441 | VERSIONING_SYSTEM = "apple-generic"; 442 | }; 443 | name = Release; 444 | }; 445 | /* End XCBuildConfiguration section */ 446 | 447 | /* Begin XCConfigurationList section */ 448 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | 97C147031CF9000F007C117D /* Debug */, 452 | 97C147041CF9000F007C117D /* Release */, 453 | 249021D3217E4FDB00AE95B9 /* Profile */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147061CF9000F007C117D /* Debug */, 462 | 97C147071CF9000F007C117D /* Release */, 463 | 249021D4217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | /* End XCConfigurationList section */ 469 | }; 470 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 471 | } 472 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/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/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | assignment 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/application/shopdata/shopdata_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:assignment/domain/i_shopdata_repository.dart'; 4 | import 'package:assignment/infrastructure/shopdata/data_entity.dart'; 5 | import 'package:bloc/bloc.dart'; 6 | import 'package:injectable/injectable.dart'; 7 | import 'package:freezed_annotation/freezed_annotation.dart'; 8 | part 'shopdata_event.dart'; 9 | part 'shopdata_state.dart'; 10 | part 'shopdata_bloc.freezed.dart'; 11 | 12 | @injectable 13 | class ShopdataBloc extends Bloc { 14 | final IshopDataRepository _ishopDataRepository; 15 | 16 | ShopdataBloc(this._ishopDataRepository) 17 | : super(const ShopdataState.initial()); 18 | 19 | @override 20 | Stream mapEventToState( 21 | ShopdataEvent event, 22 | ) async* { 23 | yield* event.map( 24 | watchAllProducts: (e) async* { 25 | yield const ShopdataState.loadInProgress(); 26 | List shopdata = await _ishopDataRepository.watchAllProducts(); 27 | 28 | try { 29 | yield ShopdataState.loadSuccess(shopdata); 30 | } catch (e) { 31 | yield ShopdataState.loadFailure(); 32 | } 33 | }, 34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /lib/application/shopdata/shopdata_bloc.freezed.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | // ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides 3 | 4 | part of 'shopdata_bloc.dart'; 5 | 6 | // ************************************************************************** 7 | // FreezedGenerator 8 | // ************************************************************************** 9 | 10 | T _$identity(T value) => value; 11 | 12 | final _privateConstructorUsedError = UnsupportedError( 13 | 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); 14 | 15 | /// @nodoc 16 | class _$ShopdataEventTearOff { 17 | const _$ShopdataEventTearOff(); 18 | 19 | _Started watchAllProducts() { 20 | return const _Started(); 21 | } 22 | } 23 | 24 | /// @nodoc 25 | const $ShopdataEvent = _$ShopdataEventTearOff(); 26 | 27 | /// @nodoc 28 | mixin _$ShopdataEvent { 29 | @optionalTypeArgs 30 | TResult when({ 31 | required TResult Function() watchAllProducts, 32 | }) => 33 | throw _privateConstructorUsedError; 34 | @optionalTypeArgs 35 | TResult maybeWhen({ 36 | TResult Function()? watchAllProducts, 37 | required TResult orElse(), 38 | }) => 39 | throw _privateConstructorUsedError; 40 | @optionalTypeArgs 41 | TResult map({ 42 | required TResult Function(_Started value) watchAllProducts, 43 | }) => 44 | throw _privateConstructorUsedError; 45 | @optionalTypeArgs 46 | TResult maybeMap({ 47 | TResult Function(_Started value)? watchAllProducts, 48 | required TResult orElse(), 49 | }) => 50 | throw _privateConstructorUsedError; 51 | } 52 | 53 | /// @nodoc 54 | abstract class $ShopdataEventCopyWith<$Res> { 55 | factory $ShopdataEventCopyWith( 56 | ShopdataEvent value, $Res Function(ShopdataEvent) then) = 57 | _$ShopdataEventCopyWithImpl<$Res>; 58 | } 59 | 60 | /// @nodoc 61 | class _$ShopdataEventCopyWithImpl<$Res> 62 | implements $ShopdataEventCopyWith<$Res> { 63 | _$ShopdataEventCopyWithImpl(this._value, this._then); 64 | 65 | final ShopdataEvent _value; 66 | // ignore: unused_field 67 | final $Res Function(ShopdataEvent) _then; 68 | } 69 | 70 | /// @nodoc 71 | abstract class _$StartedCopyWith<$Res> { 72 | factory _$StartedCopyWith(_Started value, $Res Function(_Started) then) = 73 | __$StartedCopyWithImpl<$Res>; 74 | } 75 | 76 | /// @nodoc 77 | class __$StartedCopyWithImpl<$Res> extends _$ShopdataEventCopyWithImpl<$Res> 78 | implements _$StartedCopyWith<$Res> { 79 | __$StartedCopyWithImpl(_Started _value, $Res Function(_Started) _then) 80 | : super(_value, (v) => _then(v as _Started)); 81 | 82 | @override 83 | _Started get _value => super._value as _Started; 84 | } 85 | 86 | /// @nodoc 87 | class _$_Started implements _Started { 88 | const _$_Started(); 89 | 90 | @override 91 | String toString() { 92 | return 'ShopdataEvent.watchAllProducts()'; 93 | } 94 | 95 | @override 96 | bool operator ==(dynamic other) { 97 | return identical(this, other) || (other is _Started); 98 | } 99 | 100 | @override 101 | int get hashCode => runtimeType.hashCode; 102 | 103 | @override 104 | @optionalTypeArgs 105 | TResult when({ 106 | required TResult Function() watchAllProducts, 107 | }) { 108 | return watchAllProducts(); 109 | } 110 | 111 | @override 112 | @optionalTypeArgs 113 | TResult maybeWhen({ 114 | TResult Function()? watchAllProducts, 115 | required TResult orElse(), 116 | }) { 117 | if (watchAllProducts != null) { 118 | return watchAllProducts(); 119 | } 120 | return orElse(); 121 | } 122 | 123 | @override 124 | @optionalTypeArgs 125 | TResult map({ 126 | required TResult Function(_Started value) watchAllProducts, 127 | }) { 128 | return watchAllProducts(this); 129 | } 130 | 131 | @override 132 | @optionalTypeArgs 133 | TResult maybeMap({ 134 | TResult Function(_Started value)? watchAllProducts, 135 | required TResult orElse(), 136 | }) { 137 | if (watchAllProducts != null) { 138 | return watchAllProducts(this); 139 | } 140 | return orElse(); 141 | } 142 | } 143 | 144 | abstract class _Started implements ShopdataEvent { 145 | const factory _Started() = _$_Started; 146 | } 147 | 148 | /// @nodoc 149 | class _$ShopdataStateTearOff { 150 | const _$ShopdataStateTearOff(); 151 | 152 | _Initial initial() { 153 | return const _Initial(); 154 | } 155 | 156 | _LoadInProgress loadInProgress() { 157 | return const _LoadInProgress(); 158 | } 159 | 160 | _LoadSuccess loadSuccess(List shopdata) { 161 | return _LoadSuccess( 162 | shopdata, 163 | ); 164 | } 165 | 166 | _LoadFailure loadFailure() { 167 | return const _LoadFailure(); 168 | } 169 | 170 | _Empty empty() { 171 | return const _Empty(); 172 | } 173 | } 174 | 175 | /// @nodoc 176 | const $ShopdataState = _$ShopdataStateTearOff(); 177 | 178 | /// @nodoc 179 | mixin _$ShopdataState { 180 | @optionalTypeArgs 181 | TResult when({ 182 | required TResult Function() initial, 183 | required TResult Function() loadInProgress, 184 | required TResult Function(List shopdata) loadSuccess, 185 | required TResult Function() loadFailure, 186 | required TResult Function() empty, 187 | }) => 188 | throw _privateConstructorUsedError; 189 | @optionalTypeArgs 190 | TResult maybeWhen({ 191 | TResult Function()? initial, 192 | TResult Function()? loadInProgress, 193 | TResult Function(List shopdata)? loadSuccess, 194 | TResult Function()? loadFailure, 195 | TResult Function()? empty, 196 | required TResult orElse(), 197 | }) => 198 | throw _privateConstructorUsedError; 199 | @optionalTypeArgs 200 | TResult map({ 201 | required TResult Function(_Initial value) initial, 202 | required TResult Function(_LoadInProgress value) loadInProgress, 203 | required TResult Function(_LoadSuccess value) loadSuccess, 204 | required TResult Function(_LoadFailure value) loadFailure, 205 | required TResult Function(_Empty value) empty, 206 | }) => 207 | throw _privateConstructorUsedError; 208 | @optionalTypeArgs 209 | TResult maybeMap({ 210 | TResult Function(_Initial value)? initial, 211 | TResult Function(_LoadInProgress value)? loadInProgress, 212 | TResult Function(_LoadSuccess value)? loadSuccess, 213 | TResult Function(_LoadFailure value)? loadFailure, 214 | TResult Function(_Empty value)? empty, 215 | required TResult orElse(), 216 | }) => 217 | throw _privateConstructorUsedError; 218 | } 219 | 220 | /// @nodoc 221 | abstract class $ShopdataStateCopyWith<$Res> { 222 | factory $ShopdataStateCopyWith( 223 | ShopdataState value, $Res Function(ShopdataState) then) = 224 | _$ShopdataStateCopyWithImpl<$Res>; 225 | } 226 | 227 | /// @nodoc 228 | class _$ShopdataStateCopyWithImpl<$Res> 229 | implements $ShopdataStateCopyWith<$Res> { 230 | _$ShopdataStateCopyWithImpl(this._value, this._then); 231 | 232 | final ShopdataState _value; 233 | // ignore: unused_field 234 | final $Res Function(ShopdataState) _then; 235 | } 236 | 237 | /// @nodoc 238 | abstract class _$InitialCopyWith<$Res> { 239 | factory _$InitialCopyWith(_Initial value, $Res Function(_Initial) then) = 240 | __$InitialCopyWithImpl<$Res>; 241 | } 242 | 243 | /// @nodoc 244 | class __$InitialCopyWithImpl<$Res> extends _$ShopdataStateCopyWithImpl<$Res> 245 | implements _$InitialCopyWith<$Res> { 246 | __$InitialCopyWithImpl(_Initial _value, $Res Function(_Initial) _then) 247 | : super(_value, (v) => _then(v as _Initial)); 248 | 249 | @override 250 | _Initial get _value => super._value as _Initial; 251 | } 252 | 253 | /// @nodoc 254 | class _$_Initial implements _Initial { 255 | const _$_Initial(); 256 | 257 | @override 258 | String toString() { 259 | return 'ShopdataState.initial()'; 260 | } 261 | 262 | @override 263 | bool operator ==(dynamic other) { 264 | return identical(this, other) || (other is _Initial); 265 | } 266 | 267 | @override 268 | int get hashCode => runtimeType.hashCode; 269 | 270 | @override 271 | @optionalTypeArgs 272 | TResult when({ 273 | required TResult Function() initial, 274 | required TResult Function() loadInProgress, 275 | required TResult Function(List shopdata) loadSuccess, 276 | required TResult Function() loadFailure, 277 | required TResult Function() empty, 278 | }) { 279 | return initial(); 280 | } 281 | 282 | @override 283 | @optionalTypeArgs 284 | TResult maybeWhen({ 285 | TResult Function()? initial, 286 | TResult Function()? loadInProgress, 287 | TResult Function(List shopdata)? loadSuccess, 288 | TResult Function()? loadFailure, 289 | TResult Function()? empty, 290 | required TResult orElse(), 291 | }) { 292 | if (initial != null) { 293 | return initial(); 294 | } 295 | return orElse(); 296 | } 297 | 298 | @override 299 | @optionalTypeArgs 300 | TResult map({ 301 | required TResult Function(_Initial value) initial, 302 | required TResult Function(_LoadInProgress value) loadInProgress, 303 | required TResult Function(_LoadSuccess value) loadSuccess, 304 | required TResult Function(_LoadFailure value) loadFailure, 305 | required TResult Function(_Empty value) empty, 306 | }) { 307 | return initial(this); 308 | } 309 | 310 | @override 311 | @optionalTypeArgs 312 | TResult maybeMap({ 313 | TResult Function(_Initial value)? initial, 314 | TResult Function(_LoadInProgress value)? loadInProgress, 315 | TResult Function(_LoadSuccess value)? loadSuccess, 316 | TResult Function(_LoadFailure value)? loadFailure, 317 | TResult Function(_Empty value)? empty, 318 | required TResult orElse(), 319 | }) { 320 | if (initial != null) { 321 | return initial(this); 322 | } 323 | return orElse(); 324 | } 325 | } 326 | 327 | abstract class _Initial implements ShopdataState { 328 | const factory _Initial() = _$_Initial; 329 | } 330 | 331 | /// @nodoc 332 | abstract class _$LoadInProgressCopyWith<$Res> { 333 | factory _$LoadInProgressCopyWith( 334 | _LoadInProgress value, $Res Function(_LoadInProgress) then) = 335 | __$LoadInProgressCopyWithImpl<$Res>; 336 | } 337 | 338 | /// @nodoc 339 | class __$LoadInProgressCopyWithImpl<$Res> 340 | extends _$ShopdataStateCopyWithImpl<$Res> 341 | implements _$LoadInProgressCopyWith<$Res> { 342 | __$LoadInProgressCopyWithImpl( 343 | _LoadInProgress _value, $Res Function(_LoadInProgress) _then) 344 | : super(_value, (v) => _then(v as _LoadInProgress)); 345 | 346 | @override 347 | _LoadInProgress get _value => super._value as _LoadInProgress; 348 | } 349 | 350 | /// @nodoc 351 | class _$_LoadInProgress implements _LoadInProgress { 352 | const _$_LoadInProgress(); 353 | 354 | @override 355 | String toString() { 356 | return 'ShopdataState.loadInProgress()'; 357 | } 358 | 359 | @override 360 | bool operator ==(dynamic other) { 361 | return identical(this, other) || (other is _LoadInProgress); 362 | } 363 | 364 | @override 365 | int get hashCode => runtimeType.hashCode; 366 | 367 | @override 368 | @optionalTypeArgs 369 | TResult when({ 370 | required TResult Function() initial, 371 | required TResult Function() loadInProgress, 372 | required TResult Function(List shopdata) loadSuccess, 373 | required TResult Function() loadFailure, 374 | required TResult Function() empty, 375 | }) { 376 | return loadInProgress(); 377 | } 378 | 379 | @override 380 | @optionalTypeArgs 381 | TResult maybeWhen({ 382 | TResult Function()? initial, 383 | TResult Function()? loadInProgress, 384 | TResult Function(List shopdata)? loadSuccess, 385 | TResult Function()? loadFailure, 386 | TResult Function()? empty, 387 | required TResult orElse(), 388 | }) { 389 | if (loadInProgress != null) { 390 | return loadInProgress(); 391 | } 392 | return orElse(); 393 | } 394 | 395 | @override 396 | @optionalTypeArgs 397 | TResult map({ 398 | required TResult Function(_Initial value) initial, 399 | required TResult Function(_LoadInProgress value) loadInProgress, 400 | required TResult Function(_LoadSuccess value) loadSuccess, 401 | required TResult Function(_LoadFailure value) loadFailure, 402 | required TResult Function(_Empty value) empty, 403 | }) { 404 | return loadInProgress(this); 405 | } 406 | 407 | @override 408 | @optionalTypeArgs 409 | TResult maybeMap({ 410 | TResult Function(_Initial value)? initial, 411 | TResult Function(_LoadInProgress value)? loadInProgress, 412 | TResult Function(_LoadSuccess value)? loadSuccess, 413 | TResult Function(_LoadFailure value)? loadFailure, 414 | TResult Function(_Empty value)? empty, 415 | required TResult orElse(), 416 | }) { 417 | if (loadInProgress != null) { 418 | return loadInProgress(this); 419 | } 420 | return orElse(); 421 | } 422 | } 423 | 424 | abstract class _LoadInProgress implements ShopdataState { 425 | const factory _LoadInProgress() = _$_LoadInProgress; 426 | } 427 | 428 | /// @nodoc 429 | abstract class _$LoadSuccessCopyWith<$Res> { 430 | factory _$LoadSuccessCopyWith( 431 | _LoadSuccess value, $Res Function(_LoadSuccess) then) = 432 | __$LoadSuccessCopyWithImpl<$Res>; 433 | $Res call({List shopdata}); 434 | } 435 | 436 | /// @nodoc 437 | class __$LoadSuccessCopyWithImpl<$Res> extends _$ShopdataStateCopyWithImpl<$Res> 438 | implements _$LoadSuccessCopyWith<$Res> { 439 | __$LoadSuccessCopyWithImpl( 440 | _LoadSuccess _value, $Res Function(_LoadSuccess) _then) 441 | : super(_value, (v) => _then(v as _LoadSuccess)); 442 | 443 | @override 444 | _LoadSuccess get _value => super._value as _LoadSuccess; 445 | 446 | @override 447 | $Res call({ 448 | Object? shopdata = freezed, 449 | }) { 450 | return _then(_LoadSuccess( 451 | shopdata == freezed 452 | ? _value.shopdata 453 | : shopdata // ignore: cast_nullable_to_non_nullable 454 | as List, 455 | )); 456 | } 457 | } 458 | 459 | /// @nodoc 460 | class _$_LoadSuccess implements _LoadSuccess { 461 | const _$_LoadSuccess(this.shopdata); 462 | 463 | @override 464 | final List shopdata; 465 | 466 | @override 467 | String toString() { 468 | return 'ShopdataState.loadSuccess(shopdata: $shopdata)'; 469 | } 470 | 471 | @override 472 | bool operator ==(dynamic other) { 473 | return identical(this, other) || 474 | (other is _LoadSuccess && 475 | (identical(other.shopdata, shopdata) || 476 | const DeepCollectionEquality() 477 | .equals(other.shopdata, shopdata))); 478 | } 479 | 480 | @override 481 | int get hashCode => 482 | runtimeType.hashCode ^ const DeepCollectionEquality().hash(shopdata); 483 | 484 | @JsonKey(ignore: true) 485 | @override 486 | _$LoadSuccessCopyWith<_LoadSuccess> get copyWith => 487 | __$LoadSuccessCopyWithImpl<_LoadSuccess>(this, _$identity); 488 | 489 | @override 490 | @optionalTypeArgs 491 | TResult when({ 492 | required TResult Function() initial, 493 | required TResult Function() loadInProgress, 494 | required TResult Function(List shopdata) loadSuccess, 495 | required TResult Function() loadFailure, 496 | required TResult Function() empty, 497 | }) { 498 | return loadSuccess(shopdata); 499 | } 500 | 501 | @override 502 | @optionalTypeArgs 503 | TResult maybeWhen({ 504 | TResult Function()? initial, 505 | TResult Function()? loadInProgress, 506 | TResult Function(List shopdata)? loadSuccess, 507 | TResult Function()? loadFailure, 508 | TResult Function()? empty, 509 | required TResult orElse(), 510 | }) { 511 | if (loadSuccess != null) { 512 | return loadSuccess(shopdata); 513 | } 514 | return orElse(); 515 | } 516 | 517 | @override 518 | @optionalTypeArgs 519 | TResult map({ 520 | required TResult Function(_Initial value) initial, 521 | required TResult Function(_LoadInProgress value) loadInProgress, 522 | required TResult Function(_LoadSuccess value) loadSuccess, 523 | required TResult Function(_LoadFailure value) loadFailure, 524 | required TResult Function(_Empty value) empty, 525 | }) { 526 | return loadSuccess(this); 527 | } 528 | 529 | @override 530 | @optionalTypeArgs 531 | TResult maybeMap({ 532 | TResult Function(_Initial value)? initial, 533 | TResult Function(_LoadInProgress value)? loadInProgress, 534 | TResult Function(_LoadSuccess value)? loadSuccess, 535 | TResult Function(_LoadFailure value)? loadFailure, 536 | TResult Function(_Empty value)? empty, 537 | required TResult orElse(), 538 | }) { 539 | if (loadSuccess != null) { 540 | return loadSuccess(this); 541 | } 542 | return orElse(); 543 | } 544 | } 545 | 546 | abstract class _LoadSuccess implements ShopdataState { 547 | const factory _LoadSuccess(List shopdata) = _$_LoadSuccess; 548 | 549 | List get shopdata => throw _privateConstructorUsedError; 550 | @JsonKey(ignore: true) 551 | _$LoadSuccessCopyWith<_LoadSuccess> get copyWith => 552 | throw _privateConstructorUsedError; 553 | } 554 | 555 | /// @nodoc 556 | abstract class _$LoadFailureCopyWith<$Res> { 557 | factory _$LoadFailureCopyWith( 558 | _LoadFailure value, $Res Function(_LoadFailure) then) = 559 | __$LoadFailureCopyWithImpl<$Res>; 560 | } 561 | 562 | /// @nodoc 563 | class __$LoadFailureCopyWithImpl<$Res> extends _$ShopdataStateCopyWithImpl<$Res> 564 | implements _$LoadFailureCopyWith<$Res> { 565 | __$LoadFailureCopyWithImpl( 566 | _LoadFailure _value, $Res Function(_LoadFailure) _then) 567 | : super(_value, (v) => _then(v as _LoadFailure)); 568 | 569 | @override 570 | _LoadFailure get _value => super._value as _LoadFailure; 571 | } 572 | 573 | /// @nodoc 574 | class _$_LoadFailure implements _LoadFailure { 575 | const _$_LoadFailure(); 576 | 577 | @override 578 | String toString() { 579 | return 'ShopdataState.loadFailure()'; 580 | } 581 | 582 | @override 583 | bool operator ==(dynamic other) { 584 | return identical(this, other) || (other is _LoadFailure); 585 | } 586 | 587 | @override 588 | int get hashCode => runtimeType.hashCode; 589 | 590 | @override 591 | @optionalTypeArgs 592 | TResult when({ 593 | required TResult Function() initial, 594 | required TResult Function() loadInProgress, 595 | required TResult Function(List shopdata) loadSuccess, 596 | required TResult Function() loadFailure, 597 | required TResult Function() empty, 598 | }) { 599 | return loadFailure(); 600 | } 601 | 602 | @override 603 | @optionalTypeArgs 604 | TResult maybeWhen({ 605 | TResult Function()? initial, 606 | TResult Function()? loadInProgress, 607 | TResult Function(List shopdata)? loadSuccess, 608 | TResult Function()? loadFailure, 609 | TResult Function()? empty, 610 | required TResult orElse(), 611 | }) { 612 | if (loadFailure != null) { 613 | return loadFailure(); 614 | } 615 | return orElse(); 616 | } 617 | 618 | @override 619 | @optionalTypeArgs 620 | TResult map({ 621 | required TResult Function(_Initial value) initial, 622 | required TResult Function(_LoadInProgress value) loadInProgress, 623 | required TResult Function(_LoadSuccess value) loadSuccess, 624 | required TResult Function(_LoadFailure value) loadFailure, 625 | required TResult Function(_Empty value) empty, 626 | }) { 627 | return loadFailure(this); 628 | } 629 | 630 | @override 631 | @optionalTypeArgs 632 | TResult maybeMap({ 633 | TResult Function(_Initial value)? initial, 634 | TResult Function(_LoadInProgress value)? loadInProgress, 635 | TResult Function(_LoadSuccess value)? loadSuccess, 636 | TResult Function(_LoadFailure value)? loadFailure, 637 | TResult Function(_Empty value)? empty, 638 | required TResult orElse(), 639 | }) { 640 | if (loadFailure != null) { 641 | return loadFailure(this); 642 | } 643 | return orElse(); 644 | } 645 | } 646 | 647 | abstract class _LoadFailure implements ShopdataState { 648 | const factory _LoadFailure() = _$_LoadFailure; 649 | } 650 | 651 | /// @nodoc 652 | abstract class _$EmptyCopyWith<$Res> { 653 | factory _$EmptyCopyWith(_Empty value, $Res Function(_Empty) then) = 654 | __$EmptyCopyWithImpl<$Res>; 655 | } 656 | 657 | /// @nodoc 658 | class __$EmptyCopyWithImpl<$Res> extends _$ShopdataStateCopyWithImpl<$Res> 659 | implements _$EmptyCopyWith<$Res> { 660 | __$EmptyCopyWithImpl(_Empty _value, $Res Function(_Empty) _then) 661 | : super(_value, (v) => _then(v as _Empty)); 662 | 663 | @override 664 | _Empty get _value => super._value as _Empty; 665 | } 666 | 667 | /// @nodoc 668 | class _$_Empty implements _Empty { 669 | const _$_Empty(); 670 | 671 | @override 672 | String toString() { 673 | return 'ShopdataState.empty()'; 674 | } 675 | 676 | @override 677 | bool operator ==(dynamic other) { 678 | return identical(this, other) || (other is _Empty); 679 | } 680 | 681 | @override 682 | int get hashCode => runtimeType.hashCode; 683 | 684 | @override 685 | @optionalTypeArgs 686 | TResult when({ 687 | required TResult Function() initial, 688 | required TResult Function() loadInProgress, 689 | required TResult Function(List shopdata) loadSuccess, 690 | required TResult Function() loadFailure, 691 | required TResult Function() empty, 692 | }) { 693 | return empty(); 694 | } 695 | 696 | @override 697 | @optionalTypeArgs 698 | TResult maybeWhen({ 699 | TResult Function()? initial, 700 | TResult Function()? loadInProgress, 701 | TResult Function(List shopdata)? loadSuccess, 702 | TResult Function()? loadFailure, 703 | TResult Function()? empty, 704 | required TResult orElse(), 705 | }) { 706 | if (empty != null) { 707 | return empty(); 708 | } 709 | return orElse(); 710 | } 711 | 712 | @override 713 | @optionalTypeArgs 714 | TResult map({ 715 | required TResult Function(_Initial value) initial, 716 | required TResult Function(_LoadInProgress value) loadInProgress, 717 | required TResult Function(_LoadSuccess value) loadSuccess, 718 | required TResult Function(_LoadFailure value) loadFailure, 719 | required TResult Function(_Empty value) empty, 720 | }) { 721 | return empty(this); 722 | } 723 | 724 | @override 725 | @optionalTypeArgs 726 | TResult maybeMap({ 727 | TResult Function(_Initial value)? initial, 728 | TResult Function(_LoadInProgress value)? loadInProgress, 729 | TResult Function(_LoadSuccess value)? loadSuccess, 730 | TResult Function(_LoadFailure value)? loadFailure, 731 | TResult Function(_Empty value)? empty, 732 | required TResult orElse(), 733 | }) { 734 | if (empty != null) { 735 | return empty(this); 736 | } 737 | return orElse(); 738 | } 739 | } 740 | 741 | abstract class _Empty implements ShopdataState { 742 | const factory _Empty() = _$_Empty; 743 | } 744 | -------------------------------------------------------------------------------- /lib/application/shopdata/shopdata_event.dart: -------------------------------------------------------------------------------- 1 | part of 'shopdata_bloc.dart'; 2 | 3 | @freezed 4 | abstract class ShopdataEvent with _$ShopdataEvent { 5 | const factory ShopdataEvent.watchAllProducts() = _Started; 6 | } 7 | -------------------------------------------------------------------------------- /lib/application/shopdata/shopdata_state.dart: -------------------------------------------------------------------------------- 1 | part of 'shopdata_bloc.dart'; 2 | 3 | @freezed 4 | abstract class ShopdataState with _$ShopdataState { 5 | const factory ShopdataState.initial() = _Initial; 6 | const factory ShopdataState.loadInProgress() = _LoadInProgress; 7 | const factory ShopdataState.loadSuccess(List shopdata) = _LoadSuccess; 8 | const factory ShopdataState.loadFailure() = _LoadFailure; 9 | const factory ShopdataState.empty() = _Empty; 10 | } 11 | -------------------------------------------------------------------------------- /lib/domain/i_shopdata_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:assignment/infrastructure/shopdata/data_entity.dart'; 2 | 3 | abstract class IshopDataRepository { 4 | Future> watchAllProducts(); 5 | } 6 | -------------------------------------------------------------------------------- /lib/infrastructure/shopdata/data_entity.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'longDescription.dart'; 4 | 5 | Welcome welcomeFromJson(String str) => Welcome.fromJson(json.decode(str)); 6 | String welcomeToJson(Welcome data) => json.encode(data.toJson()); 7 | 8 | class Welcome { 9 | Welcome({ 10 | required this.data, 11 | }); 12 | 13 | List data; 14 | 15 | factory Welcome.fromJson(Map json) => Welcome( 16 | data: List.from(json["data"].map((x) => Datum.fromJson(x))), 17 | ); 18 | 19 | Map toJson() => { 20 | "data": List.from(data.map((x) => x.toJson())), 21 | }; 22 | } 23 | 24 | class Datum { 25 | Datum({ 26 | this.imageUrl, 27 | this.name, 28 | this.shortDesc, 29 | this.origPrice, 30 | this.discountPrice, 31 | this.discountPercentage, 32 | this.longDesc, 33 | }); 34 | 35 | String? imageUrl; 36 | String? name; 37 | String? shortDesc; 38 | String? origPrice; 39 | String? discountPrice; 40 | String? discountPercentage; 41 | LongDesc? longDesc; 42 | 43 | factory Datum.fromJson(Map json) => Datum( 44 | imageUrl: json["imageURL"], 45 | name: json["name"], 46 | shortDesc: json["shortDesc"], 47 | origPrice: json["OrigPrice"], 48 | discountPrice: json["DiscountPrice"], 49 | discountPercentage: json["discountPercentage"], 50 | longDesc: LongDesc.fromJson(json["longDesc"]), 51 | ); 52 | 53 | Map toJson() => { 54 | "imageURL": imageUrl, 55 | "name": name, 56 | "shortDesc": shortDesc, 57 | "OrigPrice": origPrice, 58 | "DiscountPrice": discountPrice, 59 | "discountPercentage": discountPercentage, 60 | "longDesc": longDesc!.toJson(), 61 | }; 62 | } 63 | -------------------------------------------------------------------------------- /lib/infrastructure/shopdata/detail.dart: -------------------------------------------------------------------------------- 1 | class Detail { 2 | Detail({ 3 | this.productDetails, 4 | this.sizeFit, 5 | this.materialCare, 6 | this.styleNote, 7 | }); 8 | 9 | String? productDetails; 10 | String? sizeFit; 11 | String? materialCare; 12 | String? styleNote; 13 | 14 | factory Detail.fromJson(Map json) => Detail( 15 | productDetails: 16 | json["productDetails"] == null ? null : json["productDetails"], 17 | sizeFit: json["Size & Fit"] == null ? null : json["Size & Fit"], 18 | materialCare: 19 | json["Material & Care"] == null ? null : json["Material & Care"], 20 | styleNote: json["Style note"] == null ? null : json["Style note"], 21 | ); 22 | 23 | Map toJson() => { 24 | "productDetails": productDetails == null ? null : productDetails, 25 | "Size & Fit": sizeFit == null ? null : sizeFit, 26 | "Material & Care": materialCare == null ? null : materialCare, 27 | "Style note": styleNote == null ? null : styleNote, 28 | }; 29 | } 30 | -------------------------------------------------------------------------------- /lib/infrastructure/shopdata/longDescription.dart: -------------------------------------------------------------------------------- 1 | import 'detail.dart'; 2 | 3 | class LongDesc { 4 | LongDesc({ 5 | this.discountDetails, 6 | this.exchangeDtls, 7 | this.sizeDetails, 8 | this.seller, 9 | this.details, 10 | }); 11 | 12 | String? discountDetails; 13 | String? exchangeDtls; 14 | List>? sizeDetails; 15 | String? seller; 16 | List? details; 17 | 18 | factory LongDesc.fromJson(Map json) => LongDesc( 19 | discountDetails: json["discountDetails"], 20 | exchangeDtls: json["exchangeDtls"], 21 | sizeDetails: List>.from(json["sizeDetails"].map( 22 | (x) => Map.from(x).map((k, v) => MapEntry(k, v)))), 23 | seller: json["seller"], 24 | details: 25 | List.from(json["details"].map((x) => Detail.fromJson(x))), 26 | ); 27 | 28 | Map toJson() => { 29 | "discountDetails": discountDetails, 30 | "exchangeDtls": exchangeDtls, 31 | "sizeDetails": List.from(sizeDetails!.map( 32 | (x) => Map.from(x).map((k, v) => MapEntry(k, v)))), 33 | "seller": seller, 34 | "details": List.from(details!.map((x) => x.toJson())), 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /lib/infrastructure/shopdata/shopdata_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:assignment/domain/i_shopdata_repository.dart'; 2 | 3 | import 'package:assignment/infrastructure/shopdata/data_entity.dart'; 4 | import 'package:injectable/injectable.dart'; 5 | import "package:http/http.dart" as http; 6 | import 'dart:convert'; 7 | 8 | @LazySingleton(as: IshopDataRepository) 9 | class ShopDataRepository implements IshopDataRepository { 10 | var baseUrl = "https://api.jsonbin.io/b/60141159ef99c57c734b89aa"; 11 | 12 | @override 13 | Future> watchAllProducts() async { 14 | var response = await http.get(Uri.parse(baseUrl)); 15 | 16 | if (response.statusCode == 200) { 17 | var data = json.decode(response.body); 18 | print(".............body ${response.body}"); 19 | 20 | List shopdata = Welcome.fromJson(data).data; 21 | return shopdata; 22 | } else { 23 | print(".........somethin wrong .... ${response.statusCode}"); 24 | throw Exception(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/injection.config.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | // ************************************************************************** 4 | // InjectableConfigGenerator 5 | // ************************************************************************** 6 | 7 | import 'package:get_it/get_it.dart' as _i1; 8 | import 'package:injectable/injectable.dart' as _i2; 9 | 10 | import 'application/shopdata/shopdata_bloc.dart' as _i5; 11 | import 'domain/i_shopdata_repository.dart' as _i3; 12 | import 'infrastructure/shopdata/shopdata_repository.dart' 13 | as _i4; // ignore_for_file: unnecessary_lambdas 14 | 15 | // ignore_for_file: lines_longer_than_80_chars 16 | /// initializes the registration of provided dependencies inside of [GetIt] 17 | _i1.GetIt $initGetIt(_i1.GetIt get, 18 | {String? environment, _i2.EnvironmentFilter? environmentFilter}) { 19 | final gh = _i2.GetItHelper(get, environment, environmentFilter); 20 | gh.lazySingleton<_i3.IshopDataRepository>(() => _i4.ShopDataRepository()); 21 | gh.factory<_i5.ShopdataBloc>( 22 | () => _i5.ShopdataBloc(get<_i3.IshopDataRepository>())); 23 | return get; 24 | } 25 | -------------------------------------------------------------------------------- /lib/injection.dart: -------------------------------------------------------------------------------- 1 | import 'package:get_it/get_it.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | import "package:assignment/injection.config.dart"; 4 | 5 | final GetIt getIt = GetIt.instance; 6 | 7 | @injectableInit 8 | void configureInjection(String env) { 9 | $initGetIt(getIt, environment: env); 10 | } 11 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:injectable/injectable.dart'; 3 | 4 | import 'injection.dart'; 5 | import 'presentation/core/assignmentapp.dart'; 6 | 7 | void main() { 8 | WidgetsFlutterBinding.ensureInitialized(); 9 | configureInjection(Environment.prod); 10 | runApp(AssignmentApp()); 11 | } 12 | -------------------------------------------------------------------------------- /lib/presentation/core/assignmentapp.dart: -------------------------------------------------------------------------------- 1 | import 'package:assignment/presentation/routes/router.gr.dart'; 2 | import 'package:assignment/presentation/theme/theme.dart'; 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class AssignmentApp extends StatelessWidget { 7 | final _appRouter = AppRouter(); 8 | @override 9 | Widget build(BuildContext context) { 10 | return MaterialApp.router( 11 | routerDelegate: _appRouter.delegate(), 12 | routeInformationParser: _appRouter.defaultRouteParser(), 13 | title: 'Academic master', 14 | debugShowCheckedModeBanner: false, 15 | theme: Apptheme.theme, 16 | ); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/presentation/core/empty.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Empty extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return Container( 7 | color: Colors.amberAccent, 8 | child: Text("Empty no data found 🤷‍♀️"), 9 | ); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/presentation/core/failure.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Failure extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return Container( 7 | child: Text("Some error occurs in server 🤔😒🤷‍♀️"), 8 | ); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/presentation/core/loading.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Loading extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return Center( 7 | child: CircularProgressIndicator(), 8 | ); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/presentation/pages/detailpage.dart: -------------------------------------------------------------------------------- 1 | import 'package:assignment/infrastructure/shopdata/data_entity.dart'; 2 | import 'package:assignment/presentation/pages/widgets/sizechart_card.dart'; 3 | import 'package:assignment/presentation/theme/theme.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 7 | 8 | import 'widgets/product_details.dart'; 9 | 10 | class DetailPage extends StatelessWidget { 11 | const DetailPage({ 12 | Key? key, 13 | required this.shopData, 14 | }) : super(key: key); 15 | final Datum shopData; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | ScreenUtil.init(BoxConstraints( 20 | maxHeight: MediaQuery.of(context).size.height, 21 | maxWidth: MediaQuery.of(context).size.width, 22 | )); 23 | return Scaffold( 24 | appBar: AppBar( 25 | // leading: Icon(Icons.arrow_back_ios_new_outlined), 26 | title: Text( 27 | shopData.name!, 28 | style: Apptheme(context).thinText.copyWith( 29 | fontSize: 15.sp, 30 | ), 31 | ), 32 | actions: [ 33 | IconButton( 34 | onPressed: () {}, 35 | icon: Icon( 36 | Icons.share, 37 | size: 20.h, 38 | ), 39 | ), 40 | IconButton( 41 | onPressed: () {}, 42 | icon: Icon( 43 | Icons.favorite_border, 44 | size: 20.h, 45 | ), 46 | ), 47 | IconButton( 48 | onPressed: () {}, 49 | icon: Icon(Icons.shopping_bag, size: 20.h), 50 | color: Colors.black26, 51 | ), 52 | ], 53 | ), 54 | body: SingleChildScrollView( 55 | physics: BouncingScrollPhysics(), 56 | child: Column( 57 | crossAxisAlignment: CrossAxisAlignment.start, 58 | children: [ 59 | Padding( 60 | padding: EdgeInsets.only( 61 | top: 15.h, 62 | ), 63 | child: Card( 64 | child: Padding( 65 | padding: EdgeInsets.only( 66 | top: 15.h, 67 | bottom: 15.h, 68 | ), 69 | child: Row( 70 | children: [ 71 | SizedBox(width: 1.sw / 12), 72 | Icon( 73 | Icons.refresh_outlined, 74 | size: 20.h, 75 | ), 76 | Text( 77 | " Easy 30 days return and exchange", 78 | style: Apptheme(context).normalText.copyWith( 79 | fontSize: 15.h, 80 | ), 81 | ) 82 | ], 83 | ), 84 | ), 85 | ), 86 | ), 87 | SizeChartCard(), 88 | ProductDetails(shopData: shopData) 89 | ], 90 | ), 91 | ), 92 | ); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/presentation/pages/homepage.dart: -------------------------------------------------------------------------------- 1 | import 'package:assignment/application/shopdata/shopdata_bloc.dart'; 2 | import 'package:assignment/infrastructure/shopdata/data_entity.dart'; 3 | import 'package:assignment/injection.dart'; 4 | import 'package:assignment/presentation/core/empty.dart'; 5 | import 'package:assignment/presentation/core/failure.dart'; 6 | import 'package:assignment/presentation/core/loading.dart'; 7 | import 'package:assignment/presentation/pages/widgets/shirtBox.dart'; 8 | 9 | import 'package:assignment/presentation/theme/theme.dart'; 10 | 11 | import 'package:flutter/cupertino.dart'; 12 | import 'package:flutter/material.dart'; 13 | import 'package:flutter_bloc/flutter_bloc.dart'; 14 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 15 | 16 | class HomePage extends StatelessWidget { 17 | @override 18 | Widget build(BuildContext context) { 19 | ScreenUtil.init(BoxConstraints( 20 | maxHeight: MediaQuery.of(context).size.height, 21 | maxWidth: MediaQuery.of(context).size.width, 22 | )); 23 | return Scaffold( 24 | appBar: AppBar( 25 | leading: Icon(Icons.arrow_back_ios_new_outlined), 26 | title: Text( 27 | "US POLO TAILORED FIT..", 28 | style: Apptheme(context).thinText.copyWith( 29 | fontSize: 15.sp, 30 | ), 31 | ), 32 | actions: [ 33 | IconButton( 34 | onPressed: () {}, 35 | icon: Icon( 36 | Icons.search, 37 | size: 20.h, 38 | ), 39 | ), 40 | IconButton( 41 | onPressed: () {}, 42 | icon: Icon( 43 | Icons.favorite_border, 44 | size: 20.h, 45 | ), 46 | ), 47 | IconButton( 48 | onPressed: () {}, 49 | icon: Icon(Icons.shopping_bag, size: 20.h), 50 | color: Colors.black26, 51 | ), 52 | ], 53 | ), 54 | bottomNavigationBar: BottomAppBar( 55 | child: Container( 56 | height: 1.sh / 10, 57 | width: 1.sw, 58 | child: Padding( 59 | padding: EdgeInsets.only( 60 | left: 1.sw / 8, 61 | right: 1.sw / 8, 62 | ), 63 | child: Row( 64 | mainAxisAlignment: MainAxisAlignment.center, 65 | children: [ 66 | InkWell( 67 | onTap: () {}, 68 | child: Icon( 69 | Icons.sort, 70 | ), 71 | ), 72 | Text(" SORT"), 73 | SizedBox(width: 1.sw < 450 ? 1.sw / 6 : 1.sw / 4), 74 | InkWell( 75 | onTap: () {}, 76 | child: Icon( 77 | Icons.bolt, 78 | )), 79 | Text( 80 | " FILTER", 81 | ), 82 | ], 83 | ), 84 | ), 85 | ), 86 | ), 87 | body: MultiBlocProvider( 88 | providers: [ 89 | BlocProvider( 90 | create: (conetxt) => getIt() 91 | ..add( 92 | const ShopdataEvent.watchAllProducts(), 93 | ), 94 | ), 95 | ], 96 | child: BlocBuilder( 97 | builder: (context, state) { 98 | return state.map( 99 | initial: (_) => Loading(), 100 | loadInProgress: (_) => Loading(), 101 | loadSuccess: (state) { 102 | return SingleChildScrollView( 103 | physics: BouncingScrollPhysics(), 104 | child: Column( 105 | children: [ 106 | Padding( 107 | padding: EdgeInsets.only( 108 | left: 10.h, 109 | top: 20.h, 110 | right: 10.h, 111 | ), 112 | child: Row( 113 | children: [ 114 | Expanded( 115 | flex: 3, 116 | child: Text( 117 | "FIT LINEN SHIRTS ", 118 | style: Apptheme(context).normalText.copyWith( 119 | fontSize: 17.h, 120 | ), 121 | ), 122 | ), 123 | // Expanded(child: SizedBox()), 124 | Expanded( 125 | child: Text( 126 | "+177 items ", 127 | style: Apptheme(context).thinText.copyWith( 128 | fontSize: 15.h, 129 | color: Colors.redAccent, 130 | ), 131 | ), 132 | ), 133 | ], 134 | ), 135 | ), 136 | GridView.builder( 137 | shrinkWrap: true, 138 | physics: BouncingScrollPhysics(), 139 | itemCount: state.shopdata.length, 140 | gridDelegate: 141 | SliverGridDelegateWithFixedCrossAxisCount( 142 | crossAxisCount: 1.sw > 450 ? 3 : 2, 143 | childAspectRatio: 1.sw > 450 144 | ? MediaQuery.of(context).size.width / 145 | (MediaQuery.of(context).size.height / .65) 146 | : MediaQuery.of(context).size.width / 147 | (MediaQuery.of(context).size.height / 148 | 0.93), 149 | ), 150 | itemBuilder: (context, index) { 151 | final Datum shopData = state.shopdata[index]; 152 | 153 | return ShirtBox(shopData: shopData); 154 | }) 155 | ], 156 | ), 157 | ); 158 | }, 159 | loadFailure: (_) => Failure(), 160 | empty: (_) => Empty(), 161 | ); 162 | }, 163 | )), 164 | ); 165 | } 166 | } 167 | -------------------------------------------------------------------------------- /lib/presentation/pages/widgets/product_details.dart: -------------------------------------------------------------------------------- 1 | import 'package:assignment/infrastructure/shopdata/data_entity.dart'; 2 | import 'package:assignment/presentation/theme/theme.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 | 6 | class ProductDetails extends StatelessWidget { 7 | const ProductDetails({ 8 | Key? key, 9 | required this.shopData, 10 | }) : super(key: key); 11 | 12 | final Datum shopData; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | ScreenUtil.init(BoxConstraints( 17 | maxHeight: MediaQuery.of(context).size.height, 18 | maxWidth: MediaQuery.of(context).size.width, 19 | )); 20 | return Padding( 21 | padding: EdgeInsets.all( 22 | 15.h, 23 | ), 24 | child: Container( 25 | child: Column( 26 | mainAxisAlignment: MainAxisAlignment.start, 27 | crossAxisAlignment: CrossAxisAlignment.start, 28 | children: [ 29 | Text("Product Details", 30 | style: Apptheme(context).boldText.copyWith( 31 | fontSize: 13.h, 32 | )), 33 | Padding( 34 | padding: EdgeInsets.only(top: 8.0.h), 35 | child: Text(shopData.longDesc!.details![0].productDetails!), 36 | ), 37 | Padding( 38 | padding: EdgeInsets.only(top: 15.h), 39 | child: Text("Size & Fit ", 40 | style: Apptheme(context).boldText.copyWith( 41 | fontSize: 13.h, 42 | )), 43 | ), 44 | Padding( 45 | padding: EdgeInsets.only(top: 8.0.h), 46 | child: Text(shopData.longDesc!.details![1].sizeFit!), 47 | ), 48 | Padding( 49 | padding: EdgeInsets.only(top: 15.h), 50 | child: Text("Material & Care", 51 | style: Apptheme(context).boldText.copyWith( 52 | fontSize: 13.h, 53 | )), 54 | ), 55 | Padding( 56 | padding: EdgeInsets.only(top: 8.0.h), 57 | child: Text(shopData.longDesc!.details![2].materialCare!), 58 | ), 59 | Padding( 60 | padding: EdgeInsets.only(top: 15.h), 61 | child: Text("Style Note", 62 | style: Apptheme(context).boldText.copyWith( 63 | fontSize: 13.h, 64 | )), 65 | ), 66 | Padding( 67 | padding: EdgeInsets.only(top: 8.0.h), 68 | child: Text(shopData.longDesc!.details![3].styleNote!), 69 | ), 70 | ], 71 | ), 72 | ), 73 | ); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /lib/presentation/pages/widgets/shirtBox.dart: -------------------------------------------------------------------------------- 1 | import 'package:assignment/infrastructure/shopdata/data_entity.dart'; 2 | import 'package:assignment/presentation/routes/router.gr.dart'; 3 | import 'package:assignment/presentation/theme/theme.dart'; 4 | import 'package:auto_route/auto_route.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 7 | 8 | class ShirtBox extends StatelessWidget { 9 | const ShirtBox({ 10 | Key? key, 11 | required this.shopData, 12 | }) : super(key: key); 13 | 14 | final Datum shopData; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | ScreenUtil.init(BoxConstraints( 19 | maxHeight: MediaQuery.of(context).size.height, 20 | maxWidth: MediaQuery.of(context).size.width, 21 | )); 22 | return Padding( 23 | padding: EdgeInsets.only( 24 | left: 15.h, 25 | right: 15.h, 26 | top: 10.h, 27 | ), 28 | child: Container( 29 | child: Column( 30 | crossAxisAlignment: CrossAxisAlignment.start, 31 | children: [ 32 | InkWell( 33 | onTap: () { 34 | AutoRouter.of(context).push(DetailRoute(shopData: shopData)); 35 | }, 36 | child: Image( 37 | image: NetworkImage(shopData.imageUrl!), 38 | height: 1.sh / 3, 39 | ), 40 | ), 41 | Row( 42 | children: [ 43 | Expanded( 44 | flex: 3, 45 | child: Text( 46 | shopData.name!, 47 | style: Apptheme(context).boldText.copyWith( 48 | fontSize: 15.h, 49 | ), 50 | ), 51 | ), 52 | IconButton( 53 | onPressed: () {}, 54 | icon: Icon(Icons.favorite_border, size: 20.h), 55 | ) 56 | ], 57 | ), 58 | Padding( 59 | padding: EdgeInsets.only( 60 | top: 5.h, 61 | bottom: 5.h, 62 | ), 63 | child: Text( 64 | shopData.shortDesc!, 65 | style: Apptheme(context).normalText.copyWith( 66 | fontSize: 13.h, 67 | ), 68 | ), 69 | ), 70 | Wrap( 71 | children: [ 72 | Text( 73 | "₹ ${shopData.discountPrice!}", 74 | style: Apptheme(context).boldText.copyWith( 75 | fontSize: 14.h, 76 | ), 77 | ), 78 | Text( 79 | "₹ \ ${shopData.origPrice!}", 80 | style: Apptheme(context).thinText.copyWith( 81 | fontSize: 10.h, 82 | decoration: TextDecoration.lineThrough, 83 | ), 84 | ), 85 | Text( 86 | "% ${shopData.discountPercentage!} OFF ", 87 | style: Apptheme(context).thinText.copyWith( 88 | fontSize: 10.h, 89 | color: Colors.redAccent, 90 | ), 91 | ), 92 | ], 93 | ) 94 | ], 95 | )), 96 | ); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /lib/presentation/pages/widgets/sizechart_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:assignment/presentation/theme/theme.dart'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 | 6 | class SizeChartCard extends StatelessWidget { 7 | const SizeChartCard({ 8 | Key? key, 9 | }) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | ScreenUtil.init(BoxConstraints( 14 | maxHeight: MediaQuery.of(context).size.height, 15 | maxWidth: MediaQuery.of(context).size.width, 16 | )); 17 | return Padding( 18 | padding: EdgeInsets.only( 19 | top: 15.h, 20 | ), 21 | child: Card( 22 | child: Padding( 23 | padding: EdgeInsets.only( 24 | top: 15.h, 25 | bottom: 15.h, 26 | ), 27 | child: Padding( 28 | padding: EdgeInsets.all(8.0.h), 29 | child: Column( 30 | children: [ 31 | Row( 32 | children: [ 33 | Expanded( 34 | flex: 3, 35 | child: Text( 36 | "SELECT SIZE", 37 | style: Apptheme(context).normalText.copyWith( 38 | fontSize: 15.h, 39 | ), 40 | ), 41 | ), 42 | Text( 43 | " SIZE CHART", 44 | style: Apptheme(context).boldText.copyWith( 45 | fontSize: 13.h, 46 | color: Colors.pink, 47 | ), 48 | ), 49 | ], 50 | ), 51 | Padding( 52 | padding: EdgeInsets.all( 53 | 8.0.h, 54 | ), 55 | child: Row( 56 | children: [ 57 | for (int i = 0; i < 4; i++) 58 | Padding( 59 | padding: EdgeInsets.all(8.h), 60 | child: InkWell( 61 | onTap: () {}, 62 | child: CircleAvatar( 63 | radius: 20.h, 64 | backgroundColor: Apptheme.secondaryColor, 65 | child: Text("$i"), 66 | ), 67 | )) 68 | ], 69 | ), 70 | ), 71 | Padding( 72 | padding: EdgeInsets.all( 73 | 8.0.h, 74 | ), 75 | child: Row( 76 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 77 | children: [ 78 | ElevatedButton( 79 | style: ButtonStyle( 80 | backgroundColor: MaterialStateProperty.all( 81 | Apptheme.backgroundColor, 82 | ), 83 | ), 84 | onPressed: () {}, 85 | child: Padding( 86 | padding: EdgeInsets.only(top: 10.h, bottom: 10.h), 87 | child: Row( 88 | children: [ 89 | Icon( 90 | Icons.favorite_border, 91 | color: Colors.black, 92 | ), 93 | Text( 94 | " WISHLIST", 95 | style: Apptheme(context).normalText.copyWith( 96 | color: Apptheme.assentColor, 97 | fontSize: 15.sp, 98 | ), 99 | ) 100 | ], 101 | ), 102 | ), 103 | ), 104 | ElevatedButton( 105 | style: ButtonStyle( 106 | backgroundColor: MaterialStateProperty.all( 107 | Colors.pink, 108 | ), 109 | ), 110 | onPressed: () {}, 111 | child: Padding( 112 | padding: EdgeInsets.only( 113 | top: 10.h, 114 | bottom: 10.h, 115 | ), 116 | child: Row( 117 | children: [ 118 | Icon( 119 | Icons.shopping_bag, 120 | ), 121 | Text( 122 | " ADD TO BAG", 123 | style: Apptheme(context).normalText.copyWith( 124 | fontSize: 15.sp, 125 | ), 126 | ) 127 | ], 128 | ), 129 | ), 130 | ) 131 | ], 132 | ), 133 | ) 134 | ], 135 | ), 136 | )), 137 | ), 138 | ); 139 | } 140 | } 141 | -------------------------------------------------------------------------------- /lib/presentation/routes/router.dart: -------------------------------------------------------------------------------- 1 | import 'package:assignment/presentation/pages/detailpage.dart'; 2 | import 'package:assignment/presentation/pages/homepage.dart'; 3 | import 'package:assignment/presentation/splash/splashscreen.dart'; 4 | import 'package:auto_route/annotations.dart'; 5 | 6 | @MaterialAutoRouter( 7 | replaceInRouteName: 'Page,Route', 8 | routes: [ 9 | AutoRoute(page: Splashpage, initial: true), 10 | AutoRoute(page: DetailPage), 11 | AutoRoute(page: HomePage), 12 | ], 13 | ) 14 | class $AppRouter {} 15 | -------------------------------------------------------------------------------- /lib/presentation/routes/router.gr.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | // ************************************************************************** 4 | // AutoRouteGenerator 5 | // ************************************************************************** 6 | 7 | import 'package:auto_route/auto_route.dart' as _i1; 8 | import 'package:flutter/cupertino.dart' as _i5; 9 | 10 | import '../../infrastructure/shopdata/data_entity.dart' as _i6; 11 | import '../pages/detailpage.dart' as _i3; 12 | import '../pages/homepage.dart' as _i4; 13 | import '../splash/splashscreen.dart' as _i2; 14 | 15 | class AppRouter extends _i1.RootStackRouter { 16 | AppRouter(); 17 | 18 | @override 19 | final Map pagesMap = { 20 | Splashpage.name: (entry) { 21 | return _i1.MaterialPageX(entry: entry, child: _i2.Splashpage()); 22 | }, 23 | DetailRoute.name: (entry) { 24 | var args = entry.routeData.argsAs(); 25 | return _i1.MaterialPageX( 26 | entry: entry, 27 | child: _i3.DetailPage(key: args.key, shopData: args.shopData)); 28 | }, 29 | HomeRoute.name: (entry) { 30 | return _i1.MaterialPageX(entry: entry, child: _i4.HomePage()); 31 | } 32 | }; 33 | 34 | @override 35 | List<_i1.RouteConfig> get routes => [ 36 | _i1.RouteConfig(Splashpage.name, path: '/'), 37 | _i1.RouteConfig(DetailRoute.name, path: '/detail-page'), 38 | _i1.RouteConfig(HomeRoute.name, path: '/home-page') 39 | ]; 40 | } 41 | 42 | class Splashpage extends _i1.PageRouteInfo { 43 | const Splashpage() : super(name, path: '/'); 44 | 45 | static const String name = 'Splashpage'; 46 | } 47 | 48 | class DetailRoute extends _i1.PageRouteInfo { 49 | DetailRoute({_i5.Key? key, required _i6.Datum shopData}) 50 | : super(name, 51 | path: '/detail-page', 52 | args: DetailRouteArgs(key: key, shopData: shopData)); 53 | 54 | static const String name = 'DetailRoute'; 55 | } 56 | 57 | class DetailRouteArgs { 58 | const DetailRouteArgs({this.key, required this.shopData}); 59 | 60 | final _i5.Key? key; 61 | 62 | final _i6.Datum shopData; 63 | } 64 | 65 | class HomeRoute extends _i1.PageRouteInfo { 66 | const HomeRoute() : super(name, path: '/home-page'); 67 | 68 | static const String name = 'HomeRoute'; 69 | } 70 | -------------------------------------------------------------------------------- /lib/presentation/splash/splashscreen.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:assignment/presentation/pages/homepage.dart'; 4 | import 'package:assignment/presentation/routes/router.gr.dart'; 5 | 6 | import 'package:auto_route/auto_route.dart'; 7 | import 'package:flutter/cupertino.dart'; 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_screenutil/flutter_screenutil.dart'; 10 | import 'package:lottie/lottie.dart'; 11 | 12 | class Splashpage extends StatefulWidget { 13 | @override 14 | _SplashpageState createState() => _SplashpageState(); 15 | } 16 | 17 | class _SplashpageState extends State { 18 | @override 19 | void initState() { 20 | super.initState(); 21 | Timer(Duration(seconds: 5), () { 22 | AutoRouter.of(context).replace(HomeRoute()); 23 | }); 24 | } 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | ScreenUtil.init(BoxConstraints( 29 | maxHeight: MediaQuery.of(context).size.height, 30 | maxWidth: MediaQuery.of(context).size.width, 31 | )); 32 | return Scaffold( 33 | body: Container( 34 | child: Lottie.asset( 35 | "assets/lottiefile/splashlogo.json", 36 | height: 1.sh, 37 | width: 1.sw, 38 | fit: BoxFit.fill, 39 | ), 40 | )); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/presentation/theme/theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | 4 | class Apptheme { 5 | final BuildContext context; 6 | Apptheme(this.context); 7 | 8 | static const backgroundColor = Color(0xffffffff); 9 | static const primaryColor = Color(0xff2BB5F3); 10 | 11 | static const secondaryColor = Color(0xffD8EAF2); 12 | static const assentColor = Color(0xff253157); 13 | 14 | TextStyle boldText = const TextStyle( 15 | color: assentColor, 16 | fontWeight: FontWeight.w900, 17 | fontFamily: "Circular_Bold", 18 | ); 19 | TextStyle thinText = const TextStyle( 20 | color: assentColor, 21 | fontWeight: FontWeight.w100, 22 | //fontFamily: "Circular_Bold", 23 | ); 24 | TextStyle normalText = const TextStyle( 25 | color: assentColor, 26 | fontWeight: FontWeight.w400, 27 | fontFamily: "Circular_Bold", 28 | ); 29 | 30 | static ThemeData theme = ThemeData( 31 | primaryTextTheme: const TextTheme( 32 | headline1: TextStyle( 33 | fontSize: 10, 34 | color: Colors.red, 35 | ), 36 | bodyText2: TextStyle( 37 | fontSize: 5, 38 | color: Colors.red, 39 | ), 40 | ), 41 | accentIconTheme: const IconThemeData( 42 | color: primaryColor, 43 | ), 44 | scaffoldBackgroundColor: backgroundColor, 45 | fontFamily: "Circular_Bold", 46 | accentColor: primaryColor, 47 | buttonTheme: const ButtonThemeData( 48 | buttonColor: assentColor, 49 | padding: EdgeInsets.symmetric(vertical: 20), 50 | minWidth: double.maxFinite, 51 | colorScheme: ColorScheme.light(brightness: Brightness.dark), 52 | ), 53 | buttonColor: primaryColor, 54 | elevatedButtonTheme: ElevatedButtonThemeData( 55 | style: ButtonStyle( 56 | backgroundColor: MaterialStateProperty.all( 57 | primaryColor, 58 | ), 59 | textStyle: MaterialStateProperty.all( 60 | const TextStyle( 61 | fontSize: 10, 62 | ), 63 | ), 64 | minimumSize: MaterialStateProperty.all( 65 | const Size( 66 | 34, 67 | 50, 68 | ), 69 | ), 70 | ), 71 | ), 72 | textButtonTheme: TextButtonThemeData( 73 | style: ButtonStyle( 74 | backgroundColor: MaterialStateProperty.all( 75 | backgroundColor, 76 | ), 77 | textStyle: MaterialStateProperty.all( 78 | const TextStyle( 79 | fontSize: 20, 80 | fontFamily: "Circular", 81 | ), 82 | ), 83 | minimumSize: MaterialStateProperty.all( 84 | const Size( 85 | 34, 86 | 50, 87 | ), 88 | ), 89 | ), 90 | ), 91 | appBarTheme: const AppBarTheme( 92 | elevation: 3, 93 | backwardsCompatibility: false, 94 | systemOverlayStyle: SystemUiOverlayStyle( 95 | statusBarColor: backgroundColor, 96 | ), 97 | color: backgroundColor, 98 | centerTitle: false, 99 | brightness: Brightness.light, 100 | iconTheme: IconThemeData( 101 | color: Colors.black, 102 | opacity: 18, 103 | size: 25, 104 | ), 105 | textTheme: TextTheme( 106 | headline1: TextStyle( 107 | fontSize: 12.0, 108 | ), 109 | headline6: TextStyle( 110 | fontSize: 25.0, 111 | fontStyle: FontStyle.italic, 112 | ), 113 | bodyText2: TextStyle( 114 | fontSize: 14.0, 115 | fontFamily: 'Hind', 116 | ), 117 | ), 118 | ), 119 | toggleableActiveColor: primaryColor, 120 | inputDecorationTheme: const InputDecorationTheme( 121 | border: OutlineInputBorder( 122 | borderSide: BorderSide(color: primaryColor), 123 | ), 124 | labelStyle: TextStyle( 125 | color: Color(0xff253157), 126 | ), 127 | hintStyle: TextStyle( 128 | color: Color(0xff253157), 129 | )), 130 | floatingActionButtonTheme: const FloatingActionButtonThemeData( 131 | foregroundColor: Colors.white, 132 | ), 133 | ); 134 | } 135 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | _fe_analyzer_shared: 5 | dependency: transitive 6 | description: 7 | name: _fe_analyzer_shared 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "20.0.0" 11 | analyzer: 12 | dependency: transitive 13 | description: 14 | name: analyzer 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.4.0" 18 | archive: 19 | dependency: transitive 20 | description: 21 | name: archive 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "3.1.2" 25 | args: 26 | dependency: transitive 27 | description: 28 | name: args 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.0.0" 32 | async: 33 | dependency: transitive 34 | description: 35 | name: async 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.5.0" 39 | auto_route: 40 | dependency: "direct main" 41 | description: 42 | name: auto_route 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.0.2" 46 | auto_route_generator: 47 | dependency: "direct dev" 48 | description: 49 | name: auto_route_generator 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.0.2" 53 | bloc: 54 | dependency: "direct main" 55 | description: 56 | name: bloc 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "7.0.0" 60 | boolean_selector: 61 | dependency: transitive 62 | description: 63 | name: boolean_selector 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.1.0" 67 | build: 68 | dependency: transitive 69 | description: 70 | name: build 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.0.0" 74 | build_config: 75 | dependency: transitive 76 | description: 77 | name: build_config 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "0.4.7" 81 | build_daemon: 82 | dependency: transitive 83 | description: 84 | name: build_daemon 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "2.1.10" 88 | build_resolvers: 89 | dependency: transitive 90 | description: 91 | name: build_resolvers 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "2.0.0" 95 | build_runner: 96 | dependency: "direct dev" 97 | description: 98 | name: build_runner 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "1.12.2" 102 | build_runner_core: 103 | dependency: transitive 104 | description: 105 | name: build_runner_core 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "6.1.12" 109 | built_collection: 110 | dependency: transitive 111 | description: 112 | name: built_collection 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "5.0.0" 116 | built_value: 117 | dependency: transitive 118 | description: 119 | name: built_value 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "8.0.4" 123 | characters: 124 | dependency: transitive 125 | description: 126 | name: characters 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "1.1.0" 130 | charcode: 131 | dependency: transitive 132 | description: 133 | name: charcode 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "1.2.0" 137 | checked_yaml: 138 | dependency: transitive 139 | description: 140 | name: checked_yaml 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "2.0.1" 144 | cli_util: 145 | dependency: transitive 146 | description: 147 | name: cli_util 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "0.3.0" 151 | clock: 152 | dependency: transitive 153 | description: 154 | name: clock 155 | url: "https://pub.dartlang.org" 156 | source: hosted 157 | version: "1.1.0" 158 | code_builder: 159 | dependency: transitive 160 | description: 161 | name: code_builder 162 | url: "https://pub.dartlang.org" 163 | source: hosted 164 | version: "3.7.0" 165 | collection: 166 | dependency: transitive 167 | description: 168 | name: collection 169 | url: "https://pub.dartlang.org" 170 | source: hosted 171 | version: "1.15.0" 172 | convert: 173 | dependency: transitive 174 | description: 175 | name: convert 176 | url: "https://pub.dartlang.org" 177 | source: hosted 178 | version: "3.0.0" 179 | crypto: 180 | dependency: transitive 181 | description: 182 | name: crypto 183 | url: "https://pub.dartlang.org" 184 | source: hosted 185 | version: "3.0.1" 186 | cupertino_icons: 187 | dependency: "direct main" 188 | description: 189 | name: cupertino_icons 190 | url: "https://pub.dartlang.org" 191 | source: hosted 192 | version: "1.0.2" 193 | dart_style: 194 | dependency: transitive 195 | description: 196 | name: dart_style 197 | url: "https://pub.dartlang.org" 198 | source: hosted 199 | version: "2.0.0" 200 | fake_async: 201 | dependency: transitive 202 | description: 203 | name: fake_async 204 | url: "https://pub.dartlang.org" 205 | source: hosted 206 | version: "1.2.0" 207 | file: 208 | dependency: transitive 209 | description: 210 | name: file 211 | url: "https://pub.dartlang.org" 212 | source: hosted 213 | version: "6.1.0" 214 | fixnum: 215 | dependency: transitive 216 | description: 217 | name: fixnum 218 | url: "https://pub.dartlang.org" 219 | source: hosted 220 | version: "1.0.0" 221 | flutter: 222 | dependency: "direct main" 223 | description: flutter 224 | source: sdk 225 | version: "0.0.0" 226 | flutter_bloc: 227 | dependency: "direct main" 228 | description: 229 | name: flutter_bloc 230 | url: "https://pub.dartlang.org" 231 | source: hosted 232 | version: "7.0.0" 233 | flutter_screenutil: 234 | dependency: "direct main" 235 | description: 236 | name: flutter_screenutil 237 | url: "https://pub.dartlang.org" 238 | source: hosted 239 | version: "5.0.0" 240 | flutter_test: 241 | dependency: "direct dev" 242 | description: flutter 243 | source: sdk 244 | version: "0.0.0" 245 | freezed: 246 | dependency: "direct dev" 247 | description: 248 | name: freezed 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "0.14.1+2" 252 | freezed_annotation: 253 | dependency: transitive 254 | description: 255 | name: freezed_annotation 256 | url: "https://pub.dartlang.org" 257 | source: hosted 258 | version: "0.14.1" 259 | get_it: 260 | dependency: transitive 261 | description: 262 | name: get_it 263 | url: "https://pub.dartlang.org" 264 | source: hosted 265 | version: "6.1.1" 266 | glob: 267 | dependency: transitive 268 | description: 269 | name: glob 270 | url: "https://pub.dartlang.org" 271 | source: hosted 272 | version: "2.0.1" 273 | graphs: 274 | dependency: transitive 275 | description: 276 | name: graphs 277 | url: "https://pub.dartlang.org" 278 | source: hosted 279 | version: "1.0.0" 280 | http: 281 | dependency: "direct main" 282 | description: 283 | name: http 284 | url: "https://pub.dartlang.org" 285 | source: hosted 286 | version: "0.13.1" 287 | http_multi_server: 288 | dependency: transitive 289 | description: 290 | name: http_multi_server 291 | url: "https://pub.dartlang.org" 292 | source: hosted 293 | version: "3.0.1" 294 | http_parser: 295 | dependency: transitive 296 | description: 297 | name: http_parser 298 | url: "https://pub.dartlang.org" 299 | source: hosted 300 | version: "4.0.0" 301 | injectable: 302 | dependency: "direct main" 303 | description: 304 | name: injectable 305 | url: "https://pub.dartlang.org" 306 | source: hosted 307 | version: "1.2.2" 308 | injectable_generator: 309 | dependency: "direct dev" 310 | description: 311 | name: injectable_generator 312 | url: "https://pub.dartlang.org" 313 | source: hosted 314 | version: "1.2.2" 315 | io: 316 | dependency: transitive 317 | description: 318 | name: io 319 | url: "https://pub.dartlang.org" 320 | source: hosted 321 | version: "1.0.0" 322 | js: 323 | dependency: transitive 324 | description: 325 | name: js 326 | url: "https://pub.dartlang.org" 327 | source: hosted 328 | version: "0.6.3" 329 | json_annotation: 330 | dependency: transitive 331 | description: 332 | name: json_annotation 333 | url: "https://pub.dartlang.org" 334 | source: hosted 335 | version: "4.0.1" 336 | logging: 337 | dependency: transitive 338 | description: 339 | name: logging 340 | url: "https://pub.dartlang.org" 341 | source: hosted 342 | version: "1.0.1" 343 | lottie: 344 | dependency: "direct main" 345 | description: 346 | name: lottie 347 | url: "https://pub.dartlang.org" 348 | source: hosted 349 | version: "1.0.1" 350 | matcher: 351 | dependency: transitive 352 | description: 353 | name: matcher 354 | url: "https://pub.dartlang.org" 355 | source: hosted 356 | version: "0.12.10" 357 | meta: 358 | dependency: transitive 359 | description: 360 | name: meta 361 | url: "https://pub.dartlang.org" 362 | source: hosted 363 | version: "1.3.0" 364 | mime: 365 | dependency: transitive 366 | description: 367 | name: mime 368 | url: "https://pub.dartlang.org" 369 | source: hosted 370 | version: "1.0.0" 371 | nested: 372 | dependency: transitive 373 | description: 374 | name: nested 375 | url: "https://pub.dartlang.org" 376 | source: hosted 377 | version: "1.0.0" 378 | package_config: 379 | dependency: transitive 380 | description: 381 | name: package_config 382 | url: "https://pub.dartlang.org" 383 | source: hosted 384 | version: "2.0.0" 385 | path: 386 | dependency: transitive 387 | description: 388 | name: path 389 | url: "https://pub.dartlang.org" 390 | source: hosted 391 | version: "1.8.0" 392 | pedantic: 393 | dependency: transitive 394 | description: 395 | name: pedantic 396 | url: "https://pub.dartlang.org" 397 | source: hosted 398 | version: "1.11.0" 399 | pool: 400 | dependency: transitive 401 | description: 402 | name: pool 403 | url: "https://pub.dartlang.org" 404 | source: hosted 405 | version: "1.5.0" 406 | provider: 407 | dependency: transitive 408 | description: 409 | name: provider 410 | url: "https://pub.dartlang.org" 411 | source: hosted 412 | version: "5.0.0" 413 | pub_semver: 414 | dependency: transitive 415 | description: 416 | name: pub_semver 417 | url: "https://pub.dartlang.org" 418 | source: hosted 419 | version: "2.0.0" 420 | pubspec_parse: 421 | dependency: transitive 422 | description: 423 | name: pubspec_parse 424 | url: "https://pub.dartlang.org" 425 | source: hosted 426 | version: "1.0.0" 427 | shelf: 428 | dependency: transitive 429 | description: 430 | name: shelf 431 | url: "https://pub.dartlang.org" 432 | source: hosted 433 | version: "1.1.0" 434 | shelf_web_socket: 435 | dependency: transitive 436 | description: 437 | name: shelf_web_socket 438 | url: "https://pub.dartlang.org" 439 | source: hosted 440 | version: "1.0.1" 441 | sky_engine: 442 | dependency: transitive 443 | description: flutter 444 | source: sdk 445 | version: "0.0.99" 446 | source_gen: 447 | dependency: transitive 448 | description: 449 | name: source_gen 450 | url: "https://pub.dartlang.org" 451 | source: hosted 452 | version: "1.0.0" 453 | source_span: 454 | dependency: transitive 455 | description: 456 | name: source_span 457 | url: "https://pub.dartlang.org" 458 | source: hosted 459 | version: "1.8.1" 460 | stack_trace: 461 | dependency: transitive 462 | description: 463 | name: stack_trace 464 | url: "https://pub.dartlang.org" 465 | source: hosted 466 | version: "1.10.0" 467 | stream_channel: 468 | dependency: transitive 469 | description: 470 | name: stream_channel 471 | url: "https://pub.dartlang.org" 472 | source: hosted 473 | version: "2.1.0" 474 | stream_transform: 475 | dependency: transitive 476 | description: 477 | name: stream_transform 478 | url: "https://pub.dartlang.org" 479 | source: hosted 480 | version: "2.0.0" 481 | string_scanner: 482 | dependency: transitive 483 | description: 484 | name: string_scanner 485 | url: "https://pub.dartlang.org" 486 | source: hosted 487 | version: "1.1.0" 488 | term_glyph: 489 | dependency: transitive 490 | description: 491 | name: term_glyph 492 | url: "https://pub.dartlang.org" 493 | source: hosted 494 | version: "1.2.0" 495 | test_api: 496 | dependency: transitive 497 | description: 498 | name: test_api 499 | url: "https://pub.dartlang.org" 500 | source: hosted 501 | version: "0.3.0" 502 | timing: 503 | dependency: transitive 504 | description: 505 | name: timing 506 | url: "https://pub.dartlang.org" 507 | source: hosted 508 | version: "1.0.0" 509 | typed_data: 510 | dependency: transitive 511 | description: 512 | name: typed_data 513 | url: "https://pub.dartlang.org" 514 | source: hosted 515 | version: "1.3.0" 516 | vector_math: 517 | dependency: transitive 518 | description: 519 | name: vector_math 520 | url: "https://pub.dartlang.org" 521 | source: hosted 522 | version: "2.1.0" 523 | watcher: 524 | dependency: transitive 525 | description: 526 | name: watcher 527 | url: "https://pub.dartlang.org" 528 | source: hosted 529 | version: "1.0.0" 530 | web_socket_channel: 531 | dependency: transitive 532 | description: 533 | name: web_socket_channel 534 | url: "https://pub.dartlang.org" 535 | source: hosted 536 | version: "2.0.0" 537 | yaml: 538 | dependency: transitive 539 | description: 540 | name: yaml 541 | url: "https://pub.dartlang.org" 542 | source: hosted 543 | version: "3.1.0" 544 | sdks: 545 | dart: ">=2.12.0 <3.0.0" 546 | flutter: ">=1.16.0" 547 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: assignment 2 | description: A new Flutter project. 3 | 4 | publish_to: 'none' 5 | 6 | version: 1.0.0+1 7 | 8 | environment: 9 | sdk: ">=2.12.0 <3.0.0" 10 | 11 | dependencies: 12 | flutter: 13 | sdk: flutter 14 | auto_route: ^1.0.2 15 | bloc: ^7.0.0 16 | cupertino_icons: ^1.0.2 17 | flutter_bloc: ^7.0.0 18 | flutter_screenutil: ^5.0.0 19 | http: ^0.13.1 20 | injectable: ^1.2.0 21 | lottie: ^1.0.1 22 | 23 | dev_dependencies: 24 | flutter_test: 25 | sdk: flutter 26 | auto_route_generator: ^1.0.2 27 | build_runner: null 28 | freezed: ^0.14.1+2 29 | injectable_generator: ^1.2.0 30 | 31 | flutter: 32 | 33 | uses-material-design: true 34 | 35 | assets: 36 | 37 | - assets/lottiefile/ 38 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:assignment/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amitsingh6391/Flutter_Ecommerce_App-Web-ios-android-/153ed3f7b7b4a0058e5678034de5a39bc1ad38ad/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | assignment 27 | 28 | 29 | 30 | 33 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "assignment", 3 | "short_name": "assignment", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | --------------------------------------------------------------------------------