├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── course_camp │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── images │ ├── img_interface1.png │ ├── img_interface2.png │ ├── img_interface3.png │ ├── img_interface4.png │ ├── img_intro.png │ ├── img_relax.png │ ├── img_user.png │ ├── img_welcome.png │ └── img_work.png └── raw │ ├── categories.json │ └── courses.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 ├── data │ ├── repository │ │ ├── category_repository_impl.dart │ │ └── course_repository_impl.dart │ ├── source │ │ ├── category_local_data_source.dart │ │ └── course_local_data_source.dart │ └── utils │ │ ├── file_utils.dart │ │ └── perser.dart ├── domain │ ├── entity │ │ ├── course.dart │ │ ├── course.g.dart │ │ └── course_category.dart │ └── repository │ │ ├── category_repository.dart │ │ └── course_repository.dart ├── main.dart └── presentation │ ├── core │ ├── base │ │ ├── anim_controller.dart │ │ ├── base_controller.dart │ │ └── base_page.dart │ ├── route │ │ ├── app_pages.dart │ │ └── app_routes.dart │ ├── theme │ │ └── light_theme.dart │ ├── utils │ │ ├── constants.dart │ │ └── screen_util.dart │ └── values │ │ ├── colors.dart │ │ ├── dimens.dart │ │ └── strings.dart │ └── page │ ├── course │ ├── course_bindings.dart │ ├── course_controller.dart │ ├── course_page.dart │ ├── user_courses_bindings.dart │ ├── user_courses_controller.dart │ ├── user_courses_page.dart │ └── views │ │ └── my_courses_list_view.dart │ ├── home │ ├── home_bindings.dart │ ├── home_controller.dart │ ├── home_page.dart │ └── views │ │ ├── course_horizontal_list_view.dart │ │ └── popular_course_list_view.dart │ ├── main │ ├── main_bindings.dart │ ├── main_controller.dart │ └── main_page.dart │ ├── onboarding │ ├── onboarding_bindings.dart │ ├── onboarding_controller.dart │ ├── onboarding_page.dart │ └── views │ │ ├── center_next_button.dart │ │ ├── relax_view.dart │ │ ├── splash_view.dart │ │ ├── top_back_skip_view.dart │ │ ├── welcome_view.dart │ │ └── work_view.dart │ └── user │ ├── user_bindings.dart │ ├── user_controller.dart │ └── user_page.dart ├── pubspec.lock ├── pubspec.yaml ├── screenshots ├── home.jpeg ├── my_courses.jpeg └── onboarding.jpeg ├── test └── widget_test.dart └── web ├── favicon.png ├── icons ├── Icon-192.png ├── Icon-512.png ├── Icon-maskable-192.png └── Icon-maskable-512.png ├── index.html └── manifest.json /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | # This workflow uses actions that are not certified by GitHub. 2 | # They are provided by a third-party and are governed by 3 | # separate terms of service, privacy policy, and support 4 | # documentation. 5 | 6 | name: CI 7 | 8 | on: 9 | push: 10 | branches: [ "master" ] 11 | pull_request: 12 | branches: [ "master" ] 13 | 14 | jobs: 15 | build: 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - uses: actions/checkout@v3 20 | 21 | # Note: This workflow uses the latest stable version of the Dart SDK. 22 | # You can specify other versions if desired, see documentation here: 23 | # https://github.com/dart-lang/setup-dart/blob/main/README.md 24 | # - uses: dart-lang/setup-dart@v1 25 | - uses: dart-lang/setup-dart@9a04e6d73cca37bd455e0608d7e5092f881fd603 26 | 27 | - name: Install dependencies 28 | run: flutter pub get 29 | 30 | # Uncomment this step to verify the use of 'dart format' on each commit. 31 | # - name: Verify formatting 32 | # run: dart format --output=none --set-exit-if-changed . 33 | 34 | # Consider passing '--fatal-infos' for slightly stricter analysis. 35 | - name: Analyze project source 36 | run: dart analyze 37 | 38 | # Your project will need to have tests in test/ and a dependency on 39 | # package:test for this step to succeed. Note that Flutter projects will 40 | # want to change this to 'flutter test'. 41 | - name: Run tests 42 | run: dart test 43 | -------------------------------------------------------------------------------- /.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: c860cba910319332564e1e9d470a17074c1f2dfd 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Course Camp - Flutter App 2 | 3 | This is a sample Flutter project. The app reads courses list from a local json file and display it. The app code follows SOLID principles by implementing Clean Architecture. The basic purpose of this project is to show how Flutter apps are structured and developed by [Waseem Abbas](https://www.linkedin.com/in/waseemabbas8/). 4 | 5 | ![](https://img.shields.io/badge/Code-Dart-informational?style=flat&logo=dart&color=29B1EE) 6 | ![](https://img.shields.io/badge/Code-Flutter-informational?style=flat&logo=flutter&color=0C459C) 7 | ![](https://img.shields.io/badge/Code-Kotlin-informational?style=flat&logo=kotlin&color=E96E10) 8 | ![](https://img.shields.io/badge/Code-Swift-informational?style=flat&logo=swift&color=F05138) 9 | ![](https://img.shields.io/badge/Dependency-GetX-informational?style=flat&logo=getx&color=8A13F4) 10 | ![](https://img.shields.io/badge/Tools-AndroidStudio-informational?style=flat&logo=androidstudio&color=3DDC84) 11 | ![](https://img.shields.io/badge/Tools-XCode-informational?style=flat&logo=xcode&color=147EFB) 12 | ![](https://img.shields.io/badge/Tools-GitHub-informational?style=flat&logo=github&color=181717&link=https://github.com/waseemabbas8) 13 | 14 | # Screenshots 15 | Onboarding | Home | My Courses 16 | :-------------------------:|:-------------------------:|:------------------------- 17 | ![Alt text](/screenshots/onboarding.jpeg?raw=true "Onboarding screen") | ![Alt text](/screenshots/home.jpeg?raw=true "Home Screen") | ![Alt text](/screenshots/my_courses.jpeg?raw=true "My Courses screen") 18 | 19 | 20 | 21 | # Built With 22 | This project follows **MVC** based [Clean Architecture](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html) model and the following tools and technologies have been used to develop: 23 | ## Development Tools 24 | 25 | 26 | |**Tool**|**Version**| 27 | | :- | :- | 28 | |Android Studio|2020.3.1| 29 | |Flutter 3 SDK|3.0.1| 30 | |Dart |Version supported in Flutter 2.5| 31 | 32 | ## Flutter Libraries 33 | - [GetX](https://pub.dev/packages/get) (di, state management, route management) 34 | - [Retrofit](https://pub.dev/packages/retrofit) (for REST APIs implementation) 35 | - [json_serializable](https://pub.dev/packages/json_serializable) (for json maping) 36 | # Getting Starting 37 | 38 | ## Prerequisite 39 | 40 | Before you set up the project please make sure you have installed the required min versions of the tools installed mentioned above in the Development Tools table. Otherwise, you may come to build errors. 41 | ## Installation 42 | Here are simple steps to set up this project: 43 | 44 | - Clone the repo 45 | 46 | |git@github.com:waseemabbas8/Course-Camp-Flutter-App.git| 47 | | - | 48 | - Make sure you have checked out the **main** branch 49 | - Open project in your preferred IDE (Android Studio) 50 | ## Usage 51 | You can run and test the app on both Android & iOS devices. To build and & run the app simply press the RUN button from Android Studio. 52 | 53 | # Author 54 | Waseem Abbas (Software Engineer at [DevCrew.IO](https://devcrew.io/)) 55 | 56 |

Connect with me:

57 |

58 | waseemabbas8 59 | engrwaseemabbasjutt 60 | engrwaseemabbas 61 |

62 | 63 | # Contributing 64 | Contributions, issues, and feature requests are welcome! 65 | # Show your Support 66 | Give a start if this project helped you. 67 | # License 68 | Copyright © 2022, [Waseem Abbas](https://github.com/waseemabbas8) 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /android/.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 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.example.course_camp" 47 | minSdkVersion flutter.minSdkVersion 48 | targetSdkVersion flutter.targetSdkVersion 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | } 69 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/course_camp/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.course_camp 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 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 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 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #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 | -------------------------------------------------------------------------------- /assets/images/img_interface1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/assets/images/img_interface1.png -------------------------------------------------------------------------------- /assets/images/img_interface2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/assets/images/img_interface2.png -------------------------------------------------------------------------------- /assets/images/img_interface3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/assets/images/img_interface3.png -------------------------------------------------------------------------------- /assets/images/img_interface4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/assets/images/img_interface4.png -------------------------------------------------------------------------------- /assets/images/img_intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/assets/images/img_intro.png -------------------------------------------------------------------------------- /assets/images/img_relax.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/assets/images/img_relax.png -------------------------------------------------------------------------------- /assets/images/img_user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/assets/images/img_user.png -------------------------------------------------------------------------------- /assets/images/img_welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/assets/images/img_welcome.png -------------------------------------------------------------------------------- /assets/images/img_work.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/assets/images/img_work.png -------------------------------------------------------------------------------- /assets/raw/categories.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "name": "Ui/Ux" 5 | }, 6 | { 7 | "id": 2, 8 | "name": "Coding" 9 | }, 10 | { 11 | "id": 4, 12 | "name": "Business" 13 | }, 14 | { 15 | "id": 5, 16 | "name": "Music" 17 | }, 18 | { 19 | "id": 6, 20 | "name": "Marketing" 21 | } 22 | ] -------------------------------------------------------------------------------- /assets/raw/courses.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "category_id": 1, 5 | "title": "User Interface Design Course", 6 | "lesson_count": 14, 7 | "money": 25.0, 8 | "rating": 4.0, 9 | "image_path":"assets/images/img_interface1.png" 10 | }, 11 | { 12 | "id": 2, 13 | "category_id": 1, 14 | "title": "Web Design Course", 15 | "lesson_count": 27, 16 | "money": 30.0, 17 | "rating": 4.5, 18 | "image_path":"assets/images/img_interface3.png" 19 | }, 20 | { 21 | "id": 3, 22 | "category_id": 2, 23 | "title": "Android App Development", 24 | "lesson_count": 8, 25 | "money": 80.0, 26 | "rating": 4.0, 27 | "image_path":"assets/images/img_interface1.png" 28 | }, 29 | { 30 | "id": 4, 31 | "category_id": 4, 32 | "title": "Software Managing", 33 | "lesson_count": 5, 34 | "money": 20.0, 35 | "rating": 3.0, 36 | "image_path":"assets/images/img_interface3.png" 37 | }, 38 | { 39 | "id": 5, 40 | "category_id": 2, 41 | "title": "Node.Js Development", 42 | "lesson_count": 45, 43 | "money": 75.0, 44 | "rating": 4.5, 45 | "image_path":"assets/images/img_interface3.png" 46 | }, 47 | { 48 | "id": 6, 49 | "category_id": 2, 50 | "title": ".Net Core Development", 51 | "lesson_count": 32, 52 | "money": 100.0, 53 | "rating": 4.8, 54 | "image_path":"assets/images/img_interface4.png" 55 | }, 56 | { 57 | "id": 7, 58 | "category_id": 5, 59 | "title": "Gitar", 60 | "lesson_count": 5, 61 | "money": 250.0, 62 | "rating": 4.2, 63 | "image_path":"assets/images/img_interface1.png" 64 | }, 65 | { 66 | "id": 8, 67 | "category_id": 6, 68 | "title": "SMM Crash Course", 69 | "lesson_count": 28, 70 | "money": 50.0, 71 | "rating": 4.6, 72 | "image_path":"assets/images/img_interface3.png" 73 | }, 74 | { 75 | "id": 9, 76 | "category_id": 6, 77 | "title": "Youtube Marketing", 78 | "lesson_count": 15, 79 | "money": 50.0, 80 | "rating": 4.5, 81 | "image_path":"assets/images/img_interface4.png" 82 | } 83 | ] -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.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 = 50; 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 = 1300; 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 | DEVELOPMENT_TEAM = C5KZV4J7UV; 292 | ENABLE_BITCODE = NO; 293 | INFOPLIST_FILE = Runner/Info.plist; 294 | LD_RUNPATH_SEARCH_PATHS = ( 295 | "$(inherited)", 296 | "@executable_path/Frameworks", 297 | ); 298 | PRODUCT_BUNDLE_IDENTIFIER = com.example.courseCamp; 299 | PRODUCT_NAME = "$(TARGET_NAME)"; 300 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 301 | SWIFT_VERSION = 5.0; 302 | VERSIONING_SYSTEM = "apple-generic"; 303 | }; 304 | name = Profile; 305 | }; 306 | 97C147031CF9000F007C117D /* Debug */ = { 307 | isa = XCBuildConfiguration; 308 | buildSettings = { 309 | ALWAYS_SEARCH_USER_PATHS = NO; 310 | CLANG_ANALYZER_NONNULL = YES; 311 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 312 | CLANG_CXX_LIBRARY = "libc++"; 313 | CLANG_ENABLE_MODULES = YES; 314 | CLANG_ENABLE_OBJC_ARC = YES; 315 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 316 | CLANG_WARN_BOOL_CONVERSION = YES; 317 | CLANG_WARN_COMMA = YES; 318 | CLANG_WARN_CONSTANT_CONVERSION = YES; 319 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 320 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 321 | CLANG_WARN_EMPTY_BODY = YES; 322 | CLANG_WARN_ENUM_CONVERSION = YES; 323 | CLANG_WARN_INFINITE_RECURSION = YES; 324 | CLANG_WARN_INT_CONVERSION = YES; 325 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 326 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 327 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 328 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 329 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 330 | CLANG_WARN_STRICT_PROTOTYPES = YES; 331 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 332 | CLANG_WARN_UNREACHABLE_CODE = YES; 333 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 334 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 335 | COPY_PHASE_STRIP = NO; 336 | DEBUG_INFORMATION_FORMAT = dwarf; 337 | ENABLE_STRICT_OBJC_MSGSEND = YES; 338 | ENABLE_TESTABILITY = YES; 339 | GCC_C_LANGUAGE_STANDARD = gnu99; 340 | GCC_DYNAMIC_NO_PIC = NO; 341 | GCC_NO_COMMON_BLOCKS = YES; 342 | GCC_OPTIMIZATION_LEVEL = 0; 343 | GCC_PREPROCESSOR_DEFINITIONS = ( 344 | "DEBUG=1", 345 | "$(inherited)", 346 | ); 347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 348 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 349 | GCC_WARN_UNDECLARED_SELECTOR = YES; 350 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 351 | GCC_WARN_UNUSED_FUNCTION = YES; 352 | GCC_WARN_UNUSED_VARIABLE = YES; 353 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 354 | MTL_ENABLE_DEBUG_INFO = YES; 355 | ONLY_ACTIVE_ARCH = YES; 356 | SDKROOT = iphoneos; 357 | TARGETED_DEVICE_FAMILY = "1,2"; 358 | }; 359 | name = Debug; 360 | }; 361 | 97C147041CF9000F007C117D /* Release */ = { 362 | isa = XCBuildConfiguration; 363 | buildSettings = { 364 | ALWAYS_SEARCH_USER_PATHS = NO; 365 | CLANG_ANALYZER_NONNULL = YES; 366 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 367 | CLANG_CXX_LIBRARY = "libc++"; 368 | CLANG_ENABLE_MODULES = YES; 369 | CLANG_ENABLE_OBJC_ARC = YES; 370 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 371 | CLANG_WARN_BOOL_CONVERSION = YES; 372 | CLANG_WARN_COMMA = YES; 373 | CLANG_WARN_CONSTANT_CONVERSION = YES; 374 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 375 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 376 | CLANG_WARN_EMPTY_BODY = YES; 377 | CLANG_WARN_ENUM_CONVERSION = YES; 378 | CLANG_WARN_INFINITE_RECURSION = YES; 379 | CLANG_WARN_INT_CONVERSION = YES; 380 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 381 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 382 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 383 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 384 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 385 | CLANG_WARN_STRICT_PROTOTYPES = YES; 386 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 387 | CLANG_WARN_UNREACHABLE_CODE = YES; 388 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 389 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 390 | COPY_PHASE_STRIP = NO; 391 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 392 | ENABLE_NS_ASSERTIONS = NO; 393 | ENABLE_STRICT_OBJC_MSGSEND = YES; 394 | GCC_C_LANGUAGE_STANDARD = gnu99; 395 | GCC_NO_COMMON_BLOCKS = YES; 396 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 397 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 398 | GCC_WARN_UNDECLARED_SELECTOR = YES; 399 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 400 | GCC_WARN_UNUSED_FUNCTION = YES; 401 | GCC_WARN_UNUSED_VARIABLE = YES; 402 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 403 | MTL_ENABLE_DEBUG_INFO = NO; 404 | SDKROOT = iphoneos; 405 | SUPPORTED_PLATFORMS = iphoneos; 406 | SWIFT_COMPILATION_MODE = wholemodule; 407 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 408 | TARGETED_DEVICE_FAMILY = "1,2"; 409 | VALIDATE_PRODUCT = YES; 410 | }; 411 | name = Release; 412 | }; 413 | 97C147061CF9000F007C117D /* Debug */ = { 414 | isa = XCBuildConfiguration; 415 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 416 | buildSettings = { 417 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 418 | CLANG_ENABLE_MODULES = YES; 419 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 420 | DEVELOPMENT_TEAM = C5KZV4J7UV; 421 | ENABLE_BITCODE = NO; 422 | INFOPLIST_FILE = Runner/Info.plist; 423 | LD_RUNPATH_SEARCH_PATHS = ( 424 | "$(inherited)", 425 | "@executable_path/Frameworks", 426 | ); 427 | PRODUCT_BUNDLE_IDENTIFIER = com.example.courseCamp; 428 | PRODUCT_NAME = "$(TARGET_NAME)"; 429 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 430 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 431 | SWIFT_VERSION = 5.0; 432 | VERSIONING_SYSTEM = "apple-generic"; 433 | }; 434 | name = Debug; 435 | }; 436 | 97C147071CF9000F007C117D /* Release */ = { 437 | isa = XCBuildConfiguration; 438 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 439 | buildSettings = { 440 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 441 | CLANG_ENABLE_MODULES = YES; 442 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 443 | DEVELOPMENT_TEAM = C5KZV4J7UV; 444 | ENABLE_BITCODE = NO; 445 | INFOPLIST_FILE = Runner/Info.plist; 446 | LD_RUNPATH_SEARCH_PATHS = ( 447 | "$(inherited)", 448 | "@executable_path/Frameworks", 449 | ); 450 | PRODUCT_BUNDLE_IDENTIFIER = com.example.courseCamp; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 453 | SWIFT_VERSION = 5.0; 454 | VERSIONING_SYSTEM = "apple-generic"; 455 | }; 456 | name = Release; 457 | }; 458 | /* End XCBuildConfiguration section */ 459 | 460 | /* Begin XCConfigurationList section */ 461 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 462 | isa = XCConfigurationList; 463 | buildConfigurations = ( 464 | 97C147031CF9000F007C117D /* Debug */, 465 | 97C147041CF9000F007C117D /* Release */, 466 | 249021D3217E4FDB00AE95B9 /* Profile */, 467 | ); 468 | defaultConfigurationIsVisible = 0; 469 | defaultConfigurationName = Release; 470 | }; 471 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 472 | isa = XCConfigurationList; 473 | buildConfigurations = ( 474 | 97C147061CF9000F007C117D /* Debug */, 475 | 97C147071CF9000F007C117D /* Release */, 476 | 249021D4217E4FDB00AE95B9 /* Profile */, 477 | ); 478 | defaultConfigurationIsVisible = 0; 479 | defaultConfigurationName = Release; 480 | }; 481 | /* End XCConfigurationList section */ 482 | }; 483 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 484 | } 485 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Course Camp 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | course_camp 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/data/repository/category_repository_impl.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/data/source/category_local_data_source.dart'; 2 | import 'package:course_camp/domain/entity/course_category.dart'; 3 | import 'package:course_camp/domain/repository/category_repository.dart'; 4 | 5 | class CategoryRepositoryImpl extends CategoryRepository { 6 | final CategoryLocalDataSource _categoryLocalDataSource; 7 | 8 | CategoryRepositoryImpl(this._categoryLocalDataSource); 9 | 10 | @override 11 | Future> getCategories() => 12 | _categoryLocalDataSource.getCategories(); 13 | } 14 | -------------------------------------------------------------------------------- /lib/data/repository/course_repository_impl.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/data/source/course_local_data_source.dart'; 2 | import 'package:course_camp/domain/entity/course.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | import '../../domain/repository/course_repository.dart'; 6 | 7 | class CourseRepositoryImpl extends CourseRepository { 8 | final CourseLocalDataSource _courseLocalDataSource; 9 | 10 | CourseRepositoryImpl(this._courseLocalDataSource); 11 | @override 12 | Future> getPopularCourses() => _courseLocalDataSource.getPopularCourses(); 13 | 14 | @override 15 | Future> getCoursesByCategoryId(int categoryId) => 16 | _courseLocalDataSource.getCoursesByCategoryId(categoryId); 17 | 18 | @override 19 | void addCourseToMyList(int courseId) { 20 | _courseLocalDataSource.addCourseToMyList(courseId); 21 | } 22 | 23 | @override 24 | Future> getMyCourses() => _courseLocalDataSource.getMyCourses(); 25 | 26 | @override 27 | RxMap get myCoursesIds => _courseLocalDataSource.myCoursesIds; 28 | } 29 | -------------------------------------------------------------------------------- /lib/data/source/category_local_data_source.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/data/utils/file_utils.dart'; 2 | import 'package:course_camp/domain/entity/course_category.dart'; 3 | import 'package:flutter/foundation.dart'; 4 | 5 | class CategoryLocalDataSource { 6 | Future> getCategories() async { 7 | final jsonString = await FileUtils.readJsonFile( 8 | '${FileUtils.jsonFileBasePath}categories.json'); 9 | return compute(CourseCategory.toList, jsonString); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/data/source/course_local_data_source.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/domain/entity/course.dart'; 2 | import 'package:flutter/foundation.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | import '../utils/file_utils.dart'; 6 | 7 | class CourseLocalDataSource { 8 | final RxMap myCoursesIds = RxMap(); 9 | 10 | Future> _getCourses() async { 11 | final jsonString = await FileUtils.readJsonFile('${FileUtils.jsonFileBasePath}courses.json'); 12 | final courses = await compute(Course.toList, jsonString); 13 | for (var element in courses) { 14 | element.isMyList = myCoursesIds[element.id] != null; 15 | } 16 | return courses; 17 | } 18 | 19 | Future> getCoursesByCategoryId(int categoryId) async { 20 | final courses = await _getCourses(); 21 | return courses.where((element) => element.categoryId == categoryId).toList(); 22 | } 23 | 24 | Future> getPopularCourses() async { 25 | final courses = await _getCourses(); 26 | return courses.where((element) => element.rating >= 4.5).toList(); 27 | } 28 | 29 | Future> getMyCourses() async { 30 | final courses = await _getCourses(); 31 | return courses.where((element) => element.isMyList).toList(); 32 | } 33 | 34 | void addCourseToMyList(int courseId) { 35 | myCoursesIds[courseId] = courseId; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/data/utils/file_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart' show rootBundle; 2 | 3 | class FileUtils { 4 | FileUtils._(); 5 | 6 | static const jsonFileBasePath = 'assets/raw/'; 7 | 8 | static Future readJsonFile(String path) async { 9 | return await rootBundle.loadString(path); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/data/utils/perser.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | class Parser { 4 | Parser._(); 5 | 6 | static List toList(String jsonString, MapperFunc mapper) => 7 | jsonDecode(jsonString) 8 | .cast>() 9 | .map((json) => mapper.call(json)) 10 | .toList(); 11 | } 12 | 13 | typedef MapperFunc = T Function(Map); 14 | -------------------------------------------------------------------------------- /lib/domain/entity/course.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | import '../../data/utils/perser.dart'; 4 | 5 | part 'course.g.dart'; 6 | 7 | @JsonSerializable() 8 | class Course { 9 | final int id; 10 | @JsonKey(name: 'category_id') 11 | final int categoryId; 12 | final String title; 13 | @JsonKey(name: 'lesson_count') 14 | final int lessonCount; 15 | final double money; 16 | final double rating; 17 | @JsonKey(name: 'image_path') 18 | final String imagePath; 19 | 20 | bool isMyList = false; 21 | 22 | Course({ 23 | required this.id, 24 | required this.categoryId, 25 | required this.title, 26 | required this.lessonCount, 27 | required this.money, 28 | required this.rating, 29 | required this.imagePath, 30 | }); 31 | 32 | factory Course.fromJson(Map json) => _$CourseFromJson(json); 33 | 34 | Map toJson() => _$CourseToJson(this); 35 | 36 | static List toList(String jsonString) => 37 | Parser.toList(jsonString, Course.fromJson); 38 | } 39 | -------------------------------------------------------------------------------- /lib/domain/entity/course.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'course.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Course _$CourseFromJson(Map json) => Course( 10 | id: json['id'] as int, 11 | categoryId: json['category_id'] as int, 12 | title: json['title'] as String, 13 | lessonCount: json['lesson_count'] as int, 14 | money: (json['money'] as num).toDouble(), 15 | rating: (json['rating'] as num).toDouble(), 16 | imagePath: json['image_path'] as String, 17 | ); 18 | 19 | Map _$CourseToJson(Course instance) => { 20 | 'id': instance.id, 21 | 'category_id': instance.categoryId, 22 | 'title': instance.title, 23 | 'lesson_count': instance.lessonCount, 24 | 'money': instance.money, 25 | 'rating': instance.rating, 26 | 'image_path': instance.imagePath, 27 | }; 28 | -------------------------------------------------------------------------------- /lib/domain/entity/course_category.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:course_camp/data/utils/perser.dart'; 4 | 5 | class CourseCategory { 6 | final int id; 7 | final String name; 8 | 9 | CourseCategory({required this.id, required this.name}); 10 | 11 | factory CourseCategory.fromJson(Map json) => CourseCategory( 12 | id: json['id'], 13 | name: json['name'], 14 | ); 15 | 16 | Map toJson() { 17 | final Map data = {}; 18 | data['id'] = id; 19 | data['name'] = name; 20 | return data; 21 | } 22 | 23 | static List toList(String jsonString) => 24 | Parser.toList(jsonString, CourseCategory.fromJson); 25 | } 26 | -------------------------------------------------------------------------------- /lib/domain/repository/category_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/domain/entity/course_category.dart'; 2 | 3 | abstract class CategoryRepository { 4 | Future> getCategories(); 5 | } 6 | -------------------------------------------------------------------------------- /lib/domain/repository/course_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/domain/entity/course.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | abstract class CourseRepository { 5 | Future> getPopularCourses(); 6 | Future> getCoursesByCategoryId(int categoryId); 7 | Future> getMyCourses(); 8 | void addCourseToMyList(int courseId); 9 | RxMap get myCoursesIds; 10 | } 11 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/route/app_routes.dart'; 2 | import 'package:course_camp/presentation/core/theme/light_theme.dart'; 3 | import 'package:course_camp/presentation/core/utils/screen_util.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/services.dart'; 6 | import 'package:get/get.dart'; 7 | 8 | import 'presentation/core/route/app_pages.dart'; 9 | import 'presentation/page/onboarding/onboarding_bindings.dart'; 10 | 11 | void main() async { 12 | await ScreenUtil.ensureScreenSize(); 13 | SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( 14 | statusBarColor: Colors.transparent, 15 | statusBarBrightness: Brightness.light, 16 | statusBarIconBrightness: Brightness.dark, // transparent status bar 17 | )); 18 | runApp(const MyApp()); 19 | } 20 | 21 | class MyApp extends StatelessWidget { 22 | const MyApp({Key? key}) : super(key: key); 23 | 24 | // This widget is the root of your application. 25 | @override 26 | Widget build(BuildContext context) { 27 | ScreenUtil.init(allowFontScaling: true); 28 | return GetMaterialApp( 29 | title: 'Flutter Demo', 30 | theme: lightTheme, 31 | initialRoute: Routes.onboarding, 32 | initialBinding: OnboardingBindings(), 33 | getPages: AppPages.pages, 34 | debugShowCheckedModeBanner: false, 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/presentation/core/base/anim_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/base/base_controller.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | class AnimController extends BaseController with GetTickerProviderStateMixin { 6 | late AnimationController _animController; 7 | AnimationController get animController => _animController; 8 | 9 | @override 10 | void onInit() { 11 | super.onInit(); 12 | _animController = AnimationController( 13 | vsync: this, 14 | duration: const Duration(seconds: 2), 15 | ); 16 | } 17 | 18 | @override 19 | void onClose() { 20 | super.onClose(); 21 | _animController.dispose(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/presentation/core/base/base_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:get/get.dart'; 2 | 3 | abstract class BaseController extends GetxController {} 4 | -------------------------------------------------------------------------------- /lib/presentation/core/base/base_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | import 'base_controller.dart'; 5 | 6 | abstract class BasePage extends GetView { 7 | const BasePage({Key? key}) : super(key: key); 8 | } 9 | -------------------------------------------------------------------------------- /lib/presentation/core/route/app_pages.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/page/course/course_bindings.dart'; 2 | import 'package:course_camp/presentation/page/course/course_page.dart'; 3 | import 'package:course_camp/presentation/page/main/main_bindings.dart'; 4 | import 'package:course_camp/presentation/page/main/main_page.dart'; 5 | import 'package:course_camp/presentation/page/onboarding/onboarding_bindings.dart'; 6 | import 'package:course_camp/presentation/page/onboarding/onboarding_page.dart'; 7 | import 'package:get/get.dart'; 8 | 9 | import 'app_routes.dart'; 10 | 11 | abstract class AppPages { 12 | static final pages = [ 13 | GetPage( 14 | name: Routes.onboarding, 15 | page: () => const OnboardingPage(), 16 | binding: OnboardingBindings(), 17 | ), 18 | GetPage( 19 | name: Routes.main, 20 | page: () => const MainPage(), 21 | binding: MainBindings(), 22 | ), 23 | GetPage( 24 | name: Routes.course, 25 | page: () => const CoursePage(), 26 | binding: CourseBindings(), 27 | ), 28 | ]; 29 | } 30 | -------------------------------------------------------------------------------- /lib/presentation/core/route/app_routes.dart: -------------------------------------------------------------------------------- 1 | abstract class Routes { 2 | static const onboarding = '/onboarding'; 3 | static const main = '/main'; 4 | static const course = '/course'; 5 | static const userCourses = '/user_courses'; 6 | } 7 | -------------------------------------------------------------------------------- /lib/presentation/core/theme/light_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/utils/screen_util.dart'; 2 | import 'package:course_camp/presentation/core/values/colors.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | ThemeData get lightTheme { 6 | final ThemeData base = ThemeData.light(); 7 | return base.copyWith( 8 | scaffoldBackgroundColor: Colors.white, 9 | // backgroundColor: CustomColors.backgroundLightGrey, 10 | textTheme: _textTheme, 11 | primaryColor: Colors.blue, 12 | // appBarTheme: _appBarTheme, 13 | ); 14 | } 15 | 16 | // AppBarTheme get _appBarTheme => AppBarTheme( 17 | // backgroundColor: CustomColors.backgroundLightGrey, 18 | // foregroundColor: CustomColors.black, 19 | // elevation: 0, 20 | // centerTitle: false, 21 | // ); 22 | 23 | TextTheme get _textTheme { 24 | const baseTextStyle = TextStyle( 25 | color: CustomColors.darkerText, 26 | ); 27 | return TextTheme( 28 | headline1: baseTextStyle.copyWith( 29 | fontSize: 30.toFont, 30 | fontWeight: FontWeight.bold, 31 | ), 32 | headline2: baseTextStyle.copyWith( 33 | fontSize: 25.toFont, 34 | fontWeight: FontWeight.bold, 35 | color: CustomColors.darkerText, 36 | ), 37 | headline3: baseTextStyle.copyWith( 38 | fontSize: 22.toFont, 39 | fontWeight: FontWeight.bold, 40 | letterSpacing: 0.27, 41 | color: CustomColors.darkerText, 42 | ), 43 | headline4: baseTextStyle.copyWith( 44 | fontSize: 22.toFont, 45 | fontWeight: FontWeight.w600, 46 | letterSpacing: 0.27, 47 | color: CustomColors.darkerText, 48 | ), 49 | headline5: baseTextStyle.copyWith( 50 | fontWeight: FontWeight.w600, 51 | fontSize: 18.toFont, 52 | letterSpacing: 0.27, 53 | color: Colors.blueGrey, 54 | ), 55 | headline6: baseTextStyle.copyWith( 56 | fontSize: 16.toFont, 57 | fontWeight: FontWeight.bold, 58 | color: CustomColors.lightGrey, 59 | ), 60 | subtitle1: baseTextStyle.copyWith( 61 | fontSize: 16.toFont, 62 | fontWeight: FontWeight.w600, 63 | letterSpacing: 0.2, 64 | color: CustomColors.lightGrey, 65 | ), 66 | subtitle2: baseTextStyle.copyWith( 67 | fontSize: 16.toFont, 68 | fontWeight: FontWeight.w600, 69 | letterSpacing: 0.27, 70 | color: CustomColors.darkerText, 71 | ), 72 | bodyText1: baseTextStyle.copyWith( 73 | fontSize: 14.toFont, 74 | fontWeight: FontWeight.normal, 75 | letterSpacing: 0.2, 76 | ), 77 | bodyText2: baseTextStyle.copyWith( 78 | fontSize: 12.toFont, 79 | fontWeight: FontWeight.w600, 80 | letterSpacing: 0.27, 81 | ), 82 | ); 83 | } 84 | -------------------------------------------------------------------------------- /lib/presentation/core/utils/constants.dart: -------------------------------------------------------------------------------- 1 | abstract class ImagePath { 2 | static const basePath = 'assets/images/'; 3 | } 4 | -------------------------------------------------------------------------------- /lib/presentation/core/utils/screen_util.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class ScreenUtil { 6 | static ScreenUtil? _instance; 7 | static const int defaultWidth = 375; 8 | static const int defaultHeight = 812; 9 | 10 | late num uiWidthPx; 11 | late num uiHeightPx; 12 | 13 | late bool allowFontScaling; 14 | 15 | static double? _screenWidth; 16 | static double? _screenHeight; 17 | static double? _pixelRatio; 18 | static double? _statusBarHeight; 19 | static double? _bottomBarHeight; 20 | static double? _textScaleFactor; 21 | 22 | ScreenUtil._(); 23 | 24 | factory ScreenUtil() { 25 | return _instance!; 26 | } 27 | 28 | static Future ensureScreenSize([ 29 | FlutterWindow? window, 30 | Duration duration = const Duration(milliseconds: 10), 31 | ]) async { 32 | final binding = WidgetsFlutterBinding.ensureInitialized(); 33 | window ??= binding.window; 34 | 35 | if (window.viewConfiguration.geometry.isEmpty) { 36 | return Future.delayed(duration, () async { 37 | binding.deferFirstFrame(); 38 | await ensureScreenSize(window, duration); 39 | return binding.allowFirstFrame(); 40 | }); 41 | } 42 | } 43 | 44 | static void init( 45 | {num width = defaultWidth, num height = defaultHeight, bool allowFontScaling = false}) { 46 | _instance ??= ScreenUtil._(); 47 | _instance!.uiWidthPx = defaultWidth; 48 | _instance!.uiHeightPx = defaultHeight; 49 | _instance!.allowFontScaling = false; 50 | _pixelRatio = window.devicePixelRatio; 51 | _screenWidth = window.physicalSize.width; 52 | _screenHeight = window.physicalSize.height; 53 | _statusBarHeight = window.padding.top; 54 | _bottomBarHeight = window.padding.bottom; 55 | _textScaleFactor = window.textScaleFactor; 56 | } 57 | 58 | /// The number of font pixels for each logical pixel. 59 | static double? get textScaleFactor => _textScaleFactor; 60 | 61 | /// The size of the media in logical pixels (e.g, the size of the screen). 62 | static double? get pixelRatio => _pixelRatio; 63 | 64 | /// The horizontal extent of this size. 65 | static double get screenWidth => _screenWidth! / _pixelRatio!; 66 | 67 | ///The vertical extent of this size. dp 68 | static double get screenHeight => _screenHeight! / _pixelRatio!; 69 | 70 | /// The vertical extent of this size. px 71 | static double? get screenWidthPx => _screenWidth; 72 | 73 | /// The vertical extent of this size. px 74 | static double? get screenHeightPx => _screenHeight; 75 | 76 | /// The offset from the top 77 | static double get statusBarHeight => _statusBarHeight! / _pixelRatio!; 78 | 79 | /// The offset from the top 80 | static double? get statusBarHeightPx => _statusBarHeight; 81 | 82 | /// The offset from the bottom. 83 | static double? get bottomBarHeight => _bottomBarHeight; 84 | 85 | /// The ratio of the actual dp to the design draft px 86 | double get scaleWidth => screenWidth / uiWidthPx; 87 | 88 | double get scaleHeight => screenHeight / uiHeightPx; 89 | 90 | double get scaleText => scaleWidth; 91 | 92 | /// Adapted to the device width of the UI Design. 93 | /// Height can also be adapted according to this to ensure no deformation , 94 | /// if you want a square 95 | num setWidth(num width) => width * scaleWidth; 96 | 97 | /// Highly adaptable to the device according to UI Design 98 | /// It is recommended to use this method to achieve a high degree of adaptation 99 | /// when it is found that one screen in the UI design 100 | /// does not match the current style effect, or if there is a difference in shape. 101 | num setHeight(num height) => height * scaleHeight; 102 | 103 | ///@param [fontSize] UI设计上字体的大小,单位px. 104 | ///Font size adaptation method 105 | ///@param [fontSize] The size of the font on the UI design, in px. 106 | ///@param [allowFontScaling] 107 | num setSp(num fontSize, {bool? allowFontScalingSelf}) => allowFontScalingSelf == null 108 | ? (allowFontScaling ? (fontSize * scaleText) : ((fontSize * scaleText) / _textScaleFactor!)) 109 | : (allowFontScalingSelf 110 | ? (fontSize * scaleText) 111 | : ((fontSize * scaleText) / _textScaleFactor!)); 112 | } 113 | 114 | extension ScreenUtilsExtension on num { 115 | double get toHeight => ScreenUtil().setHeight(this) as double; 116 | double get toWidth => ScreenUtil().setWidth(this) as double; 117 | double get toFont => ScreenUtil().setSp(this) as double; 118 | } 119 | 120 | class MafEdgeInsets { 121 | MafEdgeInsets._privateConstructor(); 122 | 123 | static final MafEdgeInsets instance = MafEdgeInsets._privateConstructor(); 124 | 125 | factory MafEdgeInsets() { 126 | return instance; 127 | } 128 | 129 | EdgeInsets all(double value) => 130 | EdgeInsets.symmetric(vertical: value.toHeight, horizontal: value.toWidth); 131 | 132 | EdgeInsets only({double left = 0.0, double top = 0.0, double right = 0.0, double bottom = 0.0}) => 133 | EdgeInsets.only( 134 | top: top.toHeight, bottom: bottom.toHeight, left: left.toWidth, right: right.toWidth); 135 | 136 | EdgeInsets symmetric({ 137 | double vertical = 0.0, 138 | double horizontal = 0.0, 139 | }) => 140 | EdgeInsets.symmetric(vertical: vertical.toHeight, horizontal: horizontal.toWidth); 141 | 142 | EdgeInsets fromLTRB(double left, double top, double right, double bottom) => 143 | EdgeInsets.fromLTRB(left.toWidth, top.toHeight, right.toWidth, bottom.toHeight); 144 | } 145 | 146 | extension CustomTextFontExtension on TextStyle { 147 | TextStyle get convertFontSize => copyWith(fontSize: fontSize?.toFont); 148 | } 149 | -------------------------------------------------------------------------------- /lib/presentation/core/values/colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | abstract class CustomColors { 4 | static const lightBlueGrey = Color(0xFFEFF9FF); 5 | static const darkText = Color(0xFF253840); 6 | static const lightGrey = Color(0xFFB9BABC); 7 | static const Color darkerText = Color(0xFF17262A); 8 | } 9 | -------------------------------------------------------------------------------- /lib/presentation/core/values/dimens.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/utils/screen_util.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class Spacing { 5 | Spacing._(); 6 | 7 | static final h48 = SizedBox(width: 48.toWidth); 8 | static final v48 = SizedBox(height: 48.toHeight); 9 | static final v16 = SizedBox(height: 16.toHeight); 10 | static final h16 = SizedBox(width: 16.toWidth); 11 | static final v8 = SizedBox(height: 8.toHeight); 12 | static final v4 = SizedBox(height: 4.toHeight); 13 | } 14 | 15 | class Paddings { 16 | Paddings._(); 17 | 18 | static final all4 = EdgeInsets.all(4.toWidth); 19 | static final all8 = EdgeInsets.all(8.toWidth); 20 | static final all24 = EdgeInsets.all(24.toWidth); 21 | static final v16 = EdgeInsets.symmetric(vertical: 16.toHeight); 22 | static final v20 = EdgeInsets.symmetric(vertical: 20.toHeight); 23 | static final h16 = EdgeInsets.symmetric(horizontal: 16.toWidth); 24 | static final h20 = EdgeInsets.symmetric(horizontal: 20.toWidth); 25 | static final h60 = EdgeInsets.symmetric(horizontal: 60.toWidth); 26 | static final v8 = EdgeInsets.symmetric(vertical: 8.toHeight); 27 | static final v12h18 = EdgeInsets.symmetric(vertical: 12.toHeight, horizontal: 18.toWidth); 28 | static final v16h20 = EdgeInsets.symmetric(vertical: 16.toHeight, horizontal: 20.toWidth); 29 | static final b16r16 = EdgeInsets.only(bottom: 16.toHeight, right: 16.toWidth); 30 | } 31 | 32 | class BorderRadii { 33 | BorderRadii._(); 34 | 35 | static const all24 = BorderRadius.all(Radius.circular(24)); 36 | static const all16 = BorderRadius.all(Radius.circular(16)); 37 | static const all13 = BorderRadius.all(Radius.circular(13)); 38 | static const all8 = BorderRadius.all(Radius.circular(8)); 39 | static const tl16tr16 = BorderRadius.only( 40 | topRight: Radius.circular(16), 41 | topLeft: Radius.circular(16), 42 | ); 43 | } 44 | -------------------------------------------------------------------------------- /lib/presentation/core/values/strings.dart: -------------------------------------------------------------------------------- 1 | const labelHome = 'Home'; 2 | const labelMyCourses = 'My Courses'; 3 | const labelUser = 'User'; 4 | -------------------------------------------------------------------------------- /lib/presentation/page/course/course_bindings.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/page/course/course_controller.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class CourseBindings extends Bindings { 5 | @override 6 | void dependencies() { 7 | Get.lazyPut(() => CourseController()); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/presentation/page/course/course_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/base/base_controller.dart'; 2 | 3 | class CourseController extends BaseController {} 4 | -------------------------------------------------------------------------------- /lib/presentation/page/course/course_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/base/base_page.dart'; 2 | import 'package:course_camp/presentation/page/course/course_controller.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class CoursePage extends BasePage { 6 | const CoursePage({Key? key}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/presentation/page/course/user_courses_bindings.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/page/course/user_courses_controller.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class UserCoursesBindings extends Bindings { 5 | @override 6 | void dependencies() { 7 | Get.lazyPut(() => UserCoursesController(Get.find())); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/presentation/page/course/user_courses_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/domain/entity/course.dart'; 2 | import 'package:course_camp/domain/repository/course_repository.dart'; 3 | import 'package:course_camp/presentation/core/base/anim_controller.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | class UserCoursesController extends AnimController { 7 | final CourseRepository _courseRepository; 8 | 9 | UserCoursesController(this._courseRepository); 10 | 11 | final RxList _courses = RxList(); 12 | List get courses => _courses; 13 | 14 | @override 15 | void onInit() { 16 | super.onInit(); 17 | _courseRepository.myCoursesIds.listen((value) { 18 | _getMyCourses(); 19 | }); 20 | } 21 | 22 | void _getMyCourses() async { 23 | _courses.value = await _courseRepository.getMyCourses(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/presentation/page/course/user_courses_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/base/base_page.dart'; 2 | import 'package:course_camp/presentation/core/utils/screen_util.dart'; 3 | import 'package:course_camp/presentation/core/values/dimens.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:get/get.dart'; 6 | 7 | import '../../core/values/colors.dart'; 8 | import '../home/views/popular_course_list_view.dart'; 9 | import 'user_courses_controller.dart'; 10 | import 'views/my_courses_list_view.dart'; 11 | 12 | class UserCoursesPage extends BasePage { 13 | const UserCoursesPage({Key? key}) : super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | body: Column( 19 | children: [ 20 | SizedBox( 21 | height: MediaQuery.of(context).padding.top, 22 | ), 23 | Spacing.v16, 24 | _appBar, 25 | Expanded( 26 | child: ListView( 27 | children: [ 28 | _getSearchBarUI(), 29 | const MyCoursesListView(), 30 | ], 31 | ), 32 | ), 33 | ], 34 | ), 35 | ); 36 | } 37 | 38 | Widget get _appBar { 39 | return Padding( 40 | padding: Paddings.h20, 41 | child: Row( 42 | children: [ 43 | Expanded( 44 | child: Column( 45 | mainAxisAlignment: MainAxisAlignment.end, 46 | crossAxisAlignment: CrossAxisAlignment.start, 47 | children: [ 48 | Text( 49 | 'Explore', 50 | textAlign: TextAlign.left, 51 | style: Get.textTheme.bodyText1?.copyWith(color: Colors.blueGrey), 52 | ), 53 | Text( 54 | 'My Courses', 55 | textAlign: TextAlign.left, 56 | style: Get.textTheme.headline2, 57 | ), 58 | ], 59 | ), 60 | ), 61 | ], 62 | ), 63 | ); 64 | } 65 | 66 | Widget _getSearchBarUI() { 67 | return Padding( 68 | padding: Paddings.h20, 69 | child: Row( 70 | crossAxisAlignment: CrossAxisAlignment.start, 71 | children: [ 72 | SizedBox( 73 | width: Get.width * 0.75, 74 | height: 65.toHeight, 75 | child: Padding( 76 | padding: Paddings.v8, 77 | child: Container( 78 | decoration: const BoxDecoration( 79 | color: Color(0xFFF8FAFB), 80 | borderRadius: BorderRadii.all13, 81 | ), 82 | child: Row( 83 | children: [ 84 | Expanded( 85 | child: Container( 86 | padding: Paddings.h16, 87 | child: TextFormField( 88 | style: Get.textTheme.headline6?.copyWith(color: Colors.lightBlue), 89 | keyboardType: TextInputType.text, 90 | decoration: InputDecoration( 91 | labelText: 'Search for course', 92 | border: InputBorder.none, 93 | helperStyle: Get.textTheme.headline6, 94 | labelStyle: Get.textTheme.subtitle1, 95 | ), 96 | onEditingComplete: () {}, 97 | ), 98 | ), 99 | ), 100 | SizedBox( 101 | width: 60.toWidth, 102 | height: 60.toWidth, 103 | child: const Icon(Icons.search, color: CustomColors.lightGrey), 104 | ) 105 | ], 106 | ), 107 | ), 108 | ), 109 | ), 110 | ], 111 | ), 112 | ); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /lib/presentation/page/course/views/my_courses_list_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/domain/entity/course.dart'; 2 | import 'package:course_camp/presentation/core/utils/screen_util.dart'; 3 | import 'package:course_camp/presentation/core/values/dimens.dart'; 4 | import 'package:course_camp/presentation/page/course/user_courses_controller.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:get/get.dart'; 7 | 8 | class MyCoursesListView extends StatelessWidget { 9 | const MyCoursesListView({Key? key}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Padding( 14 | padding: Paddings.h20, 15 | child: Obx(_listBuilder), 16 | ); 17 | } 18 | 19 | Widget _listBuilder() { 20 | UserCoursesController controller = Get.find(); 21 | return ListView.separated( 22 | padding: Paddings.v16, 23 | itemCount: controller.courses.length, 24 | physics: const NeverScrollableScrollPhysics(), 25 | shrinkWrap: true, 26 | itemBuilder: (BuildContext context, int index) { 27 | final int count = controller.courses.length > 10 ? 10 : controller.courses.length; 28 | final Animation animation = Tween(begin: 0.0, end: 1.0).animate( 29 | CurvedAnimation( 30 | parent: controller.animController, 31 | curve: Interval((1 / count) * index, 1.0, curve: Curves.fastOutSlowIn))); 32 | controller.animController.forward(); 33 | 34 | return _CourseView( 35 | category: controller.courses[index], 36 | animation: animation, 37 | animationController: controller.animController, 38 | ); 39 | }, 40 | separatorBuilder: (BuildContext context, int index) => Spacing.v16, 41 | ); 42 | } 43 | } 44 | 45 | class _CourseView extends StatelessWidget { 46 | const _CourseView({ 47 | Key? key, 48 | required this.category, 49 | required this.animationController, 50 | this.animation, 51 | this.callback, 52 | }) : super(key: key); 53 | 54 | final VoidCallback? callback; 55 | final Course category; 56 | final AnimationController animationController; 57 | final Animation? animation; 58 | 59 | @override 60 | Widget build(BuildContext context) { 61 | return AnimatedBuilder( 62 | animation: animationController, 63 | builder: (BuildContext context, Widget? child) { 64 | return FadeTransition( 65 | opacity: animation!, 66 | child: Transform( 67 | transform: Matrix4.translationValues(100 * (1.0 - animation!.value), 0.0, 0.0), 68 | child: InkWell( 69 | splashColor: Colors.transparent, 70 | onTap: callback, 71 | child: SizedBox( 72 | width: Get.width, 73 | height: 125.toHeight, 74 | child: Stack( 75 | children: [ 76 | Row( 77 | children: [ 78 | Expanded( 79 | child: Container( 80 | decoration: const BoxDecoration( 81 | color: Color(0xFFF8FAFB), 82 | borderRadius: BorderRadii.all16, 83 | ), 84 | child: Row( 85 | children: [ 86 | Spacing.h16, 87 | Expanded( 88 | child: Column( 89 | crossAxisAlignment: CrossAxisAlignment.start, 90 | children: [ 91 | Padding( 92 | padding: const EdgeInsets.only(top: 16, right: 8), 93 | child: Text( 94 | category.title, 95 | textAlign: TextAlign.left, 96 | style: Get.textTheme.subtitle2, 97 | ), 98 | ), 99 | const Expanded( 100 | child: SizedBox(), 101 | ), 102 | Padding( 103 | padding: const EdgeInsets.only(right: 16, bottom: 8), 104 | child: Row( 105 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 106 | crossAxisAlignment: CrossAxisAlignment.center, 107 | children: [ 108 | Text( 109 | '${category.lessonCount} lesson', 110 | textAlign: TextAlign.left, 111 | style: Get.textTheme.bodyText2?.copyWith( 112 | fontWeight: FontWeight.w300, 113 | color: Colors.blueGrey, 114 | ), 115 | ), 116 | Row( 117 | children: [ 118 | Text( 119 | '${category.rating}', 120 | textAlign: TextAlign.left, 121 | style: Get.textTheme.headline5?.copyWith( 122 | fontWeight: FontWeight.w300, 123 | ), 124 | ), 125 | const Icon( 126 | Icons.star, 127 | color: Colors.blue, 128 | size: 20, 129 | ), 130 | ], 131 | ) 132 | ], 133 | ), 134 | ), 135 | Padding( 136 | padding: Paddings.b16r16, 137 | child: Text( 138 | '\$${category.money}', 139 | textAlign: TextAlign.left, 140 | style: const TextStyle( 141 | fontWeight: FontWeight.w600, 142 | fontSize: 18, 143 | letterSpacing: 0.27, 144 | color: Colors.blue, 145 | ), 146 | ), 147 | ), 148 | ], 149 | ), 150 | ), 151 | Spacing.h48, 152 | ], 153 | ), 154 | ), 155 | ), 156 | SizedBox( 157 | width: 60.toWidth, 158 | ), 159 | ], 160 | ), 161 | Align( 162 | alignment: Alignment.centerRight, 163 | child: Padding( 164 | padding: Paddings.all24, 165 | child: ClipRRect( 166 | borderRadius: BorderRadii.all16, 167 | child: 168 | AspectRatio(aspectRatio: 1.0, child: Image.asset(category.imagePath)), 169 | ), 170 | ), 171 | ), 172 | ], 173 | ), 174 | ), 175 | ), 176 | ), 177 | ); 178 | }, 179 | ); 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /lib/presentation/page/home/home_bindings.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/data/repository/category_repository_impl.dart'; 2 | import 'package:course_camp/data/repository/course_repository_impl.dart'; 3 | import 'package:course_camp/data/source/category_local_data_source.dart'; 4 | import 'package:course_camp/data/source/course_local_data_source.dart'; 5 | import 'package:course_camp/domain/repository/category_repository.dart'; 6 | import 'package:course_camp/presentation/page/home/home_controller.dart'; 7 | import 'package:get/get.dart'; 8 | 9 | import '../../../domain/repository/course_repository.dart'; 10 | 11 | class HomeBindings extends Bindings { 12 | @override 13 | void dependencies() { 14 | Get.lazyPut(() => CategoryLocalDataSource()); 15 | Get.lazyPut(() => CourseLocalDataSource(), fenix: true); 16 | Get.lazyPut(() => CategoryRepositoryImpl(Get.find()), fenix: true); 17 | Get.lazyPut(() => CourseRepositoryImpl(Get.find()), fenix: true); 18 | Get.lazyPut(() => HomeController(Get.find(), Get.find())); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/presentation/page/home/home_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/domain/entity/course.dart'; 2 | import 'package:course_camp/domain/entity/course_category.dart'; 3 | import 'package:course_camp/domain/repository/category_repository.dart'; 4 | import 'package:course_camp/domain/repository/course_repository.dart'; 5 | import 'package:course_camp/presentation/core/base/anim_controller.dart'; 6 | import 'package:get/get.dart'; 7 | 8 | class HomeController extends AnimController { 9 | final CategoryRepository _categoryRepository; 10 | final CourseRepository _courseRepository; 11 | 12 | HomeController(this._categoryRepository, this._courseRepository); 13 | 14 | final RxInt _selectedCategoryIndex = 0.obs; 15 | int get selectedCategoryIndex => _selectedCategoryIndex.value; 16 | 17 | final RxList categories = RxList(); 18 | 19 | final RxList coursesByCategory = RxList(); 20 | 21 | final RxList popularCourses = RxList(); 22 | 23 | @override 24 | void onInit() { 25 | super.onInit(); 26 | _getCoursesByCategoryId(); 27 | _getPopularCourses(); 28 | } 29 | 30 | Future _getCategories() async { 31 | categories.value = await _categoryRepository.getCategories(); 32 | } 33 | 34 | void _getCoursesByCategoryId() async { 35 | if (categories.isEmpty) { 36 | await _getCategories(); 37 | } 38 | final categoryId = categories[selectedCategoryIndex].id; 39 | coursesByCategory.value = await _courseRepository.getCoursesByCategoryId(categoryId); 40 | } 41 | 42 | void _getPopularCourses() async { 43 | popularCourses.value = await _courseRepository.getPopularCourses(); 44 | } 45 | 46 | void onCategoryItemClick(int index) { 47 | _selectedCategoryIndex.value = index; 48 | _getCoursesByCategoryId(); 49 | } 50 | 51 | void addCourseToMyList(int courseId) { 52 | _courseRepository.addCourseToMyList(courseId); 53 | coursesByCategory.refresh(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/presentation/page/home/home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/base/base_page.dart'; 2 | import 'package:course_camp/presentation/core/utils/constants.dart'; 3 | import 'package:course_camp/presentation/core/utils/screen_util.dart'; 4 | import 'package:course_camp/presentation/core/values/colors.dart'; 5 | import 'package:course_camp/presentation/core/values/dimens.dart'; 6 | import 'package:course_camp/presentation/page/home/home_controller.dart'; 7 | import 'package:course_camp/presentation/page/home/views/course_horizontal_list_view.dart'; 8 | import 'package:course_camp/presentation/page/home/views/popular_course_list_view.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:get/get.dart'; 11 | 12 | class HomePage extends BasePage { 13 | const HomePage({Key? key}) : super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | body: Column( 19 | children: [ 20 | SizedBox( 21 | height: MediaQuery.of(context).padding.top, 22 | ), 23 | Spacing.v16, 24 | _appBar, 25 | Expanded( 26 | child: ListView( 27 | children: [ 28 | _getSearchBarUI(), 29 | _getCategoryUI(), 30 | getPopularCourseUI(), 31 | ], 32 | ), 33 | ), 34 | ], 35 | ), 36 | ); 37 | } 38 | 39 | Widget get _appBar { 40 | return Padding( 41 | padding: Paddings.h20, 42 | child: Row( 43 | children: [ 44 | Expanded( 45 | child: Column( 46 | mainAxisAlignment: MainAxisAlignment.end, 47 | crossAxisAlignment: CrossAxisAlignment.start, 48 | children: [ 49 | Text( 50 | 'Choose your', 51 | textAlign: TextAlign.left, 52 | style: Get.textTheme.bodyText1?.copyWith(color: Colors.blueGrey), 53 | ), 54 | Text( 55 | 'Design Course', 56 | textAlign: TextAlign.left, 57 | style: Get.textTheme.headline2, 58 | ), 59 | ], 60 | ), 61 | ), 62 | SizedBox( 63 | width: 50.toWidth, 64 | height: 50.toWidth, 65 | child: Image.asset('${ImagePath.basePath}img_user.png'), 66 | ) 67 | ], 68 | ), 69 | ); 70 | } 71 | 72 | Widget _getSearchBarUI() { 73 | return Padding( 74 | padding: Paddings.h20, 75 | child: Row( 76 | crossAxisAlignment: CrossAxisAlignment.start, 77 | children: [ 78 | SizedBox( 79 | width: Get.width * 0.75, 80 | height: 65.toHeight, 81 | child: Padding( 82 | padding: Paddings.v8, 83 | child: Container( 84 | decoration: const BoxDecoration( 85 | color: Color(0xFFF8FAFB), 86 | borderRadius: BorderRadii.all13, 87 | ), 88 | child: Row( 89 | children: [ 90 | Expanded( 91 | child: Container( 92 | padding: Paddings.h16, 93 | child: TextFormField( 94 | style: Get.textTheme.headline6?.copyWith(color: Colors.lightBlue), 95 | keyboardType: TextInputType.text, 96 | decoration: InputDecoration( 97 | labelText: 'Search for course', 98 | border: InputBorder.none, 99 | helperStyle: Get.textTheme.headline6, 100 | labelStyle: Get.textTheme.subtitle1, 101 | ), 102 | onEditingComplete: () {}, 103 | ), 104 | ), 105 | ), 106 | SizedBox( 107 | width: 60.toWidth, 108 | height: 60.toWidth, 109 | child: const Icon(Icons.search, color: CustomColors.lightGrey), 110 | ) 111 | ], 112 | ), 113 | ), 114 | ), 115 | ), 116 | ], 117 | ), 118 | ); 119 | } 120 | 121 | Widget _getCategoryUI() { 122 | return Column( 123 | crossAxisAlignment: CrossAxisAlignment.start, 124 | children: [ 125 | Spacing.v16, 126 | Padding( 127 | padding: Paddings.h20, 128 | child: Text( 129 | 'Category', 130 | textAlign: TextAlign.left, 131 | style: Get.textTheme.headline4, 132 | ), 133 | ), 134 | Spacing.v16, 135 | SizedBox( 136 | height: 40.toHeight, 137 | child: Obx( 138 | () => ListView.separated( 139 | shrinkWrap: true, 140 | padding: Paddings.h20, 141 | scrollDirection: Axis.horizontal, 142 | itemCount: controller.categories.length, 143 | itemBuilder: _categoryItemBuilder, 144 | separatorBuilder: (context, index) => Spacing.h16, 145 | ), 146 | ), 147 | ), 148 | Spacing.v16, 149 | const CourseHorizontalListView(), 150 | ], 151 | ); 152 | } 153 | 154 | Widget _categoryItemBuilder(BuildContext context, int index) { 155 | final category = controller.categories[index]; 156 | return Obx( 157 | () => Container( 158 | width: 100.toWidth, 159 | decoration: BoxDecoration( 160 | color: controller.selectedCategoryIndex == index ? Colors.blue : Colors.white, 161 | borderRadius: BorderRadii.all24, 162 | border: Border.all(color: Colors.blue)), 163 | child: Material( 164 | color: Colors.transparent, 165 | child: InkWell( 166 | splashColor: Colors.white24, 167 | borderRadius: BorderRadii.all24, 168 | onTap: () { 169 | controller.onCategoryItemClick(index); 170 | }, 171 | child: Padding( 172 | padding: Paddings.v12h18, 173 | child: Center( 174 | child: Text( 175 | category.name, 176 | textAlign: TextAlign.left, 177 | style: Get.textTheme.bodyText2?.copyWith( 178 | color: controller.selectedCategoryIndex == index ? Colors.white : Colors.blue, 179 | ), 180 | ), 181 | ), 182 | ), 183 | ), 184 | ), 185 | ), 186 | ); 187 | } 188 | 189 | Widget getPopularCourseUI() { 190 | return Padding( 191 | padding: Paddings.h20, 192 | child: Column( 193 | mainAxisAlignment: MainAxisAlignment.center, 194 | crossAxisAlignment: CrossAxisAlignment.start, 195 | mainAxisSize: MainAxisSize.min, 196 | children: [ 197 | Text( 198 | 'Popular Course', 199 | textAlign: TextAlign.left, 200 | style: Get.textTheme.headline4, 201 | ), 202 | const PopularCourseListView(), 203 | ], 204 | ), 205 | ); 206 | } 207 | } 208 | -------------------------------------------------------------------------------- /lib/presentation/page/home/views/course_horizontal_list_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/domain/entity/course.dart'; 2 | import 'package:course_camp/presentation/core/utils/screen_util.dart'; 3 | import 'package:course_camp/presentation/core/values/dimens.dart'; 4 | import 'package:course_camp/presentation/page/home/home_controller.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:get/get.dart'; 7 | 8 | class CourseHorizontalListView extends StatelessWidget { 9 | const CourseHorizontalListView({Key? key}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | final HomeController controller = Get.find(); 14 | return Padding( 15 | padding: Paddings.v16, 16 | child: SizedBox( 17 | height: 134.toHeight, 18 | width: double.infinity, 19 | child: Obx( 20 | () => ListView.builder( 21 | padding: Paddings.h16, 22 | itemCount: controller.coursesByCategory.length, 23 | scrollDirection: Axis.horizontal, 24 | itemBuilder: (BuildContext context, int index) { 25 | final int count = controller.coursesByCategory.length > 10 26 | ? 10 27 | : controller.coursesByCategory.length; 28 | final Animation animation = Tween(begin: 0.0, end: 1.0).animate( 29 | CurvedAnimation( 30 | parent: controller.animController, 31 | curve: Interval((1 / count) * index, 1.0, curve: Curves.fastOutSlowIn))); 32 | controller.animController.forward(); 33 | 34 | return _CourseView( 35 | category: controller.coursesByCategory[index], 36 | animation: animation, 37 | animationController: controller.animController, 38 | controller: controller, 39 | ); 40 | }, 41 | ), 42 | ), 43 | ), 44 | ); 45 | } 46 | } 47 | 48 | class _CourseView extends StatelessWidget { 49 | const _CourseView({ 50 | Key? key, 51 | required this.category, 52 | required this.animationController, 53 | this.animation, 54 | required this.controller, 55 | }) : super(key: key); 56 | 57 | final HomeController controller; 58 | final Course category; 59 | final AnimationController animationController; 60 | final Animation? animation; 61 | 62 | @override 63 | Widget build(BuildContext context) { 64 | return AnimatedBuilder( 65 | animation: animationController, 66 | builder: (BuildContext context, Widget? child) { 67 | return FadeTransition( 68 | opacity: animation!, 69 | child: Transform( 70 | transform: Matrix4.translationValues(100 * (1.0 - animation!.value), 0.0, 0.0), 71 | child: InkWell( 72 | splashColor: Colors.transparent, 73 | onTap: () {}, 74 | child: SizedBox( 75 | width: 280.toWidth, 76 | child: Stack( 77 | children: [ 78 | Row( 79 | children: [ 80 | Spacing.h48, 81 | Expanded( 82 | child: Container( 83 | decoration: const BoxDecoration( 84 | color: Color(0xFFF8FAFB), 85 | borderRadius: BorderRadii.all16, 86 | ), 87 | child: Row( 88 | children: [ 89 | const SizedBox( 90 | width: 48 + 24.0, 91 | ), 92 | Expanded( 93 | child: Column( 94 | crossAxisAlignment: CrossAxisAlignment.start, 95 | children: [ 96 | Padding( 97 | padding: const EdgeInsets.only(top: 16, right: 8), 98 | child: Text( 99 | category.title, 100 | textAlign: TextAlign.left, 101 | style: Get.textTheme.subtitle2, 102 | ), 103 | ), 104 | const Expanded( 105 | child: SizedBox(), 106 | ), 107 | Padding( 108 | padding: const EdgeInsets.only(right: 16, bottom: 8), 109 | child: Row( 110 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 111 | crossAxisAlignment: CrossAxisAlignment.center, 112 | children: [ 113 | Text( 114 | '${category.lessonCount} lesson', 115 | textAlign: TextAlign.left, 116 | style: Get.textTheme.bodyText2?.copyWith( 117 | fontWeight: FontWeight.w300, 118 | color: Colors.blueGrey, 119 | ), 120 | ), 121 | Row( 122 | children: [ 123 | Text( 124 | '${category.rating}', 125 | textAlign: TextAlign.left, 126 | style: Get.textTheme.headline5?.copyWith( 127 | fontWeight: FontWeight.w300, 128 | ), 129 | ), 130 | const Icon( 131 | Icons.star, 132 | color: Colors.blue, 133 | size: 20, 134 | ), 135 | ], 136 | ) 137 | ], 138 | ), 139 | ), 140 | Padding( 141 | padding: Paddings.b16r16, 142 | child: Row( 143 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 144 | crossAxisAlignment: CrossAxisAlignment.start, 145 | children: [ 146 | Text( 147 | '\$${category.money}', 148 | textAlign: TextAlign.left, 149 | style: const TextStyle( 150 | fontWeight: FontWeight.w600, 151 | fontSize: 18, 152 | letterSpacing: 0.27, 153 | color: Colors.blue, 154 | ), 155 | ), 156 | category.isMyList 157 | ? Container() 158 | : InkWell( 159 | onTap: () { 160 | category.isMyList = true; 161 | controller.addCourseToMyList(category.id); 162 | }, 163 | child: Container( 164 | decoration: const BoxDecoration( 165 | color: Colors.blue, 166 | borderRadius: BorderRadii.all8, 167 | ), 168 | child: Padding( 169 | padding: Paddings.all4, 170 | child: const Icon( 171 | Icons.add, 172 | color: Colors.white, 173 | ), 174 | ), 175 | ), 176 | ), 177 | ], 178 | ), 179 | ), 180 | ], 181 | ), 182 | ), 183 | ], 184 | ), 185 | ), 186 | ) 187 | ], 188 | ), 189 | Padding( 190 | padding: const EdgeInsets.only(top: 24, bottom: 24, left: 16), 191 | child: Row( 192 | children: [ 193 | ClipRRect( 194 | borderRadius: BorderRadii.all16, 195 | child: AspectRatio( 196 | aspectRatio: 1.0, child: Image.asset(category.imagePath)), 197 | ) 198 | ], 199 | ), 200 | ), 201 | ], 202 | ), 203 | ), 204 | ), 205 | ), 206 | ); 207 | }, 208 | ); 209 | } 210 | } 211 | -------------------------------------------------------------------------------- /lib/presentation/page/home/views/popular_course_list_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/utils/screen_util.dart'; 2 | import 'package:course_camp/presentation/core/values/dimens.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | import '../../../../domain/entity/course.dart'; 7 | import '../home_controller.dart'; 8 | 9 | class PopularCourseListView extends StatelessWidget { 10 | const PopularCourseListView({Key? key}) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | final HomeController controller = Get.find(); 15 | return Padding( 16 | padding: const EdgeInsets.only(top: 8), 17 | child: Obx( 18 | () => GridView( 19 | padding: Paddings.all8, 20 | shrinkWrap: true, 21 | physics: const NeverScrollableScrollPhysics(), 22 | children: List.generate( 23 | controller.popularCourses.length, 24 | (int index) { 25 | final int count = controller.popularCourses.length; 26 | final Animation animation = Tween(begin: 0.0, end: 1.0).animate( 27 | CurvedAnimation( 28 | parent: controller.animController, 29 | curve: Interval((1 / count) * index, 1.0, curve: Curves.fastOutSlowIn), 30 | ), 31 | ); 32 | controller.animController.forward(); 33 | return _CourseView( 34 | category: controller.popularCourses[index], 35 | animation: animation, 36 | animationController: controller.animController, 37 | ); 38 | }, 39 | ), 40 | gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( 41 | crossAxisCount: 2, 42 | mainAxisSpacing: 32.0, 43 | crossAxisSpacing: 32.0, 44 | childAspectRatio: 0.8, 45 | ), 46 | ), 47 | ), 48 | ); 49 | } 50 | } 51 | 52 | class _CourseView extends StatelessWidget { 53 | const _CourseView( 54 | {Key? key, 55 | required this.category, 56 | required this.animationController, 57 | this.animation, 58 | this.callback}) 59 | : super(key: key); 60 | 61 | final VoidCallback? callback; 62 | final Course category; 63 | final AnimationController animationController; 64 | final Animation? animation; 65 | 66 | @override 67 | Widget build(BuildContext context) { 68 | return AnimatedBuilder( 69 | animation: animationController, 70 | builder: (BuildContext context, Widget? child) { 71 | return FadeTransition( 72 | opacity: animation!, 73 | child: Transform( 74 | transform: Matrix4.translationValues(0.0, 50 * (1.0 - animation!.value), 0.0), 75 | child: InkWell( 76 | splashColor: Colors.transparent, 77 | onTap: callback, 78 | child: SizedBox( 79 | height: 280.toHeight, 80 | child: Stack( 81 | alignment: AlignmentDirectional.bottomCenter, 82 | children: [ 83 | Column( 84 | children: [ 85 | Expanded( 86 | child: Container( 87 | decoration: const BoxDecoration( 88 | color: Color(0xFFF8FAFB), 89 | borderRadius: BorderRadii.all16, 90 | // border: new Border.all( 91 | // color: DesignCourseAppTheme.notWhite), 92 | ), 93 | child: Column( 94 | children: [ 95 | Expanded( 96 | child: Column( 97 | children: [ 98 | Padding( 99 | padding: 100 | const EdgeInsets.only(top: 16, left: 16, right: 16), 101 | child: Text( 102 | category.title, 103 | textAlign: TextAlign.left, 104 | style: Get.textTheme.subtitle2, 105 | ), 106 | ), 107 | Padding( 108 | padding: const EdgeInsets.only( 109 | top: 8, left: 16, right: 16, bottom: 8), 110 | child: Row( 111 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 112 | crossAxisAlignment: CrossAxisAlignment.center, 113 | children: [ 114 | Text( 115 | '${category.lessonCount} lesson', 116 | textAlign: TextAlign.left, 117 | style: Get.textTheme.bodyText2?.copyWith( 118 | fontWeight: FontWeight.w300, 119 | color: Colors.blueGrey, 120 | ), 121 | ), 122 | Row( 123 | children: [ 124 | Text( 125 | '${category.rating}', 126 | textAlign: TextAlign.left, 127 | style: Get.textTheme.headline5?.copyWith( 128 | fontWeight: FontWeight.w300, 129 | ), 130 | ), 131 | const Icon( 132 | Icons.star, 133 | color: Colors.blue, 134 | size: 20, 135 | ), 136 | ], 137 | ) 138 | ], 139 | ), 140 | ), 141 | ], 142 | ), 143 | ), 144 | Spacing.h48, 145 | ], 146 | ), 147 | ), 148 | ), 149 | Spacing.v48, 150 | ], 151 | ), 152 | Padding( 153 | padding: const EdgeInsets.only(top: 24, right: 16, left: 16), 154 | child: Container( 155 | decoration: BoxDecoration( 156 | borderRadius: BorderRadii.all16, 157 | boxShadow: [ 158 | BoxShadow( 159 | color: Colors.grey.withOpacity(0.2), 160 | offset: const Offset(0.0, 0.0), 161 | blurRadius: 6.0, 162 | ), 163 | ], 164 | ), 165 | child: ClipRRect( 166 | borderRadius: BorderRadii.all16, 167 | child: AspectRatio( 168 | aspectRatio: 1.28, child: Image.asset(category.imagePath)), 169 | ), 170 | ), 171 | ), 172 | ], 173 | ), 174 | ), 175 | ), 176 | ), 177 | ); 178 | }, 179 | ); 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /lib/presentation/page/main/main_bindings.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/page/course/course_bindings.dart'; 2 | import 'package:course_camp/presentation/page/course/user_courses_bindings.dart'; 3 | import 'package:course_camp/presentation/page/home/home_bindings.dart'; 4 | import 'package:course_camp/presentation/page/user/user_bindings.dart'; 5 | import 'package:get/get.dart'; 6 | 7 | import 'main_controller.dart'; 8 | 9 | class MainBindings extends Bindings { 10 | @override 11 | void dependencies() { 12 | Get.lazyPut(() => MainController()); 13 | HomeBindings().dependencies(); 14 | CourseBindings().dependencies(); 15 | UserBindings().dependencies(); 16 | UserCoursesBindings().dependencies(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/presentation/page/main/main_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/base/base_controller.dart'; 2 | import 'package:course_camp/presentation/core/values/strings.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:get/get.dart'; 5 | 6 | class MainController extends BaseController { 7 | final RxInt _selectedTabIndex = RxInt(0); 8 | 9 | int get selectedTabIndex => _selectedTabIndex.value; 10 | 11 | final tabIcons = [ 12 | Icons.home_filled, 13 | Icons.chrome_reader_mode_outlined, 14 | Icons.person 15 | ]; 16 | final tabLabels = [labelHome, labelMyCourses, labelUser]; 17 | 18 | void onTabSelected(int index) { 19 | _selectedTabIndex.value = index; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/presentation/page/main/main_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/values/colors.dart'; 2 | import 'package:course_camp/presentation/page/course/user_courses_page.dart'; 3 | import 'package:course_camp/presentation/page/user/user_page.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:get/get.dart'; 6 | 7 | import '../../core/base/base_page.dart'; 8 | import '../../core/values/dimens.dart'; 9 | import '../home/home_page.dart'; 10 | import 'main_controller.dart'; 11 | 12 | class MainPage extends BasePage { 13 | const MainPage({Key? key}) : super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | body: Obx( 19 | () => IndexedStack( 20 | index: controller.selectedTabIndex, 21 | children: _tabItems, 22 | ), 23 | ), 24 | bottomNavigationBar: _BottomNavBar(), 25 | ); 26 | } 27 | 28 | final List _tabItems = const [ 29 | HomePage(), 30 | UserCoursesPage(), 31 | UserPage(), 32 | ]; 33 | } 34 | 35 | class _BottomNavBar extends StatelessWidget { 36 | _BottomNavBar({Key? key}) : super(key: key); 37 | 38 | final MainController controller = Get.find(); 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | return Obx( 43 | () => Container( 44 | decoration: const BoxDecoration( 45 | borderRadius: BorderRadii.tl16tr16, 46 | boxShadow: [ 47 | BoxShadow(color: Colors.black12, spreadRadius: 0, blurRadius: 0.2), 48 | ], 49 | ), 50 | child: ClipRRect( 51 | borderRadius: BorderRadii.tl16tr16, 52 | child: BottomNavigationBar( 53 | items: _tabItems, 54 | backgroundColor: CustomColors.lightBlueGrey, 55 | // selectedItemColor: CustomColors.ac1, 56 | // unselectedItemColor: CustomColors.black, 57 | selectedFontSize: 0, 58 | currentIndex: controller.selectedTabIndex, 59 | showSelectedLabels: false, 60 | showUnselectedLabels: false, 61 | type: BottomNavigationBarType.fixed, 62 | onTap: controller.onTabSelected, 63 | ), 64 | )), 65 | ); 66 | } 67 | 68 | List get _tabItems { 69 | final List items = []; 70 | for (int i = 0; i < 3; i++) { 71 | items.add( 72 | BottomNavigationBarItem( 73 | icon: Icon(controller.tabIcons[i]), 74 | label: controller.tabLabels[i], 75 | ), 76 | ); 77 | } 78 | return items; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/presentation/page/onboarding/onboarding_bindings.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/page/onboarding/onboarding_controller.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class OnboardingBindings extends Bindings { 5 | @override 6 | void dependencies() { 7 | Get.lazyPut(() => OnboardingController()); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/presentation/page/onboarding/onboarding_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/base/base_controller.dart'; 2 | import 'package:course_camp/presentation/core/route/app_routes.dart'; 3 | import 'package:course_camp/presentation/core/utils/constants.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:get/get.dart'; 6 | 7 | class OnboardingController extends BaseController 8 | with GetTickerProviderStateMixin { 9 | late AnimationController _animController; 10 | 11 | AnimationController get animController => _animController; 12 | 13 | @override 14 | void onInit() { 15 | super.onInit(); 16 | _animController = AnimationController( 17 | vsync: this, 18 | duration: const Duration( 19 | seconds: 8, 20 | ), 21 | ); 22 | } 23 | 24 | @override 25 | void onClose() { 26 | super.onClose(); 27 | _animController.dispose(); 28 | } 29 | 30 | String get introImage => '${ImagePath.basePath}img_intro.png'; 31 | 32 | String get relaxImage => '${ImagePath.basePath}img_relax.png'; 33 | 34 | String get workImage => '${ImagePath.basePath}img_work.png'; 35 | 36 | String get welcomeImage => '${ImagePath.basePath}img_welcome.png'; 37 | 38 | void onBeginClick() { 39 | animController.animateTo(0.2); 40 | } 41 | 42 | void onSkipClick() { 43 | Get.offNamed(Routes.main); 44 | } 45 | 46 | void onBackClick() { 47 | if (_animController.value >= 0 && _animController.value <= 0.2) { 48 | _animController.animateTo(0.0); 49 | } else if (_animController.value > 0.2 && _animController.value <= 0.4) { 50 | _animController.animateTo(0.2); 51 | } else if (_animController.value > 0.4 && _animController.value <= 0.6) { 52 | _animController.animateTo(0.4); 53 | } else if (_animController.value > 0.6 && _animController.value <= 0.8) { 54 | _animController.animateTo(0.6); 55 | } else if (_animController.value > 0.8 && _animController.value <= 1.0) { 56 | _animController.animateTo(0.8); 57 | } 58 | } 59 | 60 | void onNextClick() { 61 | if (_animController.value >= 0 && _animController.value <= 0.2) { 62 | _animController.animateTo(0.4); 63 | } else if (_animController.value > 0.2 && _animController.value <= 0.4) { 64 | _animController.animateTo(0.6); 65 | } else if (_animController.value > 0.4 && _animController.value <= 0.6) { 66 | _animController.animateTo(0.8); 67 | } 68 | } 69 | 70 | void onSignupClick() { 71 | Get.offNamed(Routes.main); 72 | } 73 | 74 | void onLoginClick() {} 75 | } 76 | -------------------------------------------------------------------------------- /lib/presentation/page/onboarding/onboarding_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/base/base_page.dart'; 2 | import 'package:course_camp/presentation/page/onboarding/views/center_next_button.dart'; 3 | import 'package:course_camp/presentation/page/onboarding/views/top_back_skip_view.dart'; 4 | import 'package:course_camp/presentation/page/onboarding/views/welcome_view.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | import 'onboarding_controller.dart'; 8 | import 'views/relax_view.dart'; 9 | import 'views/splash_view.dart'; 10 | import 'views/work_view.dart'; 11 | 12 | class OnboardingPage extends BasePage { 13 | const OnboardingPage({Key? key}) : super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Scaffold( 18 | body: Stack( 19 | children: const [ 20 | SplashView(), 21 | RelaxView(), 22 | WorkView(), 23 | WelcomeView(), 24 | TopBackSkipView(), 25 | CenterNextButton(), 26 | ], 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/presentation/page/onboarding/views/center_next_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:animations/animations.dart'; 2 | import 'package:course_camp/presentation/core/utils/screen_util.dart'; 3 | import 'package:course_camp/presentation/core/values/dimens.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:get/get.dart'; 6 | 7 | import '../onboarding_controller.dart'; 8 | 9 | class CenterNextButton extends StatelessWidget { 10 | const CenterNextButton({Key? key}) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | final OnboardingController controller = Get.find(); 15 | final _topMoveAnimation = 16 | Tween(begin: const Offset(0, 5), end: const Offset(0, 0)).animate(CurvedAnimation( 17 | parent: controller.animController, 18 | curve: const Interval( 19 | 0.0, 20 | 0.2, 21 | curve: Curves.fastOutSlowIn, 22 | ), 23 | )); 24 | final _signUpMoveAnimation = Tween(begin: 0, end: 0.8).animate(CurvedAnimation( 25 | parent: controller.animController, 26 | curve: const Interval( 27 | 0.4, 28 | 0.6, 29 | curve: Curves.fastOutSlowIn, 30 | ), 31 | )); 32 | final _loginTextMoveAnimation = 33 | Tween(begin: const Offset(0, 5), end: const Offset(0, 0)).animate(CurvedAnimation( 34 | parent: controller.animController, 35 | curve: const Interval( 36 | 0.4, 37 | 0.6, 38 | curve: Curves.fastOutSlowIn, 39 | ), 40 | )); 41 | 42 | return Padding( 43 | padding: EdgeInsets.only(bottom: 16 + MediaQuery.of(context).padding.bottom), 44 | child: Column( 45 | mainAxisAlignment: MainAxisAlignment.end, 46 | crossAxisAlignment: CrossAxisAlignment.center, 47 | children: [ 48 | SlideTransition( 49 | position: _topMoveAnimation, 50 | child: AnimatedBuilder( 51 | animation: controller.animController, 52 | builder: (context, child) => AnimatedOpacity( 53 | opacity: 54 | controller.animController.value >= 0.2 && controller.animController.value <= 0.4 55 | ? 1 56 | : 0, 57 | duration: const Duration(milliseconds: 480), 58 | child: _pageView(), 59 | ), 60 | ), 61 | ), 62 | SlideTransition( 63 | position: _topMoveAnimation, 64 | child: AnimatedBuilder( 65 | animation: controller.animController, 66 | builder: (context, child) => Padding( 67 | padding: EdgeInsets.only(bottom: 38 - (38 * _signUpMoveAnimation.value)), 68 | child: Container( 69 | height: 58.toHeight, 70 | width: 58.toHeight + (200 * _signUpMoveAnimation.value), 71 | decoration: BoxDecoration( 72 | borderRadius: BorderRadius.circular(8 + 32 * (1 - _signUpMoveAnimation.value)), 73 | color: const Color(0xff132137), 74 | ), 75 | child: PageTransitionSwitcher( 76 | duration: const Duration(milliseconds: 480), 77 | reverse: _signUpMoveAnimation.value < 0.5, 78 | transitionBuilder: ( 79 | Widget child, 80 | Animation animation, 81 | Animation secondaryAnimation, 82 | ) { 83 | return SharedAxisTransition( 84 | fillColor: Colors.transparent, 85 | child: child, 86 | animation: animation, 87 | secondaryAnimation: secondaryAnimation, 88 | transitionType: SharedAxisTransitionType.vertical, 89 | ); 90 | }, 91 | child: _signUpMoveAnimation.value > 0.5 92 | ? InkWell( 93 | key: const ValueKey('Sign Up button'), 94 | onTap: controller.onSignupClick, 95 | child: Padding( 96 | padding: Paddings.h16, 97 | child: Row( 98 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 99 | children: [ 100 | Text( 101 | 'Sign Up', 102 | style: Get.textTheme.headline5?.copyWith( 103 | color: Colors.white, 104 | fontWeight: FontWeight.w500, 105 | ), 106 | ), 107 | const Icon(Icons.arrow_forward_rounded, color: Colors.white), 108 | ], 109 | ), 110 | ), 111 | ) 112 | : InkWell( 113 | key: const ValueKey('next button'), 114 | onTap: controller.onNextClick, 115 | child: const Padding( 116 | padding: EdgeInsets.all(16.0), 117 | child: Icon(Icons.arrow_forward_ios_rounded, color: Colors.white), 118 | ), 119 | ), 120 | ), 121 | ), 122 | ), 123 | ), 124 | ), 125 | Padding( 126 | padding: const EdgeInsets.only(top: 8), 127 | child: SlideTransition( 128 | position: _loginTextMoveAnimation, 129 | child: Row( 130 | mainAxisAlignment: MainAxisAlignment.center, 131 | children: [ 132 | Text( 133 | 'Already have an account? ', 134 | style: Get.textTheme.bodyText1?.copyWith( 135 | color: Colors.grey, 136 | ), 137 | ), 138 | const Text( 139 | 'Login', 140 | style: TextStyle( 141 | color: Color(0xff132137), 142 | fontSize: 16, 143 | fontWeight: FontWeight.bold, 144 | ), 145 | ), 146 | ], 147 | ), 148 | ), 149 | ), 150 | ], 151 | ), 152 | ); 153 | } 154 | 155 | Widget _pageView() { 156 | final OnboardingController controller = Get.find(); 157 | int _selectedIndex = 0; 158 | 159 | if (controller.animController.value >= 0.5) { 160 | _selectedIndex = 2; 161 | } else if (controller.animController.value >= 0.3) { 162 | _selectedIndex = 1; 163 | } else if (controller.animController.value >= 0.1) { 164 | _selectedIndex = 0; 165 | } 166 | 167 | return Padding( 168 | padding: const EdgeInsets.only(bottom: 16), 169 | child: Row( 170 | mainAxisSize: MainAxisSize.min, 171 | children: [ 172 | for (var i = 0; i < 3; i++) 173 | Padding( 174 | padding: const EdgeInsets.all(4), 175 | child: AnimatedContainer( 176 | duration: const Duration(milliseconds: 480), 177 | decoration: BoxDecoration( 178 | borderRadius: BorderRadius.circular(32), 179 | color: _selectedIndex == i ? const Color(0xff132137) : const Color(0xffE3E4E4), 180 | ), 181 | width: 10, 182 | height: 10, 183 | ), 184 | ) 185 | ], 186 | ), 187 | ); 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /lib/presentation/page/onboarding/views/relax_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | import '../onboarding_controller.dart'; 5 | 6 | class RelaxView extends StatelessWidget { 7 | const RelaxView({Key? key}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | final OnboardingController controller = Get.find(); 12 | final _firstHalfAnimation = 13 | Tween(begin: const Offset(0, 1), end: const Offset(0, 0)).animate( 14 | CurvedAnimation( 15 | parent: controller.animController, 16 | curve: const Interval( 17 | 0.0, 18 | 0.2, 19 | curve: Curves.fastOutSlowIn, 20 | ), 21 | ), 22 | ); 23 | final _secondHalfAnimation = 24 | Tween(begin: const Offset(0, 0), end: const Offset(-1, 0)).animate( 25 | CurvedAnimation( 26 | parent: controller.animController, 27 | curve: const Interval( 28 | 0.2, 29 | 0.4, 30 | curve: Curves.fastOutSlowIn, 31 | ), 32 | ), 33 | ); 34 | final _textAnimation = 35 | Tween(begin: const Offset(0, 0), end: const Offset(-2, 0)).animate( 36 | CurvedAnimation( 37 | parent: controller.animController, 38 | curve: const Interval( 39 | 0.2, 40 | 0.4, 41 | curve: Curves.fastOutSlowIn, 42 | ), 43 | ), 44 | ); 45 | final _imageAnimation = 46 | Tween(begin: const Offset(0, 0), end: const Offset(-4, 0)).animate( 47 | CurvedAnimation( 48 | parent: controller.animController, 49 | curve: const Interval( 50 | 0.2, 51 | 0.4, 52 | curve: Curves.fastOutSlowIn, 53 | ), 54 | ), 55 | ); 56 | 57 | final _relaxAnimation = 58 | Tween(begin: const Offset(0, -2), end: const Offset(0, 0)).animate( 59 | CurvedAnimation( 60 | parent: controller.animController, 61 | curve: const Interval( 62 | 0.0, 63 | 0.2, 64 | curve: Curves.fastOutSlowIn, 65 | ), 66 | ), 67 | ); 68 | return SlideTransition( 69 | position: _firstHalfAnimation, 70 | child: SlideTransition( 71 | position: _secondHalfAnimation, 72 | child: Padding( 73 | padding: const EdgeInsets.only(bottom: 100), 74 | child: Column( 75 | mainAxisAlignment: MainAxisAlignment.center, 76 | children: [ 77 | SlideTransition( 78 | position: _relaxAnimation, 79 | child: Text( 80 | "Relax", 81 | style: Get.textTheme.headline2, 82 | ), 83 | ), 84 | SlideTransition( 85 | position: _textAnimation, 86 | child: Padding( 87 | padding: const EdgeInsets.only(left: 64, right: 64, top: 16, bottom: 16), 88 | child: Text( 89 | "Lorem ipsum dolor sit amet,consectetur adipiscing elit,sed do eiusmod tempor incididunt ut labore", 90 | textAlign: TextAlign.center, 91 | style: Get.textTheme.bodyText1, 92 | ), 93 | ), 94 | ), 95 | SlideTransition( 96 | position: _imageAnimation, 97 | child: Container( 98 | constraints: const BoxConstraints(maxWidth: 350, maxHeight: 250), 99 | child: Image.asset( 100 | controller.relaxImage, 101 | fit: BoxFit.contain, 102 | ), 103 | ), 104 | ), 105 | ], 106 | ), 107 | ), 108 | ), 109 | ); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /lib/presentation/page/onboarding/views/splash_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/utils/screen_util.dart'; 2 | import 'package:course_camp/presentation/core/values/dimens.dart'; 3 | import 'package:course_camp/presentation/page/onboarding/onboarding_controller.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:get/get.dart'; 6 | 7 | class SplashView extends StatelessWidget { 8 | const SplashView({Key? key}) : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | final OnboardingController controller = Get.find(); 13 | final _introAnimation = Tween(begin: const Offset(0, 0), end: const Offset(0.0, -1.0)) 14 | .animate(CurvedAnimation( 15 | parent: controller.animController, 16 | curve: const Interval( 17 | 0.0, 18 | 0.2, 19 | curve: Curves.fastOutSlowIn, 20 | ), 21 | )); 22 | return SlideTransition( 23 | position: _introAnimation, 24 | child: SingleChildScrollView( 25 | child: Column( 26 | children: [ 27 | SizedBox(height: 200.toHeight), 28 | SizedBox( 29 | width: Get.width, 30 | child: Image.asset( 31 | controller.introImage, 32 | fit: BoxFit.cover, 33 | ), 34 | ), 35 | Padding( 36 | padding: Paddings.v8, 37 | child: Text( 38 | "Clearhead", 39 | style: Get.textTheme.headline2, 40 | ), 41 | ), 42 | Padding( 43 | padding: Paddings.h60, 44 | child: Text( 45 | "Lorem ipsum dolor sit amet,consectetur adipiscing elit,sed do eiusmod tempor incididunt ut labore", 46 | textAlign: TextAlign.center, 47 | style: Get.textTheme.bodyText1, 48 | ), 49 | ), 50 | Spacing.v48, 51 | Padding( 52 | padding: EdgeInsets.only(bottom: MediaQuery.of(context).padding.bottom + 16), 53 | child: InkWell( 54 | onTap: controller.onBeginClick, 55 | child: Container( 56 | height: 55.toHeight, 57 | padding: const EdgeInsets.only( 58 | left: 56.0, 59 | right: 56.0, 60 | top: 16, 61 | bottom: 16, 62 | ), 63 | decoration: BoxDecoration( 64 | borderRadius: BorderRadius.circular(38.0), 65 | color: const Color(0xff132137), 66 | ), 67 | child: Text( 68 | "Let's begin", 69 | style: Get.textTheme.headline5?.copyWith( 70 | color: Colors.white, 71 | ), 72 | ), 73 | ), 74 | ), 75 | ), 76 | ], 77 | ), 78 | ), 79 | ); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /lib/presentation/page/onboarding/views/top_back_skip_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/utils/screen_util.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:get/get.dart'; 4 | 5 | import '../onboarding_controller.dart'; 6 | 7 | class TopBackSkipView extends StatelessWidget { 8 | const TopBackSkipView({Key? key}) : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | final OnboardingController controller = Get.find(); 13 | final _animation = Tween(begin: const Offset(0, -1), end: const Offset(0.0, 0.0)) 14 | .animate(CurvedAnimation( 15 | parent: controller.animController, 16 | curve: const Interval( 17 | 0.0, 18 | 0.2, 19 | curve: Curves.fastOutSlowIn, 20 | ), 21 | )); 22 | 23 | final _skipAnimation = 24 | Tween(begin: Offset(0, 0), end: Offset(2, 0)).animate(CurvedAnimation( 25 | parent: controller.animController, 26 | curve: const Interval( 27 | 0.6, 28 | 0.8, 29 | curve: Curves.fastOutSlowIn, 30 | ), 31 | )); 32 | 33 | return SlideTransition( 34 | position: _animation, 35 | child: Padding( 36 | padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top), 37 | child: SizedBox( 38 | height: 58.toHeight, 39 | child: Padding( 40 | padding: const EdgeInsets.only(left: 8, right: 16), 41 | child: Row( 42 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 43 | children: [ 44 | // SlideTransition( 45 | // position: _backAnimation, 46 | // child: 47 | IconButton( 48 | onPressed: controller.onBackClick, 49 | icon: const Icon(Icons.arrow_back_ios_new_rounded), 50 | // ), 51 | ), 52 | SlideTransition( 53 | position: _skipAnimation, 54 | child: IconButton( 55 | onPressed: controller.onSkipClick, 56 | icon: const Text('Skip'), 57 | ), 58 | ), 59 | ], 60 | ), 61 | ), 62 | ), 63 | ), 64 | ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/presentation/page/onboarding/views/welcome_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | import '../onboarding_controller.dart'; 5 | 6 | class WelcomeView extends StatelessWidget { 7 | const WelcomeView({Key? key}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | final OnboardingController controller = Get.find(); 12 | final _firstHalfAnimation = 13 | Tween(begin: const Offset(1, 0), end: const Offset(0, 0)).animate( 14 | CurvedAnimation( 15 | parent: controller.animController, 16 | curve: const Interval( 17 | 0.4, 18 | 0.6, 19 | curve: Curves.fastOutSlowIn, 20 | ), 21 | ), 22 | ); 23 | final _secondHalfAnimation = 24 | Tween(begin: const Offset(0, 0), end: const Offset(-1, 0)).animate( 25 | CurvedAnimation( 26 | parent: controller.animController, 27 | curve: const Interval( 28 | 0.6, 29 | 0.8, 30 | curve: Curves.fastOutSlowIn, 31 | ), 32 | ), 33 | ); 34 | 35 | final _welcomeFirstHalfAnimation = 36 | Tween(begin: const Offset(2, 0), end: const Offset(0, 0)).animate(CurvedAnimation( 37 | parent: controller.animController, 38 | curve: const Interval( 39 | 0.4, 40 | 0.6, 41 | curve: Curves.fastOutSlowIn, 42 | ), 43 | )); 44 | 45 | final _welcomeImageAnimation = 46 | Tween(begin: const Offset(4, 0), end: const Offset(0, 0)).animate(CurvedAnimation( 47 | parent: controller.animController, 48 | curve: const Interval( 49 | 0.4, 50 | 0.6, 51 | curve: Curves.fastOutSlowIn, 52 | ), 53 | )); 54 | return SlideTransition( 55 | position: _firstHalfAnimation, 56 | child: SlideTransition( 57 | position: _secondHalfAnimation, 58 | child: Padding( 59 | padding: const EdgeInsets.only(bottom: 100), 60 | child: Column( 61 | mainAxisAlignment: MainAxisAlignment.center, 62 | children: [ 63 | SlideTransition( 64 | position: _welcomeImageAnimation, 65 | child: Container( 66 | constraints: const BoxConstraints(maxWidth: 350, maxHeight: 350), 67 | child: Image.asset( 68 | controller.welcomeImage, 69 | fit: BoxFit.contain, 70 | ), 71 | ), 72 | ), 73 | SlideTransition( 74 | position: _welcomeFirstHalfAnimation, 75 | child: Text( 76 | "Welcome", 77 | style: Get.textTheme.headline2, 78 | ), 79 | ), 80 | Padding( 81 | padding: const EdgeInsets.only(left: 64, right: 64, top: 16, bottom: 16), 82 | child: Text( 83 | "Stay organised and live stress-free with you-do app", 84 | textAlign: TextAlign.center, 85 | style: Get.textTheme.bodyText1, 86 | ), 87 | ), 88 | ], 89 | ), 90 | ), 91 | ), 92 | ); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/presentation/page/onboarding/views/work_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | import '../onboarding_controller.dart'; 5 | 6 | class WorkView extends StatelessWidget { 7 | const WorkView({Key? key}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | final OnboardingController controller = Get.find(); 12 | final _firstHalfAnimation = 13 | Tween(begin: const Offset(1, 0), end: const Offset(0, 0)).animate(CurvedAnimation( 14 | parent: controller.animController, 15 | curve: const Interval( 16 | 0.2, 17 | 0.4, 18 | curve: Curves.fastOutSlowIn, 19 | ), 20 | )); 21 | final _secondHalfAnimation = 22 | Tween(begin: const Offset(0, 0), end: const Offset(-1, 0)).animate(CurvedAnimation( 23 | parent: controller.animController, 24 | curve: const Interval( 25 | 0.4, 26 | 0.6, 27 | curve: Curves.fastOutSlowIn, 28 | ), 29 | )); 30 | final _relaxFirstHalfAnimation = 31 | Tween(begin: const Offset(2, 0), end: const Offset(0, 0)).animate(CurvedAnimation( 32 | parent: controller.animController, 33 | curve: const Interval( 34 | 0.2, 35 | 0.4, 36 | curve: Curves.fastOutSlowIn, 37 | ), 38 | )); 39 | final _relaxSecondHalfAnimation = 40 | Tween(begin: const Offset(0, 0), end: const Offset(-2, 0)).animate(CurvedAnimation( 41 | parent: controller.animController, 42 | curve: const Interval( 43 | 0.4, 44 | 0.6, 45 | curve: Curves.fastOutSlowIn, 46 | ), 47 | )); 48 | 49 | final _imageFirstHalfAnimation = 50 | Tween(begin: const Offset(4, 0), end: const Offset(0, 0)).animate(CurvedAnimation( 51 | parent: controller.animController, 52 | curve: const Interval( 53 | 0.2, 54 | 0.4, 55 | curve: Curves.fastOutSlowIn, 56 | ), 57 | )); 58 | final _imageSecondHalfAnimation = 59 | Tween(begin: const Offset(0, 0), end: const Offset(-4, 0)).animate(CurvedAnimation( 60 | parent: controller.animController, 61 | curve: const Interval( 62 | 0.4, 63 | 0.6, 64 | curve: Curves.fastOutSlowIn, 65 | ), 66 | )); 67 | 68 | return SlideTransition( 69 | position: _firstHalfAnimation, 70 | child: SlideTransition( 71 | position: _secondHalfAnimation, 72 | child: Padding( 73 | padding: const EdgeInsets.only(bottom: 100), 74 | child: Column( 75 | mainAxisAlignment: MainAxisAlignment.center, 76 | children: [ 77 | SlideTransition( 78 | position: _imageFirstHalfAnimation, 79 | child: SlideTransition( 80 | position: _imageSecondHalfAnimation, 81 | child: Container( 82 | constraints: const BoxConstraints(maxWidth: 350, maxHeight: 250), 83 | child: Image.asset( 84 | controller.workImage, 85 | fit: BoxFit.contain, 86 | ), 87 | ), 88 | ), 89 | ), 90 | SlideTransition( 91 | position: _relaxFirstHalfAnimation, 92 | child: SlideTransition( 93 | position: _relaxSecondHalfAnimation, 94 | child: Text( 95 | "Work", 96 | style: Get.textTheme.headline2, 97 | ), 98 | ), 99 | ), 100 | Padding( 101 | padding: const EdgeInsets.only(left: 64, right: 64, bottom: 16, top: 16), 102 | child: Text( 103 | "Lorem ipsum dolor sit amet,consectetur adipiscing elit,sed do eiusmod tempor incididunt ut labore", 104 | textAlign: TextAlign.center, 105 | style: Get.textTheme.bodyText1, 106 | ), 107 | ), 108 | ], 109 | ), 110 | ), 111 | ), 112 | ); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /lib/presentation/page/user/user_bindings.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/page/user/user_controller.dart'; 2 | import 'package:get/get.dart'; 3 | 4 | class UserBindings extends Bindings { 5 | @override 6 | void dependencies() { 7 | Get.lazyPut(() => UserController()); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/presentation/page/user/user_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/base/base_controller.dart'; 2 | 3 | class UserController extends BaseController {} 4 | -------------------------------------------------------------------------------- /lib/presentation/page/user/user_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:course_camp/presentation/core/base/base_page.dart'; 2 | import 'package:course_camp/presentation/core/utils/constants.dart'; 3 | import 'package:course_camp/presentation/core/utils/screen_util.dart'; 4 | import 'package:course_camp/presentation/core/values/colors.dart'; 5 | import 'package:course_camp/presentation/core/values/dimens.dart'; 6 | import 'package:course_camp/presentation/page/user/user_controller.dart'; 7 | import 'package:flutter/material.dart'; 8 | import 'package:get/get.dart'; 9 | 10 | class UserPage extends BasePage { 11 | const UserPage({Key? key}) : super(key: key); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | body: Column( 17 | children: [ 18 | SizedBox( 19 | height: MediaQuery.of(context).padding.top, 20 | ), 21 | Spacing.v16, 22 | _appBar, 23 | Expanded( 24 | child: ListView( 25 | children: [ 26 | Padding( 27 | padding: Paddings.h20, 28 | child: Row( 29 | children: [ 30 | Icon(Icons.phone, color: Colors.blueGrey, size: 16.toWidth), 31 | Spacing.h16, 32 | Text( 33 | '(92)-303-1888898', 34 | style: Get.textTheme.bodyText2?.copyWith(color: Colors.blueGrey), 35 | ) 36 | ], 37 | ), 38 | ), 39 | Spacing.v16, 40 | Padding( 41 | padding: Paddings.h20, 42 | child: Row( 43 | children: [ 44 | Icon(Icons.email_outlined, color: Colors.blueGrey, size: 16.toWidth), 45 | Spacing.h16, 46 | Text( 47 | 'engr.waseemabbas8@gmail.com', 48 | style: Get.textTheme.bodyText2?.copyWith(color: Colors.blueGrey), 49 | ) 50 | ], 51 | ), 52 | ), 53 | Spacing.v16, 54 | _line, 55 | Row( 56 | children: [ 57 | Expanded( 58 | child: Column( 59 | mainAxisSize: MainAxisSize.min, 60 | children: [ 61 | Text('\$149.00', style: Get.textTheme.subtitle2), 62 | Spacing.v4, 63 | Text( 64 | 'Wallet', 65 | style: Get.textTheme.bodyText2?.copyWith( 66 | color: Colors.blueGrey, 67 | fontWeight: FontWeight.normal, 68 | ), 69 | ), 70 | ], 71 | ), 72 | ), 73 | _lineVertical, 74 | Expanded( 75 | child: Column( 76 | mainAxisSize: MainAxisSize.min, 77 | children: [ 78 | Text('\$149.00', style: Get.textTheme.subtitle2), 79 | Spacing.v4, 80 | Text( 81 | 'Wallet', 82 | style: Get.textTheme.bodyText2?.copyWith( 83 | color: Colors.blueGrey, 84 | fontWeight: FontWeight.normal, 85 | ), 86 | ), 87 | ], 88 | ), 89 | ), 90 | ], 91 | ), 92 | _line, 93 | Spacing.v16, 94 | Spacing.v16, 95 | _optionWidget(() {}, Icons.favorite_border, 'Your Favorites'), 96 | _optionWidget(() {}, Icons.supervisor_account, 'Tell your friends'), 97 | _optionWidget(() {}, Icons.settings, 'Settings'), 98 | _line, 99 | InkWell( 100 | onTap: () {}, 101 | child: Padding( 102 | padding: Paddings.v16h20, 103 | child: Row( 104 | children: [ 105 | Icon(Icons.power_settings_new, size: 20.toWidth, color: Colors.red), 106 | Spacing.h16, 107 | Text( 108 | 'Logout', 109 | style: Get.textTheme.bodyText1?.copyWith( 110 | color: Colors.red, 111 | fontWeight: FontWeight.w600, 112 | ), 113 | ), 114 | ], 115 | ), 116 | ), 117 | ), 118 | ], 119 | ), 120 | ), 121 | ], 122 | ), 123 | ); 124 | } 125 | 126 | Widget get _appBar { 127 | return Padding( 128 | padding: Paddings.h20, 129 | child: Row( 130 | children: [ 131 | Expanded( 132 | child: Column( 133 | mainAxisAlignment: MainAxisAlignment.end, 134 | crossAxisAlignment: CrossAxisAlignment.start, 135 | children: [ 136 | Text( 137 | 'Welcome back!', 138 | textAlign: TextAlign.left, 139 | style: Get.textTheme.bodyText1?.copyWith(color: Colors.blueGrey), 140 | ), 141 | Text( 142 | 'Waseem Abbas', 143 | textAlign: TextAlign.left, 144 | style: Get.textTheme.headline2, 145 | ), 146 | ], 147 | ), 148 | ), 149 | SizedBox( 150 | width: 50.toWidth, 151 | height: 50.toWidth, 152 | child: Image.asset('${ImagePath.basePath}img_user.png'), 153 | ) 154 | ], 155 | ), 156 | ); 157 | } 158 | 159 | Widget get _line => Container( 160 | width: Get.width, 161 | height: 1.toHeight, 162 | color: Colors.black12, 163 | ); 164 | 165 | Widget get _lineVertical => Container( 166 | width: 1.toWidth, 167 | height: 50.toHeight, 168 | color: Colors.black12, 169 | ); 170 | 171 | Widget _optionWidget(VoidCallback onTap, IconData iconData, title) => InkWell( 172 | onTap: onTap, 173 | child: Padding( 174 | padding: Paddings.v16h20, 175 | child: Row( 176 | children: [ 177 | Icon(iconData, size: 20.toWidth, color: Colors.blue), 178 | Spacing.h16, 179 | Text( 180 | title, 181 | style: Get.textTheme.bodyText1?.copyWith(color: CustomColors.darkerText), 182 | ), 183 | ], 184 | ), 185 | ), 186 | ); 187 | } 188 | -------------------------------------------------------------------------------- /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: "39.0.0" 11 | analyzer: 12 | dependency: transitive 13 | description: 14 | name: analyzer 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "4.0.0" 18 | animations: 19 | dependency: "direct main" 20 | description: 21 | name: animations 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.0.2" 25 | args: 26 | dependency: transitive 27 | description: 28 | name: args 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.3.0" 32 | async: 33 | dependency: transitive 34 | description: 35 | name: async 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.8.2" 39 | boolean_selector: 40 | dependency: transitive 41 | description: 42 | name: boolean_selector 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "2.1.0" 46 | build: 47 | dependency: transitive 48 | description: 49 | name: build 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.3.0" 53 | build_config: 54 | dependency: transitive 55 | description: 56 | name: build_config 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.0.0" 60 | build_daemon: 61 | dependency: transitive 62 | description: 63 | name: build_daemon 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "3.1.0" 67 | build_resolvers: 68 | dependency: transitive 69 | description: 70 | name: build_resolvers 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.0.8" 74 | build_runner: 75 | dependency: "direct dev" 76 | description: 77 | name: build_runner 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "2.1.10" 81 | build_runner_core: 82 | dependency: transitive 83 | description: 84 | name: build_runner_core 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "7.2.3" 88 | built_collection: 89 | dependency: transitive 90 | description: 91 | name: built_collection 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "5.1.1" 95 | built_value: 96 | dependency: transitive 97 | description: 98 | name: built_value 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "8.2.3" 102 | characters: 103 | dependency: transitive 104 | description: 105 | name: characters 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.2.0" 109 | charcode: 110 | dependency: transitive 111 | description: 112 | name: charcode 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "1.3.1" 116 | checked_yaml: 117 | dependency: transitive 118 | description: 119 | name: checked_yaml 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "2.0.1" 123 | clock: 124 | dependency: transitive 125 | description: 126 | name: clock 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "1.1.0" 130 | code_builder: 131 | dependency: transitive 132 | description: 133 | name: code_builder 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "4.1.0" 137 | collection: 138 | dependency: transitive 139 | description: 140 | name: collection 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "1.16.0" 144 | convert: 145 | dependency: transitive 146 | description: 147 | name: convert 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "3.0.1" 151 | crypto: 152 | dependency: transitive 153 | description: 154 | name: crypto 155 | url: "https://pub.dartlang.org" 156 | source: hosted 157 | version: "3.0.2" 158 | cupertino_icons: 159 | dependency: "direct main" 160 | description: 161 | name: cupertino_icons 162 | url: "https://pub.dartlang.org" 163 | source: hosted 164 | version: "1.0.4" 165 | dart_style: 166 | dependency: transitive 167 | description: 168 | name: dart_style 169 | url: "https://pub.dartlang.org" 170 | source: hosted 171 | version: "2.2.3" 172 | fake_async: 173 | dependency: transitive 174 | description: 175 | name: fake_async 176 | url: "https://pub.dartlang.org" 177 | source: hosted 178 | version: "1.3.0" 179 | file: 180 | dependency: transitive 181 | description: 182 | name: file 183 | url: "https://pub.dartlang.org" 184 | source: hosted 185 | version: "6.1.2" 186 | fixnum: 187 | dependency: transitive 188 | description: 189 | name: fixnum 190 | url: "https://pub.dartlang.org" 191 | source: hosted 192 | version: "1.0.0" 193 | flutter: 194 | dependency: "direct main" 195 | description: flutter 196 | source: sdk 197 | version: "0.0.0" 198 | flutter_lints: 199 | dependency: "direct dev" 200 | description: 201 | name: flutter_lints 202 | url: "https://pub.dartlang.org" 203 | source: hosted 204 | version: "1.0.4" 205 | flutter_test: 206 | dependency: "direct dev" 207 | description: flutter 208 | source: sdk 209 | version: "0.0.0" 210 | frontend_server_client: 211 | dependency: transitive 212 | description: 213 | name: frontend_server_client 214 | url: "https://pub.dartlang.org" 215 | source: hosted 216 | version: "2.1.2" 217 | get: 218 | dependency: "direct main" 219 | description: 220 | name: get 221 | url: "https://pub.dartlang.org" 222 | source: hosted 223 | version: "4.6.1" 224 | glob: 225 | dependency: transitive 226 | description: 227 | name: glob 228 | url: "https://pub.dartlang.org" 229 | source: hosted 230 | version: "2.0.2" 231 | graphs: 232 | dependency: transitive 233 | description: 234 | name: graphs 235 | url: "https://pub.dartlang.org" 236 | source: hosted 237 | version: "2.1.0" 238 | http_multi_server: 239 | dependency: transitive 240 | description: 241 | name: http_multi_server 242 | url: "https://pub.dartlang.org" 243 | source: hosted 244 | version: "3.2.0" 245 | http_parser: 246 | dependency: transitive 247 | description: 248 | name: http_parser 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "4.0.0" 252 | io: 253 | dependency: transitive 254 | description: 255 | name: io 256 | url: "https://pub.dartlang.org" 257 | source: hosted 258 | version: "1.0.3" 259 | js: 260 | dependency: transitive 261 | description: 262 | name: js 263 | url: "https://pub.dartlang.org" 264 | source: hosted 265 | version: "0.6.4" 266 | json_annotation: 267 | dependency: transitive 268 | description: 269 | name: json_annotation 270 | url: "https://pub.dartlang.org" 271 | source: hosted 272 | version: "4.5.0" 273 | json_serializable: 274 | dependency: "direct main" 275 | description: 276 | name: json_serializable 277 | url: "https://pub.dartlang.org" 278 | source: hosted 279 | version: "6.2.0" 280 | lints: 281 | dependency: transitive 282 | description: 283 | name: lints 284 | url: "https://pub.dartlang.org" 285 | source: hosted 286 | version: "1.0.1" 287 | logging: 288 | dependency: transitive 289 | description: 290 | name: logging 291 | url: "https://pub.dartlang.org" 292 | source: hosted 293 | version: "1.0.2" 294 | matcher: 295 | dependency: transitive 296 | description: 297 | name: matcher 298 | url: "https://pub.dartlang.org" 299 | source: hosted 300 | version: "0.12.11" 301 | material_color_utilities: 302 | dependency: transitive 303 | description: 304 | name: material_color_utilities 305 | url: "https://pub.dartlang.org" 306 | source: hosted 307 | version: "0.1.4" 308 | meta: 309 | dependency: transitive 310 | description: 311 | name: meta 312 | url: "https://pub.dartlang.org" 313 | source: hosted 314 | version: "1.7.0" 315 | mime: 316 | dependency: transitive 317 | description: 318 | name: mime 319 | url: "https://pub.dartlang.org" 320 | source: hosted 321 | version: "1.0.1" 322 | package_config: 323 | dependency: transitive 324 | description: 325 | name: package_config 326 | url: "https://pub.dartlang.org" 327 | source: hosted 328 | version: "2.0.2" 329 | path: 330 | dependency: transitive 331 | description: 332 | name: path 333 | url: "https://pub.dartlang.org" 334 | source: hosted 335 | version: "1.8.1" 336 | pool: 337 | dependency: transitive 338 | description: 339 | name: pool 340 | url: "https://pub.dartlang.org" 341 | source: hosted 342 | version: "1.5.0" 343 | pub_semver: 344 | dependency: transitive 345 | description: 346 | name: pub_semver 347 | url: "https://pub.dartlang.org" 348 | source: hosted 349 | version: "2.1.1" 350 | pubspec_parse: 351 | dependency: transitive 352 | description: 353 | name: pubspec_parse 354 | url: "https://pub.dartlang.org" 355 | source: hosted 356 | version: "1.2.0" 357 | shelf: 358 | dependency: transitive 359 | description: 360 | name: shelf 361 | url: "https://pub.dartlang.org" 362 | source: hosted 363 | version: "1.3.0" 364 | shelf_web_socket: 365 | dependency: transitive 366 | description: 367 | name: shelf_web_socket 368 | url: "https://pub.dartlang.org" 369 | source: hosted 370 | version: "1.0.1" 371 | sky_engine: 372 | dependency: transitive 373 | description: flutter 374 | source: sdk 375 | version: "0.0.99" 376 | source_gen: 377 | dependency: transitive 378 | description: 379 | name: source_gen 380 | url: "https://pub.dartlang.org" 381 | source: hosted 382 | version: "1.2.2" 383 | source_helper: 384 | dependency: transitive 385 | description: 386 | name: source_helper 387 | url: "https://pub.dartlang.org" 388 | source: hosted 389 | version: "1.3.2" 390 | source_span: 391 | dependency: transitive 392 | description: 393 | name: source_span 394 | url: "https://pub.dartlang.org" 395 | source: hosted 396 | version: "1.8.2" 397 | stack_trace: 398 | dependency: transitive 399 | description: 400 | name: stack_trace 401 | url: "https://pub.dartlang.org" 402 | source: hosted 403 | version: "1.10.0" 404 | stream_channel: 405 | dependency: transitive 406 | description: 407 | name: stream_channel 408 | url: "https://pub.dartlang.org" 409 | source: hosted 410 | version: "2.1.0" 411 | stream_transform: 412 | dependency: transitive 413 | description: 414 | name: stream_transform 415 | url: "https://pub.dartlang.org" 416 | source: hosted 417 | version: "2.0.0" 418 | string_scanner: 419 | dependency: transitive 420 | description: 421 | name: string_scanner 422 | url: "https://pub.dartlang.org" 423 | source: hosted 424 | version: "1.1.0" 425 | term_glyph: 426 | dependency: transitive 427 | description: 428 | name: term_glyph 429 | url: "https://pub.dartlang.org" 430 | source: hosted 431 | version: "1.2.0" 432 | test_api: 433 | dependency: transitive 434 | description: 435 | name: test_api 436 | url: "https://pub.dartlang.org" 437 | source: hosted 438 | version: "0.4.9" 439 | timing: 440 | dependency: transitive 441 | description: 442 | name: timing 443 | url: "https://pub.dartlang.org" 444 | source: hosted 445 | version: "1.0.0" 446 | typed_data: 447 | dependency: transitive 448 | description: 449 | name: typed_data 450 | url: "https://pub.dartlang.org" 451 | source: hosted 452 | version: "1.3.0" 453 | vector_math: 454 | dependency: transitive 455 | description: 456 | name: vector_math 457 | url: "https://pub.dartlang.org" 458 | source: hosted 459 | version: "2.1.2" 460 | watcher: 461 | dependency: transitive 462 | description: 463 | name: watcher 464 | url: "https://pub.dartlang.org" 465 | source: hosted 466 | version: "1.0.1" 467 | web_socket_channel: 468 | dependency: transitive 469 | description: 470 | name: web_socket_channel 471 | url: "https://pub.dartlang.org" 472 | source: hosted 473 | version: "2.2.0" 474 | yaml: 475 | dependency: transitive 476 | description: 477 | name: yaml 478 | url: "https://pub.dartlang.org" 479 | source: hosted 480 | version: "3.1.0" 481 | sdks: 482 | dart: ">=2.17.0-0 <3.0.0" 483 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: course_camp 2 | description: A sample app showing best practices to develop modern flutter apps 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.16.2 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^1.0.2 37 | get: ^4.6.1 38 | animations: ^2.0.2 39 | json_serializable: ^6.2.0 40 | 41 | dev_dependencies: 42 | flutter_test: 43 | sdk: flutter 44 | 45 | # The "flutter_lints" package below contains a set of recommended lints to 46 | # encourage good coding practices. The lint set provided by the package is 47 | # activated in the `analysis_options.yaml` file located at the root of your 48 | # package. See that file for information about deactivating specific lint 49 | # rules and activating additional ones. 50 | flutter_lints: ^1.0.0 51 | build_runner: ^2.1.10 52 | 53 | # For information on the generic Dart part of this file, see the 54 | # following page: https://dart.dev/tools/pub/pubspec 55 | 56 | # The following section is specific to Flutter. 57 | flutter: 58 | 59 | # The following line ensures that the Material Icons font is 60 | # included with your application, so that you can use the icons in 61 | # the material Icons class. 62 | uses-material-design: true 63 | 64 | # To add assets to your application, add an assets section, like this: 65 | assets: 66 | - assets/images/ 67 | - assets/raw/ 68 | 69 | # An image asset can refer to one or more resolution-specific "variants", see 70 | # https://flutter.dev/assets-and-images/#resolution-aware. 71 | 72 | # For details regarding adding assets from package dependencies, see 73 | # https://flutter.dev/assets-and-images/#from-packages 74 | 75 | # To add custom fonts to your application, add a fonts section here, 76 | # in this "flutter" section. Each entry in this list should have a 77 | # "family" key with the font family name, and a "fonts" key with a 78 | # list giving the asset and other descriptors for the font. For 79 | # example: 80 | # fonts: 81 | # - family: Schyler 82 | # fonts: 83 | # - asset: fonts/Schyler-Regular.ttf 84 | # - asset: fonts/Schyler-Italic.ttf 85 | # style: italic 86 | # - family: Trajan Pro 87 | # fonts: 88 | # - asset: fonts/TrajanPro.ttf 89 | # - asset: fonts/TrajanPro_Bold.ttf 90 | # weight: 700 91 | # 92 | # For details regarding fonts from package dependencies, 93 | # see https://flutter.dev/custom-fonts/#from-packages 94 | -------------------------------------------------------------------------------- /screenshots/home.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/screenshots/home.jpeg -------------------------------------------------------------------------------- /screenshots/my_courses.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/screenshots/my_courses.jpeg -------------------------------------------------------------------------------- /screenshots/onboarding.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/screenshots/onboarding.jpeg -------------------------------------------------------------------------------- /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:course_camp/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(const 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/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/web/icons/Icon-maskable-192.png -------------------------------------------------------------------------------- /web/icons/Icon-maskable-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/waseemabbas8/Course-Camp-Flutter-App/34fc6aa5bf423f76993154c8804dc985e23c40f5/web/icons/Icon-maskable-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | course_camp 33 | 34 | 35 | 36 | 39 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "course_camp", 3 | "short_name": "course_camp", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A sample app showing best practices to develop modern flutter apps", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | }, 22 | { 23 | "src": "icons/Icon-maskable-192.png", 24 | "sizes": "192x192", 25 | "type": "image/png", 26 | "purpose": "maskable" 27 | }, 28 | { 29 | "src": "icons/Icon-maskable-512.png", 30 | "sizes": "512x512", 31 | "type": "image/png", 32 | "purpose": "maskable" 33 | } 34 | ] 35 | } 36 | --------------------------------------------------------------------------------