├── .fvm
├── flutter_sdk
└── fvm_config.json
├── .fvmrc
├── .github
└── workflows
│ └── dart.yml
├── .gitignore
├── .metadata
├── .run
├── DEV.run.xml
├── MOCK.run.xml
└── PROD.run.xml
├── Makefile
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── organization
│ │ │ │ └── sample_project
│ │ │ │ └── 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
└── locales
│ ├── en-US.json
│ └── hi-IN.json
├── data
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── lib
│ ├── api_constants
│ │ └── api_paths.dart
│ ├── base
│ │ └── base_repository.dart
│ ├── config
│ │ ├── app_config.dart
│ │ ├── app_config_type.dart
│ │ └── environment.dart
│ ├── datasource
│ │ ├── api_client
│ │ │ ├── network_datasource.dart
│ │ │ └── network_datasource_type.dart
│ │ ├── local_database
│ │ │ └── app_database.dart
│ │ ├── shared_preference
│ │ │ ├── local_datasource.dart
│ │ │ └── local_datasource_type.dart
│ │ └── translations
│ │ │ └── translation_datasource.dart
│ ├── di
│ │ ├── data_injection.dart
│ │ └── datasource_module.dart
│ ├── mocks
│ │ └── mocks.dart
│ ├── models
│ │ ├── app_multipart.dart
│ │ └── reasponse_dto.dart
│ ├── repositories
│ │ ├── comments
│ │ │ ├── comments_repository.dart
│ │ │ └── comments_repository_type.dart
│ │ ├── sections
│ │ │ ├── sections_repository.dart
│ │ │ └── sections_repository_type.dart
│ │ └── tasks
│ │ │ ├── tasks_repository.dart
│ │ │ └── tasks_repository_type.dart
│ └── utils
│ │ ├── method_defination.dart
│ │ └── platform_dependent.dart
├── pubspec.yaml
└── test
│ └── data_test.dart
├── domain
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── lib
│ ├── base
│ │ ├── api_paths.dart
│ │ └── error_response.dart
│ ├── di
│ │ └── domain_injection.dart
│ ├── mocks.dart
│ ├── model
│ │ ├── comments
│ │ │ ├── comment.dart
│ │ │ ├── comment.g.dart
│ │ │ ├── comments_response.dart
│ │ │ └── comments_response.g.dart
│ │ ├── sections
│ │ │ ├── section.dart
│ │ │ ├── section.g.dart
│ │ │ ├── sections_response.dart
│ │ │ └── sections_response.g.dart
│ │ ├── tasks
│ │ │ ├── task.dart
│ │ │ ├── task.g.dart
│ │ │ ├── tasks_response.dart
│ │ │ └── tasks_response.g.dart
│ │ └── users
│ │ │ ├── user.dart
│ │ │ ├── user.g.dart
│ │ │ ├── users_response.dart
│ │ │ └── users_response.g.dart
│ ├── usecase
│ │ └── kanban
│ │ │ ├── kanban_usecase.dart
│ │ │ └── kanban_usecase_type.dart
│ └── util
│ │ ├── validation
│ │ ├── email_validator.dart
│ │ ├── mobile_number_validator.dart
│ │ ├── name_validator.dart
│ │ ├── otp_validator.dart
│ │ ├── password_validator.dart
│ │ ├── referral_code_validator.dart
│ │ ├── validation_facade.dart
│ │ └── validation_facade_type.dart
│ │ └── validator_mixin.dart
├── pubspec.yaml
└── test
│ └── domain_test.dart
├── environments
├── .env.dev
├── .env.prod
├── .gitignore
├── Makefile
├── lib
│ └── env
│ │ ├── env_dev.dart
│ │ ├── env_dev.g.dart
│ │ ├── env_prod.dart
│ │ └── env_prod.g.dart
├── pubspec.yaml
└── test
│ └── env_test.dart
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── di
│ └── AppConfigure.dart
├── entry_point
│ ├── main_dev.dart
│ ├── main_mock.dart
│ ├── main_prod.dart
│ └── my_app.dart
├── environment
│ ├── development
│ │ └── development_env.dart
│ └── production
│ │ └── production_env.dart
├── generated_plugin_registrant.dart
├── presentation
│ ├── kanban_board
│ │ ├── bloc
│ │ │ ├── kanban_bloc.dart
│ │ │ └── kanban_state.dart
│ │ ├── kanban_screen.dart
│ │ └── widgets
│ │ │ ├── kanban_drag_target.dart
│ │ │ └── kanban_draggable.dart
│ └── splash
│ │ └── splash_page.dart
├── router
│ ├── gen_route.dart
│ ├── named_route.dart
│ ├── navigation_controller.dart
│ └── routes.dart
└── util
│ ├── app_global.dart
│ ├── app_mixin.dart
│ ├── app_router.dart
│ ├── assets
│ ├── app_color.dart
│ ├── app_locale.dart
│ └── app_text.dart
│ ├── connectivity_mixin.dart
│ ├── constants.dart
│ ├── navigation
│ └── navigation_helper.dart
│ ├── util.dart
│ └── widget
│ └── app_primary_button.dart
├── pubspec.yaml
└── test
└── widget_test.dart
/.fvm/flutter_sdk:
--------------------------------------------------------------------------------
1 | /Users/Azlaan/fvm/versions/3.22.2
--------------------------------------------------------------------------------
/.fvm/fvm_config.json:
--------------------------------------------------------------------------------
1 | {
2 | "flutterSdkVersion": "3.22.2"
3 | }
--------------------------------------------------------------------------------
/.fvmrc:
--------------------------------------------------------------------------------
1 | {
2 | "flutter": "3.22.2",
3 | "flavors": {}
4 | }
--------------------------------------------------------------------------------
/.github/workflows/dart.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: Dart
7 |
8 | on:
9 | push:
10 | branches: [ "development" ]
11 |
12 | jobs:
13 | build:
14 | runs-on: ubuntu-latest
15 |
16 | steps:
17 | - uses: actions/checkout@v3
18 |
19 | - name: Install Flutter
20 | uses: britannio/action-install-flutter@v1.1
21 |
22 | - name: Install dependencies
23 | run: flutter pub get
24 |
25 | - name: Generate Files
26 | run: flutter pub run build_runner build --delete-conflicting-outputs
27 |
28 | - name: Build AAB
29 | run: flutter build appbundle --debug -t lib/entry_point/main_mock.dart
30 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Symbolication related
36 | app.*.symbols
37 |
38 | # Obfuscation related
39 | app.*.map.json
40 |
41 | # Android Studio will place build artifacts here
42 | /android/app/debug
43 | /android/app/profile
44 | /android/app/release
45 | pubspec.lock
--------------------------------------------------------------------------------
/.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.
5 |
6 | version:
7 | revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
17 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
18 | - platform: android
19 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
20 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
21 | - platform: ios
22 | create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
23 | base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf
24 |
25 | # User provided section
26 |
27 | # List of Local paths (relative to this file) that should be
28 | # ignored by the migrate tool.
29 | #
30 | # Files that are not part of the templates will be ignored by default.
31 | unmanaged_files:
32 | - 'lib/main.dart'
33 | - 'ios/Runner.xcodeproj/project.pbxproj'
34 |
--------------------------------------------------------------------------------
/.run/DEV.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.run/MOCK.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.run/PROD.run.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | ### Makefile for tasks app ###
2 |
3 | SHELL := /bin/bash
4 |
5 | gen-f: ## Generate files
6 | flutter pub run build_runner build --delete-conflicting-outputs
7 |
8 | gen-domain-f: ## Generate files
9 | cd domain && flutter pub run build_runner build --delete-conflicting-outputs
10 |
11 | gen-data-f: ## Generate files
12 | cd data && flutter pub run build_runner build --delete-conflicting-outputs
13 |
14 |
15 | gen: ## Generate files
16 | fvm flutter pub run build_runner build --delete-conflicting-outputs
17 |
18 | gen-domain: ## Generate files
19 | cd domain && fvm flutter pub run build_runner build --delete-conflicting-outputs && cd ..
20 |
21 | gen-data: ## Generate files
22 | cd data && fvm flutter pub run build_runner build --delete-conflicting-outputs && cd ..
23 |
24 | app-setup: ## Setup fvm and get Dependencies
25 | dart pub global activate fvm
26 | fvm install 3.22.2
27 | fvm use 3.22.2
28 | make gen-env
29 | make fvm-get
30 |
31 |
32 | pub-get: ## Clean Pub Get
33 | make app-clean
34 | cd data && flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs && cd ..
35 | cd domain && flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs && cd ..
36 | flutter pub get && flutter pub run build_runner build --delete-conflicting-outputs
37 |
38 | app-clean: ## Clean Pub Get
39 | cd data && flutter clean && cd ..
40 | cd domain && flutter clean && cd ..
41 | flutter clean
42 |
43 | fvm-get: ## Clean Pub Get
44 | make fvm-clean
45 | cd data && fvm flutter pub get && fvm flutter pub run build_runner build --delete-conflicting-outputs && cd ..
46 | cd domain && fvm flutter pub get && fvm flutter pub run build_runner build --delete-conflicting-outputs && cd ..
47 | fvm flutter pub get && fvm flutter pub run build_runner build --delete-conflicting-outputs
48 |
49 | fvm-clean: ## Clean Pub Get
50 | cd data && fvm flutter clean && cd ..
51 | cd domain && fvm flutter clean && cd ..
52 | fvm flutter clean
53 |
54 | clean-pods: ## To cleat pods and install it again
55 | -rm ios/Podfile.lock
56 | fvm flutter precache --ios
57 | cd ios && pod cache clean --all && pod cache clean 'FortifySec' --all && pod repo update && pod install
58 |
59 | gen-env: ## Clean Pub Get
60 | -rm environments/lib/env/env_dev.g.dart
61 | -rm environments/lib/env/env_prod.g.dart
62 | cd environments && fvm flutter clean && fvm flutter pub get && fvm flutter pub run build_runner build --delete-conflicting-outputs && cd ..
63 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Kanban Taskmanager - by Azlaan Khan
2 |
3 | This app is a Todo Task manager app in KanBan form.
4 | I am using https://app.todoist.com/
5 | I have created a project under this site and fetching its data to show in app
6 | All functionality is not yet implemented but is sufficient to understand.
7 | This project will demonstrate you the use of Clean Architecture with Bloc.
8 |
9 | ## Getting Started
10 |
11 | To run the project you need to configure with Flutter 3.22.2.
12 | I have created a Make file script for you, you can directly run those script or take a reference from it
13 |
14 | ### Steps To Run the Project
15 |
16 | - Setup Flutter 3.22.2
17 | - Setup FVM
18 | - Terminal Command: make app-setup
19 | - Dependencies Download:
20 | - With FVM
21 | - Terminal Command: make fvm-get
22 | - Without FVM
23 | - Terminal Command: make pub-get
24 |
25 | ### API Setup
26 |
27 | - Todo Api Developer console:
28 | - https://developer.todoist.com/rest/v2/#overview
29 | - To Create an app visit here:
30 | - https://developer.todoist.com/appconsole.html
31 | - After creating app copy Test Token and paste it inside
32 |
33 | ### Entry Point
34 |
35 | You can Run any of below:
36 | - entry_point/main_mock.dart
37 | - entry_point/main_dev.dart
38 | - entry_point/main_prod.dart
39 |
40 | ### Manual Commands Step by Step if you are not using make file commands
41 | - cd data && flutter clean && flutter pub get && cd ..
42 | - cd domain && flutter clean && flutter pub get && cd ..
43 | - flutter clean && flutter pub get
44 | - cd data && flutter pub run build_runner build --delete-conflicting-outputs && cd ..
45 | - cd domain && flutter pub run build_runner build --delete-conflicting-outputs && cd ..
46 | - flutter pub run build_runner build --delete-conflicting-outputs
47 |
48 | ### About Azlaan Khan
49 | Azlaan has been working in the IT industry since last 8 years.
50 | He has contributed in many apps of Different domains.
51 | Have skills to work in Almost any mobile technology and also sometimes work on backend techs.
52 |
53 | Linkedin: https://www.linkedin.com/in/azlaan-khan-74b615a5
54 |
55 |
--------------------------------------------------------------------------------
/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 | ndkVersion flutter.ndkVersion
31 |
32 | compileOptions {
33 | sourceCompatibility JavaVersion.VERSION_1_8
34 | targetCompatibility JavaVersion.VERSION_1_8
35 | }
36 |
37 | kotlinOptions {
38 | jvmTarget = '1.8'
39 | }
40 |
41 | sourceSets {
42 | main.java.srcDirs += 'src/main/kotlin'
43 | }
44 |
45 | defaultConfig {
46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47 | applicationId "com.organization.sample_project"
48 | // You can update the following values to match your application needs.
49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
50 | minSdkVersion flutter.minSdkVersion
51 | targetSdkVersion flutter.targetSdkVersion
52 | versionCode flutterVersionCode.toInteger()
53 | versionName flutterVersionName
54 | }
55 |
56 | buildTypes {
57 | release {
58 | // TODO: Add your own signing config for the release build.
59 | // Signing with the debug keys for now, so `flutter run --release` works.
60 | signingConfig signingConfigs.debug
61 | }
62 | }
63 | }
64 |
65 | flutter {
66 | source '../..'
67 | }
68 |
69 | dependencies {
70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
71 | }
72 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
16 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
31 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/organization/sample_project/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.organization.sample_project
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azlaan95/Flutter-Clean-Architecture/7a9a1f14b5c53fd41c304d181d23a6db1aa51ece/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azlaan95/Flutter-Clean-Architecture/7a9a1f14b5c53fd41c304d181d23a6db1aa51ece/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azlaan95/Flutter-Clean-Architecture/7a9a1f14b5c53fd41c304d181d23a6db1aa51ece/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azlaan95/Flutter-Clean-Architecture/7a9a1f14b5c53fd41c304d181d23a6db1aa51ece/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/azlaan95/Flutter-Clean-Architecture/7a9a1f14b5c53fd41c304d181d23a6db1aa51ece/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 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.7.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.2.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 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | zipStoreBase=GRADLE_USER_HOME
4 | zipStorePath=wrapper/dists
5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
6 |
--------------------------------------------------------------------------------
/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/locales/en-US.json:
--------------------------------------------------------------------------------
1 | {
2 | "app_name": "App Name",
3 | "language": "Language"
4 | }
--------------------------------------------------------------------------------
/assets/locales/hi-IN.json:
--------------------------------------------------------------------------------
1 | {
2 | "app_name": "मेरा ऐप",
3 | "next": "अगला"
4 | }
--------------------------------------------------------------------------------
/data/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Web related
36 | lib/generated_plugin_registrant.dart
37 |
38 | # Symbolication related
39 | app.*.symbols
40 |
41 | # Obfuscation related
42 | app.*.map.json
43 |
44 | # Android Studio will place build artifacts here
45 | /android/app/debug
46 | /android/app/profile
47 | /android/app/release
48 |
49 | # Ignored files
50 | .DS_Store
51 | .atom/
52 | !.idea/
53 | .idea/*
54 | !.idea/workspace.xml
55 | android/.idea
56 | .vscode/
57 | .packages
58 | .pub/
59 | .dart_tool/
60 | flutter_export_environment.sh
61 | Podfile.lock
62 | Pods/
63 | .symlinks/
64 | **/Flutter/App.framework/
65 | **/Flutter/Flutter.framework/
66 | **/Flutter/Generated.xcconfig
67 | **/Flutter/flutter_assets/
68 | ServiceDefinitions.json
69 | xcuserdata/
70 | **/DerivedData/
71 | local.properties
72 | keystore.properties
73 | .gradle/
74 | gradlew
75 | gradlew.bat
76 | gradle-wrapper.jar
77 | .flutter-plugins-dependencies
78 | *.iml
79 | GeneratedPluginRegistrant.h
80 | GeneratedPluginRegistrant.m
81 | GeneratedPluginRegistrant.java
82 | build/
83 | .flutter-plugins
84 | .project
85 | .classpath
86 | .settings
87 |
88 | coverage/
89 | .last_build_id
90 | report.xml
91 | .fvm/flutter_sdk
92 | pubspec.lock
93 | */oss_licenses.g.dart
--------------------------------------------------------------------------------
/data/.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.
5 |
6 | version:
7 | revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
17 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
18 | - platform: android
19 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
20 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
21 | - platform: ios
22 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
23 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
24 |
25 | # User provided section
26 |
27 | # List of Local paths (relative to this file) that should be
28 | # ignored by the migrate tool.
29 | #
30 | # Files that are not part of the templates will be ignored by default.
31 | unmanaged_files:
32 | - 'lib/main.dart'
33 | - 'ios/Runner.xcodeproj/project.pbxproj'
34 |
--------------------------------------------------------------------------------
/data/README.md:
--------------------------------------------------------------------------------
1 | # data
2 |
3 | A new Flutter project.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/data/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 |
--------------------------------------------------------------------------------
/data/lib/api_constants/api_paths.dart:
--------------------------------------------------------------------------------
1 | class ApiPaths {
2 | static String tasks = "/tasks";
3 | static String sections = "/sections";
4 | static String comments = "/comments";
5 | }
6 |
--------------------------------------------------------------------------------
/data/lib/base/base_repository.dart:
--------------------------------------------------------------------------------
1 | import 'package:azl_data/config/app_config_type.dart';
2 | import 'package:azl_data/datasource/api_client/network_datasource.dart';
3 | import 'package:azl_data/di/datasource_module.dart';
4 | import 'package:azl_data/models/app_multipart.dart';
5 | import 'package:azl_data/models/reasponse_dto.dart';
6 |
7 | class BaseRepository with DatasourceModule {
8 | BaseRepository({required this.appConfig});
9 |
10 | final AppConfigType appConfig;
11 |
12 | Future callGetApi(
13 | {required String url,
14 | Map? body,
15 | Map? queryParameter,
16 | Map? headers,
17 | required String apiPath}) async {
18 | headers = {};
19 | ResponseDto response = await apiClient.apiRequest(
20 | url: url,
21 | method: RequestMethod.GET,
22 | body: body,
23 | queryParameter: queryParameter,
24 | headers: headers,
25 | apiPath: apiPath);
26 | return response;
27 | }
28 |
29 | Future callPostApi(
30 | {required String url,
31 | Map? body,
32 | Map? queryParameter,
33 | Map? headers,
34 | required String apiPath}) async {
35 | ResponseDto response = await apiClient.apiRequest(
36 | url: url,
37 | method: RequestMethod.POST,
38 | body: body,
39 | queryParameter: queryParameter,
40 | headers: headers,
41 | apiPath: apiPath);
42 | return response;
43 | }
44 |
45 | Future callDeleteApi(
46 | {required String url,
47 | required RequestMethod method,
48 | Map? body,
49 | Map? queryParameter,
50 | Map? headers,
51 | required String apiPath}) async {
52 | ResponseDto response = await apiClient.apiRequest(
53 | url: url, method: RequestMethod.DELETE, apiPath: apiPath);
54 | return response;
55 | }
56 |
57 | Future callPutApi(
58 | {required String url,
59 | Map? body,
60 | Map? queryParameter,
61 | Map? headers,
62 | required String apiPath}) async {
63 | ResponseDto response = await apiClient.apiRequest(
64 | url: url,
65 | method: RequestMethod.PUT,
66 | body: body,
67 | queryParameter: queryParameter,
68 | headers: headers,
69 | apiPath: apiPath);
70 | return response;
71 | }
72 |
73 | Future callPatchApi(
74 | {required String url,
75 | Map? body,
76 | Map? queryParameter,
77 | Map? headers,
78 | required String apiPath}) async {
79 | ResponseDto response = await apiClient.apiRequest(
80 | url: url,
81 | method: RequestMethod.PATCH,
82 | body: body,
83 | queryParameter: queryParameter,
84 | headers: headers,
85 | apiPath: apiPath);
86 | return response;
87 | }
88 |
89 | Future callMultipartApi(
90 | {required String url,
91 | required AppMultiPartRequest multiPart,
92 | Map? headers,
93 | required String apiPath}) async {
94 | ResponseDto response = await apiClient.multipartRequest(
95 | url: url, multiPart: multiPart, headers: headers, apiPath: apiPath);
96 | return response;
97 | }
98 |
99 | Map mapHeaders(Map? headers) {
100 | Map newHeaders = headers ?? {};
101 | if (appConfig.token?.isNotEmpty ?? false) {
102 | newHeaders.putIfAbsent("Authorization", () => appConfig.token ?? "");
103 | }
104 | return newHeaders;
105 | }
106 | }
107 |
--------------------------------------------------------------------------------
/data/lib/config/app_config.dart:
--------------------------------------------------------------------------------
1 | import 'package:azl_data/config/app_config_type.dart';
2 | import 'package:azl_data/config/environment.dart';
3 | import 'package:http/src/response.dart';
4 |
5 | class AppConfig implements AppConfigType {
6 | static final AppConfig shared = AppConfig._instance();
7 |
8 | factory AppConfig({required Environment env, bool? enableMock = false}) {
9 | shared.env = env;
10 | shared.enableMock = enableMock;
11 | return shared;
12 | }
13 |
14 | AppConfig._instance();
15 |
16 | Environment? env;
17 |
18 | @override
19 | enableIntercept(Response response) {
20 | print(response.body);
21 | }
22 |
23 | @override
24 | String getBaseUrl1() {
25 | return (env?.baseUrl ?? '') + (env?.path1 ?? '');
26 | }
27 |
28 | @override
29 | String? token;
30 |
31 | @override
32 | bool? enableMock;
33 | }
34 |
--------------------------------------------------------------------------------
/data/lib/config/app_config_type.dart:
--------------------------------------------------------------------------------
1 | import 'package:http/src/response.dart';
2 |
3 | abstract class AppConfigType {
4 | String getBaseUrl1();
5 |
6 | String? token;
7 |
8 | bool? enableMock;
9 |
10 | enableIntercept(Response response);
11 | }
12 |
--------------------------------------------------------------------------------
/data/lib/config/environment.dart:
--------------------------------------------------------------------------------
1 | class Environment {
2 | Environment(
3 | {required this.baseUrl,
4 | required this.path1,
5 | this.path2 = '',
6 | required this.token});
7 |
8 | final String baseUrl;
9 | final String path1;
10 | final String? path2;
11 | final String token;
12 | }
13 |
--------------------------------------------------------------------------------
/data/lib/datasource/api_client/network_datasource.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:azl_data/config/app_config.dart';
4 | import 'package:azl_data/datasource/api_client/network_datasource_type.dart';
5 | import 'package:azl_data/models/app_multipart.dart';
6 | import 'package:azl_data/models/reasponse_dto.dart';
7 | import 'package:http/http.dart';
8 |
9 | enum RequestMethod { GET, POST, PATCH, DELETE, PUT }
10 |
11 | class NetworkDatasource implements NetworkDatasourceType {
12 | static final NetworkDatasource _instance = NetworkDatasource._internal();
13 |
14 | // using a factory is important
15 | // because it promises to return _an_ object of this type
16 | // but it doesn't promise to make a new one.
17 | factory NetworkDatasource() {
18 | return _instance;
19 | }
20 |
21 | // This named constructor is the "real" constructor
22 | // It'll be called exactly once, by the static property assignment above
23 | // it's also private, so it can only be called in this class
24 | NetworkDatasource._internal();
25 |
26 | final Client _innerClient = Client();
27 | final List _interceptors = [];
28 |
29 | //AppHttpClient(this._innerClient);
30 |
31 | void addInterceptor(Function(BaseRequest request) interceptor) {
32 | _interceptors.add(interceptor);
33 | }
34 |
35 | Future get(Uri url) async {
36 | Request request = Request('GET', url);
37 | await _applyInterceptors(request);
38 | final response = await _innerClient.send(request);
39 | return Response.fromStream(response);
40 | }
41 |
42 | Future _applyInterceptors(BaseRequest request) async {
43 | if (AppConfig.shared.token?.isNotEmpty ?? false) {
44 | request.headers
45 | .putIfAbsent("Authorization", () => AppConfig.shared.token ?? "");
46 | }
47 | request.headers
48 | .putIfAbsent("Content-Type", () => "application/json; charset=UTF-8");
49 | request.headers
50 | .putIfAbsent("Accept", () => "application/json; charset=UTF-8");
51 | /* for (var interceptor in _interceptors) {
52 | await interceptor(request);
53 | }*/
54 | }
55 |
56 | @override
57 | Future apiRequest({required String url,
58 | required RequestMethod method,
59 | Map? body,
60 | Map? queryParameter,
61 | Map? headers,
62 | required String apiPath}) async {
63 | final Uri uri =
64 | Uri.parse(generateUrl(url: url, path: apiPath, params: queryParameter));
65 | try {
66 | Request request = Request(method.name, uri);
67 | request.headers.addAll(headers ?? {});
68 | if (AppConfig.shared.token?.isNotEmpty ?? false) {
69 | request.headers
70 | .putIfAbsent("Authorization", () => AppConfig.shared.token ?? "");
71 | }
72 | request.headers
73 | .putIfAbsent("Content-Type", () => "application/json; charset=UTF-8");
74 | request.headers
75 | .putIfAbsent("Accept", () => "application/json; charset=UTF-8");
76 | if (method != RequestMethod.GET) {
77 | request.body = jsonEncode(body);
78 | }
79 |
80 | //await _applyInterceptors(request);
81 | var streamResponse = await _innerClient.send(request);
82 | Response response = await Response.fromStream(streamResponse);
83 |
84 | return getAppResponse(response);
85 | } catch (e) {
86 | return getAppResponse(Response(
87 | jsonEncode({
88 | "url": uri.path,
89 | "error": e,
90 | "request": body,
91 | "headers": headers,
92 | "method": method
93 | }),
94 | 505));
95 | }
96 | }
97 |
98 | @override
99 | Future multipartRequest({required String url,
100 | required AppMultiPartRequest multiPart,
101 | Map? headers,
102 | required String apiPath}) async {
103 | final Uri uri = Uri.parse(generateUrl(url: url, path: apiPath));
104 | try {
105 | //Response response;
106 | MultipartRequest request = MultipartRequest("POST", uri);
107 | request.fields.addAll(multiPart.fields ?? {});
108 | request.files.addAll(multiPart.files ?? []);
109 | request.headers.addAll(headers ?? {});
110 | await _applyInterceptors(request);
111 | var streamResponse = await _innerClient.send(request);
112 | Response response = await Response.fromStream(streamResponse);
113 | return getAppResponse(response);
114 | } catch (e) {
115 | return getAppResponse(Response(
116 | jsonEncode({
117 | "url": uri.path,
118 | "error": e,
119 | "request": multiPart,
120 | "headers": headers,
121 | "method": "MULTIPART"
122 | }),
123 | 505));
124 | }
125 | }
126 |
127 | ResponseDto getAppResponse(Response response) {
128 | try {
129 | if (response.statusCode == 200) {
130 | final jsonData = jsonDecode(response.body);
131 | return ResponseDto(success: true, response: jsonData);
132 | } else if (response.statusCode == 505) {
133 | return ResponseDto(success: false, errorResponse: response);
134 | } else {
135 | final jsonData = jsonDecode(response.body);
136 | return ResponseDto(success: false, response: jsonData);
137 | }
138 | } catch (e) {
139 | return ResponseDto(success: false, errorResponse: e, isException: true);
140 | }
141 | }
142 |
143 | String generateUrl(
144 | {required String url, Map? params, String? path}) {
145 | if (params == null) return url + (path ?? '');
146 | List queryString = [];
147 | params.forEach((key, value) {
148 | if (value != null) {
149 | queryString.add('$key=$value');
150 | }
151 | });
152 | String queryPath = queryString.join('&');
153 | return url + (path != null ? "$path?" : "") + queryPath;
154 | }
155 | }
156 |
--------------------------------------------------------------------------------
/data/lib/datasource/api_client/network_datasource_type.dart:
--------------------------------------------------------------------------------
1 | import 'package:azl_data/models/app_multipart.dart';
2 | import 'package:azl_data/models/reasponse_dto.dart';
3 |
4 | import 'network_datasource.dart';
5 |
6 | abstract class NetworkDatasourceType {
7 | Future apiRequest(
8 | {required String url,
9 | required RequestMethod method,
10 | Map? body,
11 | Map? queryParameter,
12 | Map? headers,
13 | required String apiPath});
14 |
15 | Future multipartRequest(
16 | {required String url,
17 | required AppMultiPartRequest multiPart,
18 | Map? headers,
19 | required String apiPath});
20 | }
21 |
--------------------------------------------------------------------------------
/data/lib/datasource/local_database/app_database.dart:
--------------------------------------------------------------------------------
1 | /*
2 | // database.dart
3 |
4 | // required package imports
5 | import 'dart:async';
6 | import 'package:floor/floor.dart';
7 | import 'package:sqflite/sqflite.dart' as sqflite;
8 |
9 |
10 | part 'app_database.g.dart'; // the generated code will be there
11 |
12 | @Database(version: 1, entities: [TodoTask])
13 | abstract class AppDatabase extends FloorDatabase {
14 | TasksDao get personDao;
15 | }*/
16 |
--------------------------------------------------------------------------------
/data/lib/datasource/shared_preference/local_datasource.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:azl_data/utils/method_defination.dart';
4 | import 'package:azl_data/datasource/shared_preference/local_datasource_type.dart';
5 | import 'package:shared_preferences/shared_preferences.dart';
6 |
7 | class LocalDatasource implements LocalDatasourceType {
8 | static final LocalDatasource _instance = LocalDatasource._internal();
9 |
10 | // using a factory is important
11 | // because it promises to return _an_ object of this type
12 | // but it doesn't promise to make a new one.
13 | factory LocalDatasource() {
14 | return _instance;
15 | }
16 |
17 | // This named constructor is the "real" constructor
18 | // It'll be called exactly once, by the static property assignment above
19 | // it's also private, so it can only be called in this class
20 | LocalDatasource._internal();
21 |
22 | @override
23 | Future getString(String key, String? defaultValue) async {
24 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
25 | return (await sharedPreferences.getString(key) ?? defaultValue);
26 | }
27 |
28 | @override
29 | Future getBool(String key, bool? defaultValue) async {
30 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
31 | return (await sharedPreferences.getBool(key) ?? defaultValue);
32 | }
33 |
34 | @override
35 | Future getDouble(String key, double? defaultValue) async {
36 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
37 | return (await sharedPreferences.getDouble(key) ?? defaultValue);
38 | }
39 |
40 | @override
41 | Future getInt(String key, int? defaultValue) async {
42 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
43 | return (await sharedPreferences.getInt(key) ?? defaultValue);
44 | }
45 |
46 | @override
47 | Future getObject(String key, FromJson converter) async {
48 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
49 | String? stringObj = await sharedPreferences.getString(key);
50 | if (stringObj != null) {
51 | return converter(jsonDecode(stringObj) as Map);
52 | } else {
53 | return null;
54 | }
55 | }
56 |
57 | @override
58 | Future setBool(String key, bool value) async {
59 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
60 | return await sharedPreferences.setBool(key, value);
61 | }
62 |
63 | @override
64 | Future setDouble(String key, double value) async {
65 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
66 | return await sharedPreferences.setDouble(key, value);
67 | }
68 |
69 | @override
70 | Future setInt(String key, int value) async {
71 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
72 | return await sharedPreferences.setInt(key, value);
73 | }
74 |
75 | @override
76 | Future setObject(String key, Map value) async {
77 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
78 | return await sharedPreferences.setString(key, jsonEncode(value));
79 | }
80 |
81 | @override
82 | Future setString(String key, String value) async {
83 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
84 | return await sharedPreferences.setString(key, value);
85 | }
86 |
87 | @override
88 | Future clearAll() async {
89 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
90 | return await sharedPreferences.clear();
91 | }
92 |
93 | @override
94 | Future clearKey(String key) async {
95 | SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
96 | return await sharedPreferences.remove(key);
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/data/lib/datasource/shared_preference/local_datasource_type.dart:
--------------------------------------------------------------------------------
1 | import 'package:azl_data/utils/method_defination.dart';
2 |
3 | abstract class LocalDatasourceType {
4 | Future getString(String key, String? defaultValue);
5 |
6 | Future getInt(String key, int? defaultValue);
7 |
8 | Future getBool(String key, bool? defaultValue);
9 |
10 | Future getDouble(String key, double? defaultValue);
11 |
12 | Future getObject(String key, FromJson converter);
13 |
14 | Future setString(String key, String value);
15 |
16 | Future setInt(String key, int value);
17 |
18 | Future setBool(String key, bool value);
19 |
20 | Future setDouble(String key, double value);
21 |
22 | Future setObject(String key, Map value);
23 |
24 | Future clearKey(String key);
25 |
26 | Future clearAll();
27 | }
28 |
--------------------------------------------------------------------------------
/data/lib/datasource/translations/translation_datasource.dart:
--------------------------------------------------------------------------------
1 | class LocaleTexts {
2 | static const appName = "app_name";
3 | static const next = "next";
4 | static const language = "language";
5 | static const selectLanguage = "select_language";
6 | static const en = "English";
7 | static const hi = "Hindi";
8 | static const no_internet = "no_internet";
9 | }
10 |
--------------------------------------------------------------------------------
/data/lib/di/data_injection.dart:
--------------------------------------------------------------------------------
1 | import 'package:azl_data/datasource/api_client/network_datasource.dart';
2 | import 'package:azl_data/datasource/api_client/network_datasource_type.dart';
3 | import 'package:azl_data/datasource/shared_preference/local_datasource.dart';
4 | import 'package:azl_data/datasource/shared_preference/local_datasource_type.dart';
5 | import 'package:get_it/get_it.dart';
6 |
7 | class DataInjection {
8 | static GetIt getIt = GetIt.instance;
9 |
10 | static void configure() {
11 | getIt.registerLazySingleton(
12 | () => NetworkDatasource(),
13 | );
14 |
15 | getIt.registerLazySingleton(
16 | () => LocalDatasource(),
17 | );
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/data/lib/di/datasource_module.dart:
--------------------------------------------------------------------------------
1 | import 'package:azl_data/datasource/api_client/network_datasource_type.dart';
2 | import 'package:azl_data/datasource/shared_preference/local_datasource_type.dart';
3 | import 'package:azl_data/di/data_injection.dart';
4 |
5 | mixin DatasourceModule {
6 | /// API/REST Client
7 | NetworkDatasourceType get apiClient {
8 | return DataInjection.getIt();
9 | }
10 |
11 | /// Local Storage
12 | LocalDatasourceType get sharesPreference {
13 | return DataInjection.getIt();
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/data/lib/mocks/mocks.dart:
--------------------------------------------------------------------------------
1 | const tasksMock = [
2 | {
3 | "id": "8103832962",
4 | "assigner_id": null,
5 | "assignee_id": null,
6 | "project_id": "2334529325",
7 | "section_id": "157876129",
8 | "parent_id": null,
9 | "order": 1,
10 | "content": "Login Screen",
11 | "description":
12 | "Create Login Screen ui where email and password field will be there and used can click on Login Button",
13 | "is_completed": false,
14 | "labels": [],
15 | "priority": 4,
16 | "comment_count": 1,
17 | "creator_id": "49528973",
18 | "created_at": "2024-06-10T12:41:49.575948Z",
19 | "due": null,
20 | "url": "https://todoist.com/app/task/8103832962",
21 | "duration": null
22 | },
23 | {
24 | "id": "8106563966",
25 | "assigner_id": null,
26 | "assignee_id": null,
27 | "project_id": "2334529325",
28 | "section_id": "157876158",
29 | "parent_id": null,
30 | "order": 1,
31 | "content": "Signup Screen",
32 | "description":
33 | "Create Signup Screen ui where email and password and confirm password field will be there and used can click on Login Button",
34 | "is_completed": false,
35 | "labels": [],
36 | "priority": 2,
37 | "comment_count": 0,
38 | "creator_id": "49528973",
39 | "created_at": "2024-06-11T07:26:02.878989Z",
40 | "due": null,
41 | "url": "https://todoist.com/app/task/8106563966",
42 | "duration": null
43 | },
44 | {
45 | "id": "8110122935",
46 | "assigner_id": null,
47 | "assignee_id": null,
48 | "project_id": "2334529325",
49 | "section_id": "157876129",
50 | "parent_id": null,
51 | "order": 2,
52 | "content": "Dashboard",
53 | "description": "",
54 | "is_completed": false,
55 | "labels": [],
56 | "priority": 1,
57 | "comment_count": 0,
58 | "creator_id": "49528973",
59 | "created_at": "2024-06-12T08:00:28.710604Z",
60 | "due": null,
61 | "url": "https://todoist.com/app/task/8110122935",
62 | "duration": null
63 | },
64 | {
65 | "id": "8110123226",
66 | "assigner_id": null,
67 | "assignee_id": null,
68 | "project_id": "2334529325",
69 | "section_id": "157876129",
70 | "parent_id": null,
71 | "order": 3,
72 | "content": "Details",
73 | "description": "",
74 | "is_completed": false,
75 | "labels": [],
76 | "priority": 1,
77 | "comment_count": 0,
78 | "creator_id": "49528973",
79 | "created_at": "2024-06-12T08:00:36.552492Z",
80 | "due": null,
81 | "url": "https://todoist.com/app/task/8110123226",
82 | "duration": null
83 | },
84 | {
85 | "id": "8110123306",
86 | "assigner_id": null,
87 | "assignee_id": null,
88 | "project_id": "2334529325",
89 | "section_id": "157876129",
90 | "parent_id": null,
91 | "order": 4,
92 | "content": "Profile",
93 | "description": "",
94 | "is_completed": false,
95 | "labels": [],
96 | "priority": 1,
97 | "comment_count": 0,
98 | "creator_id": "49528973",
99 | "created_at": "2024-06-12T08:00:38.980693Z",
100 | "due": null,
101 | "url": "https://todoist.com/app/task/8110123306",
102 | "duration": null
103 | },
104 | {
105 | "id": "8110123652",
106 | "assigner_id": null,
107 | "assignee_id": null,
108 | "project_id": "2334529325",
109 | "section_id": "157876129",
110 | "parent_id": null,
111 | "order": 5,
112 | "content": "Setting",
113 | "description": "",
114 | "is_completed": false,
115 | "labels": [],
116 | "priority": 1,
117 | "comment_count": 0,
118 | "creator_id": "49528973",
119 | "created_at": "2024-06-12T08:00:48.773665Z",
120 | "due": null,
121 | "url": "https://todoist.com/app/task/8110123652",
122 | "duration": null
123 | },
124 | {
125 | "id": "8110123802",
126 | "assigner_id": null,
127 | "assignee_id": null,
128 | "project_id": "2334529325",
129 | "section_id": "157876152",
130 | "parent_id": null,
131 | "order": 1,
132 | "content": "Secure",
133 | "description": "",
134 | "is_completed": false,
135 | "labels": [],
136 | "priority": 1,
137 | "comment_count": 0,
138 | "creator_id": "49528973",
139 | "created_at": "2024-06-12T08:00:52.553871Z",
140 | "due": null,
141 | "url": "https://todoist.com/app/task/8110123802",
142 | "duration": null
143 | },
144 | {
145 | "id": "8110539090",
146 | "assigner_id": null,
147 | "assignee_id": null,
148 | "project_id": "2334529325",
149 | "section_id": "157876129",
150 | "parent_id": null,
151 | "order": 7,
152 | "content": "Signup Screen",
153 | "description":
154 | "Create Signup Screen ui where email and password and confirm password field will be there and used can click on Login Button",
155 | "is_completed": false,
156 | "labels": [],
157 | "priority": 2,
158 | "comment_count": 0,
159 | "creator_id": "49528973",
160 | "created_at": "2024-06-12T10:13:48.949095Z",
161 | "due": null,
162 | "url": "https://todoist.com/app/task/8110539090",
163 | "duration": null
164 | },
165 | {
166 | "id": "8113084127",
167 | "assigner_id": null,
168 | "assignee_id": null,
169 | "project_id": "2334529325",
170 | "section_id": "157876129",
171 | "parent_id": null,
172 | "order": 8,
173 | "content": "Logout Screen",
174 | "description": "Create Logout Screen ui where",
175 | "is_completed": false,
176 | "labels": [],
177 | "priority": 2,
178 | "comment_count": 0,
179 | "creator_id": "49528973",
180 | "created_at": "2024-06-13T05:02:55.475602Z",
181 | "due": null,
182 | "url": "https://todoist.com/app/task/8113084127",
183 | "duration": null
184 | }
185 | ];
186 |
187 | const sectionsMock = [
188 | {"id": "157876129", "project_id": "2334529325", "order": 1, "name": "Todo"},
189 | {
190 | "id": "157876152",
191 | "project_id": "2334529325",
192 | "order": 2,
193 | "name": "In Progress"
194 | },
195 | {"id": "157876158", "project_id": "2334529325", "order": 3, "name": "Done"}
196 | ];
197 |
--------------------------------------------------------------------------------
/data/lib/models/app_multipart.dart:
--------------------------------------------------------------------------------
1 | import 'package:http/http.dart';
2 |
3 | class AppMultiPartRequest {
4 | final Map? fields;
5 | final List? files;
6 |
7 | AppMultiPartRequest({this.fields, this.files});
8 | }
9 |
--------------------------------------------------------------------------------
/data/lib/models/reasponse_dto.dart:
--------------------------------------------------------------------------------
1 | int EXCEPTION_RESPONSE = 500;
2 | int FAILURE_RESPONSE = 400;
3 |
4 | class ResponseDto {
5 | final bool success;
6 | final dynamic response;
7 | final dynamic errorResponse;
8 | final bool noInternet;
9 | final bool isException;
10 | final int responseCode;
11 |
12 | ResponseDto(
13 | {this.success = false,
14 | this.response,
15 | this.noInternet = false,
16 | this.isException = false,
17 | this.responseCode = 0,
18 | this.errorResponse});
19 | }
20 |
--------------------------------------------------------------------------------
/data/lib/repositories/comments/comments_repository.dart:
--------------------------------------------------------------------------------
1 | import 'package:azl_data/api_constants/api_paths.dart';
2 | import 'package:azl_data/mocks/mocks.dart';
3 | import 'package:azl_data/models/reasponse_dto.dart';
4 | import 'package:azl_data/repositories/comments/comments_repository_type.dart';
5 |
6 | class CommentsRepository extends CommentsRepositoryType {
7 | CommentsRepository({required super.appConfig});
8 |
9 | @override
10 | Future getComments() async {
11 | ResponseDto myResponse;
12 | if (appConfig.enableMock ?? false) {
13 | myResponse =
14 | ResponseDto(success: true, response: {"comments": tasksMock});
15 | } else {
16 | myResponse = await callGetApi(
17 | url: appConfig.getBaseUrl1(), apiPath: ApiPaths.tasks);
18 | }
19 | return myResponse;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/data/lib/repositories/comments/comments_repository_type.dart:
--------------------------------------------------------------------------------
1 | import 'package:azl_data/base/base_repository.dart';
2 | import 'package:azl_data/models/reasponse_dto.dart';
3 |
4 | abstract class CommentsRepositoryType extends BaseRepository {
5 | CommentsRepositoryType({required super.appConfig});
6 |
7 | Future getComments();
8 | }
9 |
--------------------------------------------------------------------------------
/data/lib/repositories/sections/sections_repository.dart:
--------------------------------------------------------------------------------
1 | import 'package:azl_data/api_constants/api_paths.dart';
2 | import 'package:azl_data/mocks/mocks.dart';
3 | import 'package:azl_data/models/reasponse_dto.dart';
4 | import 'package:azl_data/repositories/sections/sections_repository_type.dart';
5 |
6 | class SectionsRepository extends SectionsRepositoryType {
7 | SectionsRepository({required super.appConfig});
8 |
9 | @override
10 | Future getSections() async {
11 | ResponseDto myResponse;
12 | if (appConfig.enableMock ?? false) {
13 | myResponse =
14 | ResponseDto(success: true, response: sectionsMock);
15 | } else {
16 | myResponse = await callGetApi(
17 | url: appConfig.getBaseUrl1(), apiPath: ApiPaths.sections);
18 | }
19 | return myResponse;
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/data/lib/repositories/sections/sections_repository_type.dart:
--------------------------------------------------------------------------------
1 | import 'package:azl_data/base/base_repository.dart';
2 | import 'package:azl_data/models/reasponse_dto.dart';
3 |
4 | abstract class SectionsRepositoryType extends BaseRepository {
5 | SectionsRepositoryType({required super.appConfig});
6 |
7 | Future getSections();
8 | }
9 |
--------------------------------------------------------------------------------
/data/lib/repositories/tasks/tasks_repository.dart:
--------------------------------------------------------------------------------
1 | import 'package:azl_data/api_constants/api_paths.dart';
2 | import 'package:azl_data/mocks/mocks.dart';
3 | import 'package:azl_data/models/reasponse_dto.dart';
4 | import 'package:azl_data/repositories/tasks/tasks_repository_type.dart';
5 |
6 | class TasksRepository extends TasksRepositoryType {
7 | TasksRepository({required super.appConfig});
8 |
9 | @override
10 | Future getTasks() async {
11 | ResponseDto myResponse;
12 | if (appConfig.enableMock ?? false) {
13 | myResponse = ResponseDto(success: true, response: tasksMock);
14 | } else {
15 | myResponse = await callGetApi(
16 | url: appConfig.getBaseUrl1(), apiPath: ApiPaths.tasks);
17 | }
18 | return myResponse;
19 | }
20 |
21 | @override
22 | Future createTask({required Map task}) async {
23 | ResponseDto myResponse;
24 | if (appConfig.enableMock ?? false) {
25 | myResponse = ResponseDto(success: true, response: tasksMock);
26 | } else {
27 | myResponse = await callPostApi(
28 | url: appConfig.getBaseUrl1(), apiPath: ApiPaths.tasks);
29 | }
30 | return myResponse;
31 | }
32 |
33 | @override
34 | Future updateTask(
35 | {required Map task, required String taskId}) async {
36 | ResponseDto myResponse;
37 | if (appConfig.enableMock ?? false) {
38 | myResponse = ResponseDto(success: true, response: tasksMock);
39 | } else {
40 | myResponse = await callPostApi(
41 | url: appConfig.getBaseUrl1(), apiPath: "${ApiPaths.tasks}/$taskId", body: task);
42 | }
43 | return myResponse;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/data/lib/repositories/tasks/tasks_repository_type.dart:
--------------------------------------------------------------------------------
1 | import 'package:azl_data/base/base_repository.dart';
2 | import 'package:azl_data/models/reasponse_dto.dart';
3 |
4 | abstract class TasksRepositoryType extends BaseRepository {
5 | TasksRepositoryType({required super.appConfig});
6 |
7 | Future getTasks();
8 |
9 | Future createTask({required Map task});
10 |
11 | Future updateTask(
12 | {required Map task, required String taskId});
13 | }
14 |
--------------------------------------------------------------------------------
/data/lib/utils/method_defination.dart:
--------------------------------------------------------------------------------
1 | typedef T FromJson(Map json);
--------------------------------------------------------------------------------
/data/lib/utils/platform_dependent.dart:
--------------------------------------------------------------------------------
1 | abstract class PlatformDependents{
2 | bool isInternetConnected();
3 | }
--------------------------------------------------------------------------------
/data/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: azl_data
2 | description: Clean Data Layer
3 |
4 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
5 |
6 | version: 1.0.0+1
7 |
8 | environment:
9 | sdk: '>=3.4.3 <4.0.0'
10 |
11 | dependencies:
12 | http: ^0.13.6
13 | shared_preferences: ^2.1.1
14 | get_it: ^7.7.0
15 | floor: ^1.5.0
16 |
17 | dev_dependencies:
18 | flutter_lints: ^2.0.1
19 | floor_generator: ^1.4.2
20 | build_runner: ^2.4.4
21 |
--------------------------------------------------------------------------------
/data/test/data_test.dart:
--------------------------------------------------------------------------------
1 | /*
2 | import 'package:http/http.dart';
3 |
4 | import 'package:azl_data/datasource/api_client/network_datasource.dart';
5 | */
6 |
7 | main() async {
8 | /*Response response = await NetworkDatasource().apiRequest(
9 | url: 'https://6423b770001cb9fc20449630.mockapi.io/api/',
10 | method: RequestMethod.GET,
11 | apiPath: 'v1/kanban_board');
12 |
13 | print(response.body);*/
14 | }
15 |
16 | String generateUrl(
17 | {required String url, Map? params, String? path}) {
18 | if (params == null) return url + (path ?? '');
19 | List queryString = [];
20 | params.forEach((key, value) {
21 | if (value != null) {
22 | queryString.add('$key=$value');
23 | }
24 | });
25 | String queryPath = queryString.join('&');
26 | return url + (path != null ? "$path?" : "") + queryPath;
27 | }
28 |
--------------------------------------------------------------------------------
/domain/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Web related
36 | lib/generated_plugin_registrant.dart
37 |
38 | # Symbolication related
39 | app.*.symbols
40 |
41 | # Obfuscation related
42 | app.*.map.json
43 |
44 | # Android Studio will place build artifacts here
45 | /android/app/debug
46 | /android/app/profile
47 | /android/app/release
48 |
49 | # Ignored files
50 | .DS_Store
51 | .atom/
52 | !.idea/
53 | .idea/*
54 | !.idea/workspace.xml
55 | android/.idea
56 | .vscode/
57 | .packages
58 | .pub/
59 | .dart_tool/
60 | flutter_export_environment.sh
61 | Podfile.lock
62 | Pods/
63 | .symlinks/
64 | **/Flutter/App.framework/
65 | **/Flutter/Flutter.framework/
66 | **/Flutter/Generated.xcconfig
67 | **/Flutter/flutter_assets/
68 | ServiceDefinitions.json
69 | xcuserdata/
70 | **/DerivedData/
71 | local.properties
72 | keystore.properties
73 | .gradle/
74 | gradlew
75 | gradlew.bat
76 | gradle-wrapper.jar
77 | .flutter-plugins-dependencies
78 | *.iml
79 | GeneratedPluginRegistrant.h
80 | GeneratedPluginRegistrant.m
81 | GeneratedPluginRegistrant.java
82 | build/
83 | .flutter-plugins
84 | .project
85 | .classpath
86 | .settings
87 |
88 |
89 | coverage/
90 | .last_build_id
91 | report.xml
92 | .fvm/flutter_sdk
93 | pubspec.lock
94 | */oss_licenses.g.dart
--------------------------------------------------------------------------------
/domain/.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.
5 |
6 | version:
7 | revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
17 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
18 | - platform: android
19 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
20 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
21 | - platform: ios
22 | create_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
23 | base_revision: fb57da5f945d02ef4f98dfd9409a72b7cce74268
24 |
25 | # User provided section
26 |
27 | # List of Local paths (relative to this file) that should be
28 | # ignored by the migrate tool.
29 | #
30 | # Files that are not part of the templates will be ignored by default.
31 | unmanaged_files:
32 | - 'lib/main.dart'
33 | - 'ios/Runner.xcodeproj/project.pbxproj'
34 |
--------------------------------------------------------------------------------
/domain/README.md:
--------------------------------------------------------------------------------
1 | # domain
2 |
3 | Clean Domain Layer
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
13 |
14 | For help getting started with Flutter development, view the
15 | [online documentation](https://docs.flutter.dev/), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/domain/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 |
--------------------------------------------------------------------------------
/domain/lib/base/api_paths.dart:
--------------------------------------------------------------------------------
1 | class ApiPaths {
2 | static String tasks = "/tasks";
3 | static String sections = "/sections";
4 | static String comments = "/comments";
5 | }
6 |
--------------------------------------------------------------------------------
/domain/lib/base/error_response.dart:
--------------------------------------------------------------------------------
1 | import 'package:equatable/equatable.dart';
2 |
3 | class ErrorResponse extends Equatable implements Exception {
4 | final String message;
5 |
6 | const ErrorResponse(this.message);
7 |
8 | @override
9 | List