├── ios
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── 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-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── WorkspaceSettings.xcsettings
│ │ └── IDEWorkspaceChecks.plist
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ └── IDEWorkspaceChecks.plist
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ └── project.pbxproj
└── .gitignore
├── lib
├── app
│ ├── shared
│ │ ├── helpers
│ │ │ ├── config.dart
│ │ │ ├── custom_dio
│ │ │ │ ├── mock
│ │ │ │ │ └── custom_dio_mock.dart
│ │ │ │ ├── custom_dio.dart
│ │ │ │ └── interceptors
│ │ │ │ │ └── custom_interceptor.dart
│ │ │ ├── errors.dart
│ │ │ ├── responses
│ │ │ │ └── authentication_response.dart
│ │ │ └── utils.dart
│ │ ├── components
│ │ │ ├── loading_dialog
│ │ │ │ ├── loading_dialog.g.dart
│ │ │ │ └── loading_dialog.dart
│ │ │ ├── circular_progress_indicator
│ │ │ │ └── circular_progress_indicator_widget.dart
│ │ │ ├── password_text_form_field
│ │ │ │ ├── password_text_form_field_controller.dart
│ │ │ │ ├── password_text_form_field_widget.dart
│ │ │ │ └── password_text_form_field_controller.g.dart
│ │ │ ├── circular_button_widget
│ │ │ │ └── circular_button_widget_widget.dart
│ │ │ └── rounded_text_field
│ │ │ │ └── rounded_text_field_widget.dart
│ │ └── models
│ │ │ └── authentication_model.dart
│ ├── modules
│ │ └── login
│ │ │ ├── domain
│ │ │ ├── repositories
│ │ │ │ ├── mocks
│ │ │ │ │ └── authenticate_repository_mock.dart
│ │ │ │ └── authenticate_repository_interface.dart
│ │ │ ├── usecases
│ │ │ │ ├── interfaces
│ │ │ │ │ ├── mock
│ │ │ │ │ │ └── authenticate_by_login_interface.dart
│ │ │ │ │ └── authenticate_by_login_interface.dart
│ │ │ │ └── authenticate_by_login.dart
│ │ │ ├── entities
│ │ │ │ ├── request
│ │ │ │ │ └── authenticate.dart
│ │ │ │ └── response
│ │ │ │ │ └── result_login.dart
│ │ │ └── errors
│ │ │ │ └── errors.dart
│ │ │ ├── infra
│ │ │ ├── data
│ │ │ │ ├── datasource
│ │ │ │ │ ├── mock
│ │ │ │ │ │ └── authenticate_datasource_mock.dart
│ │ │ │ │ └── authenticate_datasource_interface.dart
│ │ │ │ └── repositories
│ │ │ │ │ ├── authenticate_repository.g.dart
│ │ │ │ │ └── authenticate_repository.dart
│ │ │ ├── models
│ │ │ │ ├── reponse
│ │ │ │ │ └── authenticate_model.dart
│ │ │ │ └── request
│ │ │ │ │ └── result_login_model.dart
│ │ │ └── external
│ │ │ │ └── datasource
│ │ │ │ └── authenticate_datasource.dart
│ │ │ ├── presenter
│ │ │ └── pages
│ │ │ │ └── login
│ │ │ │ ├── states
│ │ │ │ └── login_state.dart
│ │ │ │ ├── login_page.dart
│ │ │ │ ├── login_controller.dart
│ │ │ │ ├── components
│ │ │ │ └── login_form
│ │ │ │ │ └── login_form_widget.dart
│ │ │ │ └── login_controller.g.dart
│ │ │ └── login_module.dart
│ ├── app_widget.dart
│ └── app_module.dart
└── main.dart
├── README.md
├── android
├── gradle.properties
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── 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
│ │ │ │ ├── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ │ └── values
│ │ │ │ │ └── styles.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── ddd_example
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── .gitignore
├── settings.gradle
└── build.gradle
├── .metadata
├── .gitignore
├── test
└── app
│ └── modules
│ └── login
│ ├── presenter
│ └── pages
│ │ └── login_controller_test.dart
│ ├── data
│ ├── infra
│ │ └── repositories
│ │ │ └── authenticate_repository_test.dart
│ └── external
│ │ └── datasource
│ │ └── authenticate_datasource_test.dart
│ └── domain
│ └── usecases
│ └── authenticate_by_login_test.dart
├── pubspec.yaml
└── pubspec.lock
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/app/shared/helpers/config.dart:
--------------------------------------------------------------------------------
1 | const String baseURL = 'http://192.168.15.11:3001/';
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter with Clean Architecture
2 | An Example of Flutter with Clean Architecture
3 |
4 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 | android.enableR8=true
5 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toshiossada/FlutterClean/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toshiossada/FlutterClean/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toshiossada/FlutterClean/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toshiossada/FlutterClean/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toshiossada/FlutterClean/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toshiossada/FlutterClean/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toshiossada/FlutterClean/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toshiossada/FlutterClean/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toshiossada/FlutterClean/HEAD/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/toshiossada/FlutterClean/HEAD/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/toshiossada/FlutterClean/HEAD/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/toshiossada/FlutterClean/HEAD/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/toshiossada/FlutterClean/HEAD/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/toshiossada/FlutterClean/HEAD/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/toshiossada/FlutterClean/HEAD/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/toshiossada/FlutterClean/HEAD/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/toshiossada/FlutterClean/HEAD/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/toshiossada/FlutterClean/HEAD/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/toshiossada/FlutterClean/HEAD/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/toshiossada/FlutterClean/HEAD/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/toshiossada/FlutterClean/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toshiossada/FlutterClean/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/toshiossada/FlutterClean/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/lib/app/shared/helpers/custom_dio/mock/custom_dio_mock.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/native_imp.dart';
2 | import 'package:mockito/mockito.dart';
3 |
4 | class CustomDioMock extends Mock implements DioForNative {}
5 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/ddd_example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.ddd_example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:ddd_example/app/app_module.dart';
3 | import 'package:flutter_modular/flutter_modular.dart';
4 |
5 | void main() => runApp(ModularApp(module: AppModule()));
6 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lib/app/modules/login/domain/repositories/mocks/authenticate_repository_mock.dart:
--------------------------------------------------------------------------------
1 | import 'package:mockito/mockito.dart';
2 | import '../authenticate_repository_interface.dart';
3 |
4 | class AuthenticateRepositoryMock extends Mock
5 | implements IAuthenticateRepository {}
6 |
--------------------------------------------------------------------------------
/lib/app/modules/login/domain/usecases/interfaces/mock/authenticate_by_login_interface.dart:
--------------------------------------------------------------------------------
1 | import 'package:mockito/mockito.dart';
2 |
3 | import '../authenticate_by_login_interface.dart';
4 |
5 | class AuthenticateByLoginMock extends Mock implements IAuthenticateByLogin {}
6 |
--------------------------------------------------------------------------------
/lib/app/modules/login/infra/data/datasource/mock/authenticate_datasource_mock.dart:
--------------------------------------------------------------------------------
1 | import 'package:mockito/mockito.dart';
2 |
3 | import '../authenticate_datasource_interface.dart';
4 |
5 | class AuthenticateDatasourceMock extends Mock
6 | implements IAuthenticateDatasource {}
7 |
--------------------------------------------------------------------------------
/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-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/lib/app/shared/helpers/custom_dio/custom_dio.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/dio.dart';
2 | import 'package:dio/native_imp.dart';
3 | import 'interceptors/custom_interceptor.dart';
4 |
5 |
6 | class CustomDio extends DioForNative {
7 | CustomDio([BaseOptions options]) : super(options) {
8 | interceptors.add(CustomInterceptors());
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/.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: 84f3d28555368a70270e9ac8390a9441df95e752
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/lib/app/modules/login/domain/entities/request/authenticate.dart:
--------------------------------------------------------------------------------
1 |
2 | class Authenticate {
3 | final String login;
4 | final String senha;
5 | final bool rememberMe;
6 |
7 | Authenticate({
8 | this.login,
9 | this.senha,
10 | this.rememberMe,
11 | });
12 |
13 | bool get isValid => login.isNotEmpty && senha.isNotEmpty;
14 | }
15 |
--------------------------------------------------------------------------------
/lib/app/modules/login/domain/entities/response/result_login.dart:
--------------------------------------------------------------------------------
1 | class ResultLogin {
2 | final int idUsuario;
3 | final String nomeUsuario;
4 | final String loginUsuario;
5 | final String emailUsuario;
6 |
7 | ResultLogin({
8 | this.idUsuario,
9 | this.nomeUsuario,
10 | this.loginUsuario,
11 | this.emailUsuario,
12 | });
13 | }
14 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lib/app/modules/login/infra/data/datasource/authenticate_datasource_interface.dart:
--------------------------------------------------------------------------------
1 | import 'package:ddd_example/app/modules/login/infra/models/reponse/authenticate_model.dart';
2 | import 'package:ddd_example/app/modules/login/infra/models/request/result_login_model.dart';
3 |
4 | abstract class IAuthenticateDatasource {
5 | Future authenticate(AuthenticateModel auth);
6 | }
7 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/lib/app/shared/components/loading_dialog/loading_dialog.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'loading_dialog.dart';
4 |
5 | // **************************************************************************
6 | // InjectionGenerator
7 | // **************************************************************************
8 |
9 | final $LoadingDialog = BindInject(
10 | (i) => LoadingDialog(),
11 | singleton: false,
12 | lazy: true,
13 | );
14 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/app/modules/login/domain/usecases/interfaces/authenticate_by_login_interface.dart:
--------------------------------------------------------------------------------
1 | import 'package:dartz/dartz.dart';
2 | import 'package:ddd_example/app/modules/login/domain/entities/request/authenticate.dart';
3 | import 'package:ddd_example/app/modules/login/domain/entities/response/result_login.dart';
4 | import 'package:ddd_example/app/modules/login/domain/errors/errors.dart';
5 |
6 | abstract class IAuthenticateByLogin {
7 | Future> call(Authenticate authenticate);
8 | }
9 |
--------------------------------------------------------------------------------
/lib/app/modules/login/domain/errors/errors.dart:
--------------------------------------------------------------------------------
1 | import 'package:ddd_example/app/shared/helpers/errors.dart';
2 |
3 | abstract class FailureLogin implements Failure {}
4 |
5 | class InvalidLoginError implements FailureLogin {
6 | @override
7 | final String message;
8 | InvalidLoginError({
9 | this.message,
10 | });
11 | }
12 |
13 | class FailureRecoveryPassword implements FailureLogin {
14 | @override
15 | final String message;
16 | FailureRecoveryPassword({
17 | this.message,
18 | });
19 | }
20 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/app/modules/login/infra/data/repositories/authenticate_repository.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'authenticate_repository.dart';
4 |
5 | // **************************************************************************
6 | // InjectionGenerator
7 | // **************************************************************************
8 |
9 | final $AuthenticateRepository = BindInject(
10 | (i) => AuthenticateRepository(i()),
11 | singleton: true,
12 | lazy: true,
13 | );
14 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/lib/app/modules/login/domain/repositories/authenticate_repository_interface.dart:
--------------------------------------------------------------------------------
1 | import 'package:dartz/dartz.dart';
2 | import 'package:ddd_example/app/modules/login/domain/errors/errors.dart';
3 | import 'package:ddd_example/app/modules/login/infra/models/reponse/authenticate_model.dart';
4 | import 'package:ddd_example/app/modules/login/infra/models/request/result_login_model.dart';
5 |
6 | abstract class IAuthenticateRepository {
7 | Future> authenticate(
8 | AuthenticateModel authenticate);
9 | }
10 |
--------------------------------------------------------------------------------
/lib/app/shared/components/circular_progress_indicator/circular_progress_indicator_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CircularProgressIndicatorWidget extends StatelessWidget {
4 | final Color color;
5 | CircularProgressIndicatorWidget({this.color});
6 |
7 | @override
8 | Widget build(BuildContext context) {
9 | return Container(
10 | child: Center(
11 | child: CircularProgressIndicator(
12 | valueColor: AlwaysStoppedAnimation(
13 | color != null ? color : Theme.of(context).primaryColor))),
14 | );
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/app/shared/components/password_text_form_field/password_text_form_field_controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_modular/flutter_modular.dart';
2 | import 'package:mobx/mobx.dart';
3 |
4 | part 'password_text_form_field_controller.g.dart';
5 |
6 | @Injectable(singleton: false)
7 | class PasswordTextFormFieldController = _PasswordTextFormFieldControllerBase
8 | with _$PasswordTextFormFieldController;
9 |
10 | abstract class _PasswordTextFormFieldControllerBase with Store {
11 | @observable
12 | bool visible = false;
13 |
14 | @action
15 | void switchVisible() => visible = !visible;
16 | }
17 |
--------------------------------------------------------------------------------
/lib/app/app_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:asuka/asuka.dart' as asuka;
3 | import 'package:flutter_modular/flutter_modular.dart';
4 |
5 | class AppWidget extends StatelessWidget {
6 | @override
7 | Widget build(BuildContext context) {
8 | return MaterialApp(
9 | navigatorKey: Modular.navigatorKey,
10 | title: 'Flutter Slidy',
11 | theme: ThemeData(
12 | primarySwatch: Colors.blue,
13 | ),
14 | builder: asuka.builder,
15 | initialRoute: '/',
16 | onGenerateRoute: Modular.generateRoute,
17 | );
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/app/modules/login/presenter/pages/login/states/login_state.dart:
--------------------------------------------------------------------------------
1 | import 'package:dartz/dartz.dart';
2 | import 'package:ddd_example/app/modules/login/domain/entities/response/result_login.dart';
3 | import 'package:ddd_example/app/shared/helpers/errors.dart';
4 |
5 | abstract class LoginState {}
6 |
7 | class LoginSuccess implements LoginState {
8 | final ResultLogin login;
9 |
10 | LoginSuccess(this.login);
11 | }
12 |
13 | class LoginError implements LoginState {
14 | final Option error;
15 |
16 | LoginError(this.error);
17 | }
18 |
19 | class LoginStart implements LoginState {}
20 |
21 | class LoginLoad implements LoginState {}
22 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/lib/app/shared/helpers/errors.dart:
--------------------------------------------------------------------------------
1 | abstract class Failure implements Exception {
2 | String get message;
3 | }
4 |
5 | class FirebaseFailure extends Failure {
6 | @override
7 | final String message;
8 | final String code;
9 | FirebaseFailure({
10 | this.message,
11 | this.code,
12 | });
13 | }
14 |
15 | class DefaultFailure extends Failure {
16 | @override
17 | final String message;
18 | DefaultFailure({
19 | this.message,
20 | });
21 | }
22 |
23 | class DioFailure extends Failure {
24 | @override
25 | final String message;
26 | final int statusCode;
27 | DioFailure({
28 | this.message,
29 | this.statusCode,
30 | });
31 | }
32 |
33 | class DatasourceError extends Failure {
34 | @override
35 | final String message;
36 | DatasourceError({
37 | this.message,
38 | });
39 | }
40 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Slidy History Files
2 | .slidy/
3 |
4 | # Miscellaneous
5 | *.class
6 | *.log
7 | *.pyc
8 | *.swp
9 | .DS_Store
10 | .atom/
11 | .buildlog/
12 | .history
13 | .svn/
14 |
15 | # IntelliJ related
16 | *.iml
17 | *.ipr
18 | *.iws
19 | .idea/
20 |
21 | # The .vscode folder contains launch configuration and tasks you configure in
22 | # VS Code which you may wish to be included in version control, so this line
23 | # is commented out by default.
24 | #.vscode/
25 |
26 | # Flutter/Dart/Pub related
27 | **/doc/api/
28 | **/ios/Flutter/.last_build_id
29 | .dart_tool/
30 | .flutter-plugins
31 | .flutter-plugins-dependencies
32 | .packages
33 | .pub-cache/
34 | .pub/
35 | /build/
36 |
37 | # Web related
38 | lib/generated_plugin_registrant.dart
39 |
40 | # Symbolication related
41 | app.*.symbols
42 |
43 | # Obfuscation related
44 | app.*.map.json
--------------------------------------------------------------------------------
/lib/app/modules/login/infra/models/reponse/authenticate_model.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import '../../../domain/entities/request/authenticate.dart';
4 |
5 | class AuthenticateModel extends Authenticate {
6 | final String login;
7 | final String senha;
8 |
9 | AuthenticateModel({this.login, this.senha});
10 |
11 | Map toMap() {
12 | return {
13 | 'login': login,
14 | 'senha': senha,
15 | };
16 | }
17 |
18 | factory AuthenticateModel.fromMap(Map map) {
19 | if (map == null) return null;
20 |
21 | return AuthenticateModel(
22 | login: map['login'],
23 | senha: map['senha'],
24 | );
25 | }
26 |
27 | String toJson() => json.encode(toMap());
28 |
29 | factory AuthenticateModel.fromJson(String source) =>
30 | AuthenticateModel.fromMap(json.decode(source));
31 | }
32 |
--------------------------------------------------------------------------------
/lib/app/shared/helpers/responses/authentication_response.dart:
--------------------------------------------------------------------------------
1 | const loginResponseSuccess = '''
2 | {
3 | "value":
4 | {
5 | "id_usuario": 15407,
6 | "nome_usuario": "MARCELO AMENDOLA",
7 | "login_usuario": "marceloamendola1",
8 | "email_usuario": "marcelo.oliveira@ao3tech.com",
9 | "cnpJ_CPF": "43217850000159",
10 | "status_login": 1,
11 | "id_contrato": 1398409,
12 | "qtde_ncms": 300
13 | },
14 | "success": true,
15 | "statusCode": 200,
16 | "message": null,
17 | "validation": null
18 | }
19 | ''';
20 | const loginResponseFailure = '''
21 | {
22 | "value": null,
23 | "success": false,
24 | "statusCode": 400,
25 | "message": "Usuário não encontrado.",
26 | "validation": null
27 | }
28 | ''';
29 |
30 | const recoveryPasswordRecovery = '''
31 | {"result": true}
32 | ''';
33 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
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 |
--------------------------------------------------------------------------------
/lib/app/shared/helpers/utils.dart:
--------------------------------------------------------------------------------
1 | import 'package:asuka/asuka.dart' as asuka;
2 | import 'package:dartz/dartz.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | import 'errors.dart';
6 |
7 | class Utils {
8 | static void showSnackBar({Option failure, String msg, Color bgColor}) {
9 | if (failure != null && failure != none()) {
10 | failure.map((a) {
11 | msg = a.message;
12 | });
13 | }
14 | if ((failure != null && failure != none()) || msg != null) {
15 | asuka.showSnackBar(SnackBar(
16 | content: Text(msg),
17 | backgroundColor: bgColor ?? Colors.red,
18 | ));
19 | }
20 | }
21 |
22 | static bool validateEmail(String value) {
23 | Pattern pattern =
24 | r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$';
25 | var regex = RegExp(pattern);
26 | var result = (!regex.hasMatch(value)) ? false : true;
27 | return result;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/lib/app/app_module.dart:
--------------------------------------------------------------------------------
1 | import 'package:ddd_example/app/shared/helpers/custom_dio/custom_dio.dart';
2 | import 'package:dio/dio.dart';
3 | import 'package:flutter_modular/flutter_modular.dart';
4 | import 'package:flutter/material.dart';
5 | import 'package:ddd_example/app/app_widget.dart';
6 | import 'shared/components/password_text_form_field/password_text_form_field_controller.dart';
7 | import 'shared/helpers/config.dart' as config;
8 |
9 | import 'modules/login/login_module.dart';
10 |
11 | class AppModule extends MainModule {
12 | @override
13 | List get binds => [
14 | $PasswordTextFormFieldController,
15 | Bind((i) => CustomDio(i())),
16 | Bind(
17 | (i) => BaseOptions(
18 | baseUrl: config.baseURL,
19 | connectTimeout: 5000,
20 | ),
21 | ),
22 | ];
23 |
24 | @override
25 | List get routers => [
26 | ModularRouter(Modular.initialRoute, module: LoginModule()),
27 | ];
28 |
29 | @override
30 | Widget get bootstrap => AppWidget();
31 |
32 | static Inject get to => Inject.of();
33 | }
34 |
--------------------------------------------------------------------------------
/lib/app/modules/login/infra/external/datasource/authenticate_datasource.dart:
--------------------------------------------------------------------------------
1 | import 'package:ddd_example/app/modules/login/domain/errors/errors.dart';
2 | import 'package:ddd_example/app/modules/login/infra/models/reponse/authenticate_model.dart';
3 | import 'package:ddd_example/app/modules/login/infra/models/request/result_login_model.dart';
4 | import 'package:ddd_example/app/shared/helpers/errors.dart';
5 | import 'package:dio/native_imp.dart';
6 |
7 | import '../../data/datasource/authenticate_datasource_interface.dart';
8 |
9 | class AuthenticateDatasource implements IAuthenticateDatasource {
10 | final DioForNative _client;
11 |
12 | AuthenticateDatasource(this._client);
13 | @override
14 | Future authenticate(AuthenticateModel auth) async {
15 | final response = await _client.post("/user/login", data: auth.toJson());
16 |
17 | if (response.statusCode == 200) {
18 | if (response.data["success"]) {
19 | final result = ResultLoginModel.fromMap(response.data['value']);
20 |
21 | return result;
22 | } else {
23 | throw DatasourceError(message: response.data['message']);
24 | }
25 | } else {
26 | throw DatasourceError(message: "Falha");
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/app/shared/components/loading_dialog/loading_dialog.dart:
--------------------------------------------------------------------------------
1 | import 'package:asuka/asuka.dart' as asuka;
2 | import 'package:flutter/material.dart';
3 | import 'package:flutter_modular/flutter_modular.dart';
4 |
5 | part 'loading_dialog.g.dart';
6 |
7 | abstract class ILoadingDialog {
8 | void show();
9 | Future hide();
10 | }
11 |
12 | @Injectable(singleton: false)
13 | class LoadingDialog implements ILoadingDialog {
14 | OverlayEntry entry;
15 |
16 | LoadingDialog() {
17 | entry = OverlayEntry(
18 | builder: (context) {
19 | return Container(
20 | color: Colors.black.withOpacity(.3),
21 | alignment: Alignment.center,
22 | child: CircularProgressIndicator(),
23 | );
24 | },
25 | );
26 | }
27 |
28 | @override
29 | Future hide() async {
30 | try {
31 | entry.remove();
32 | await Future.delayed(Duration(milliseconds: 500));
33 | } on Exception catch (e) {
34 | print(e.toString());
35 | }
36 | }
37 |
38 | @override
39 | void show() {
40 | try {
41 | FocusManager.instance.primaryFocus.unfocus();
42 | asuka.addOverlay(entry);
43 | } on Exception catch (e) {
44 | print(e.toString());
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/app/modules/login/domain/usecases/authenticate_by_login.dart:
--------------------------------------------------------------------------------
1 | import 'package:dartz/dartz.dart';
2 | import 'package:ddd_example/app/modules/login/domain/entities/request/authenticate.dart';
3 | import 'package:ddd_example/app/modules/login/domain/entities/response/result_login.dart';
4 | import 'package:ddd_example/app/modules/login/domain/errors/errors.dart';
5 | import 'package:ddd_example/app/modules/login/domain/repositories/authenticate_repository_interface.dart';
6 | import 'package:ddd_example/app/modules/login/infra/models/reponse/authenticate_model.dart';
7 |
8 | import 'interfaces/authenticate_by_login_interface.dart';
9 |
10 | class AuthenticateByLogin implements IAuthenticateByLogin {
11 | final IAuthenticateRepository _repository;
12 |
13 | AuthenticateByLogin(this._repository);
14 | @override
15 | Future> call(
16 | Authenticate authenticate) async {
17 | if (authenticate == null || !authenticate.isValid) {
18 | return Left(InvalidLoginError(
19 | message: 'Login ou senha esta com preenchimento inválido'));
20 | }
21 |
22 | var model = AuthenticateModel(
23 | login: authenticate.login,
24 | senha: authenticate.senha,
25 | );
26 | var result = await _repository.authenticate(model);
27 |
28 | return result;
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/app/modules/login/login_module.dart:
--------------------------------------------------------------------------------
1 | import 'package:dio/native_imp.dart';
2 |
3 | import 'domain/repositories/authenticate_repository_interface.dart';
4 | import 'domain/usecases/authenticate_by_login.dart';
5 | import 'domain/usecases/interfaces/authenticate_by_login_interface.dart';
6 | import 'infra/data/datasource/authenticate_datasource_interface.dart';
7 | import 'infra/data/repositories/authenticate_repository.dart';
8 | import 'infra/external/datasource/authenticate_datasource.dart';
9 | import 'presenter/pages/login/login_controller.dart';
10 | import 'package:flutter_modular/flutter_modular.dart';
11 |
12 | import 'presenter/pages/login/login_page.dart';
13 |
14 | class LoginModule extends ChildModule {
15 | @override
16 | List get binds => [
17 | Bind((i) => LoginController(i())),
18 | Bind((i) => AuthenticateDatasource(i())),
19 | Bind(
20 | (i) => AuthenticateRepository(i())),
21 | Bind((i) => AuthenticateByLogin(i())),
22 | ];
23 |
24 | @override
25 | List get routers => [
26 | ModularRouter(Modular.initialRoute, child: (_, args) => LoginPage()),
27 | ];
28 |
29 | static Inject get to => Inject.of();
30 | }
31 |
--------------------------------------------------------------------------------
/test/app/modules/login/presenter/pages/login_controller_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:dartz/dartz.dart';
2 | import 'package:ddd_example/app/modules/login/domain/entities/request/authenticate.dart';
3 | import 'package:ddd_example/app/modules/login/domain/entities/response/result_login.dart';
4 | import 'package:ddd_example/app/modules/login/domain/usecases/interfaces/mock/authenticate_by_login_interface.dart';
5 | import 'package:ddd_example/app/modules/login/presenter/pages/login/login_controller.dart';
6 | import 'package:ddd_example/app/modules/login/presenter/pages/login/states/login_state.dart';
7 | import 'package:flutter_test/flutter_test.dart';
8 |
9 | import 'package:mockito/mockito.dart';
10 |
11 | void main() {
12 | LoginController controller;
13 | final authenticateByLoginMock = AuthenticateByLoginMock();
14 | setUp(() {
15 | controller = LoginController(authenticateByLoginMock);
16 | });
17 |
18 | group('Teste de integração de todo da controller do login', () {
19 | test("Deve trazer usuario autenticado", () async {
20 | when(authenticateByLoginMock(any))
21 | .thenAnswer((_) async => Right(ResultLogin()));
22 | var login = Authenticate(login: 'toshiossada', senha: '123456');
23 | controller.setLogin(login.login);
24 | controller.setPassword(login.senha);
25 |
26 | await controller.authenticate();
27 | expect(controller.loginState, isA());
28 | });
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/lib/app/shared/models/authentication_model.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | class AuthenticationModel {
4 | final int idUsuario;
5 | final String nomeUsuario;
6 | final String loginUsuario;
7 | final String emailUsuario;
8 | final String cnpjCpf;
9 | final int statusLogin;
10 | final int idContrato;
11 | final int qtdeNcms;
12 |
13 | AuthenticationModel({
14 | this.idUsuario,
15 | this.nomeUsuario,
16 | this.loginUsuario,
17 | this.emailUsuario,
18 | this.cnpjCpf,
19 | this.statusLogin,
20 | this.idContrato,
21 | this.qtdeNcms,
22 | });
23 |
24 | Map toMap() {
25 | return {
26 | 'idUsuario': idUsuario,
27 | 'nomeUsuario': nomeUsuario,
28 | 'loginUsuario': loginUsuario,
29 | 'emailUsuario': emailUsuario,
30 | 'cnpjCpf': cnpjCpf,
31 | 'statusLogin': statusLogin,
32 | 'idContrato': idContrato,
33 | 'qtdeNcms': qtdeNcms,
34 | };
35 | }
36 |
37 | factory AuthenticationModel.fromMap(Map map) {
38 | if (map == null) return null;
39 |
40 | return AuthenticationModel(
41 | idUsuario: map['idUsuario'],
42 | nomeUsuario: map['nomeUsuario'],
43 | loginUsuario: map['loginUsuario'],
44 | emailUsuario: map['emailUsuario'],
45 | cnpjCpf: map['cnpjCpf'],
46 | statusLogin: map['statusLogin'],
47 | idContrato: map['idContrato'],
48 | qtdeNcms: map['qtdeNcms'],
49 | );
50 | }
51 |
52 | String toJson() => json.encode(toMap());
53 |
54 | factory AuthenticationModel.fromJson(String source) =>
55 | AuthenticationModel.fromMap(json.decode(source));
56 | }
57 |
--------------------------------------------------------------------------------
/test/app/modules/login/data/infra/repositories/authenticate_repository_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:dartz/dartz.dart';
2 | import 'package:ddd_example/app/modules/login/domain/errors/errors.dart';
3 | import 'package:ddd_example/app/modules/login/infra/data/datasource/mock/authenticate_datasource_mock.dart';
4 | import 'package:ddd_example/app/modules/login/infra/data/repositories/authenticate_repository.dart';
5 | import 'package:ddd_example/app/modules/login/infra/models/reponse/authenticate_model.dart';
6 | import 'package:ddd_example/app/modules/login/infra/models/request/result_login_model.dart';
7 | import 'package:flutter_test/flutter_test.dart';
8 |
9 | import 'package:mockito/mockito.dart';
10 |
11 | void main() {
12 | AuthenticateRepository repository;
13 | final datasource = AuthenticateDatasourceMock();
14 |
15 | setUp(() {
16 | repository = AuthenticateRepository(datasource);
17 | });
18 |
19 | group('teste de autenticação do usuario', () {
20 | test('Deve retornar usuario autenticado', () async {
21 | var login = AuthenticateModel();
22 |
23 | when(datasource.authenticate(any))
24 | .thenAnswer((_) async => ResultLoginModel());
25 |
26 | final result = await repository.authenticate(login);
27 |
28 | expect(result | null, isA());
29 | });
30 |
31 | test('Deve um erro se datasource falhar', () async {
32 | var login = AuthenticateModel();
33 |
34 | when(datasource.authenticate(any)).thenThrow(Exception());
35 |
36 | final result = await repository.authenticate(login);
37 |
38 | expect(result.fold(id, id), isA());
39 | });
40 | });
41 | }
42 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | ddd_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/lib/app/modules/login/infra/data/repositories/authenticate_repository.dart:
--------------------------------------------------------------------------------
1 | import 'package:dartz/dartz.dart';
2 | import 'package:ddd_example/app/modules/login/infra/models/reponse/authenticate_model.dart';
3 | import 'package:ddd_example/app/modules/login/infra/models/request/result_login_model.dart';
4 | import 'package:ddd_example/app/shared/helpers/errors.dart';
5 | import 'package:dio/dio.dart';
6 | import 'package:flutter_modular/flutter_modular.dart';
7 | import 'package:flutter_modular/flutter_modular_annotations.dart';
8 |
9 | import '../../../domain/errors/errors.dart';
10 | import '../../../domain/repositories/authenticate_repository_interface.dart';
11 | import '../datasource/authenticate_datasource_interface.dart';
12 |
13 | part 'authenticate_repository.g.dart';
14 |
15 | @Injectable()
16 | class AuthenticateRepository implements IAuthenticateRepository {
17 | final IAuthenticateDatasource _authenticateDatasource;
18 |
19 | AuthenticateRepository(this._authenticateDatasource);
20 |
21 | @override
22 | Future> authenticate(
23 | AuthenticateModel authenticate) async {
24 | try {
25 | final result = await _authenticateDatasource.authenticate(authenticate);
26 |
27 | return Right(result);
28 | } on Failure catch (err) {
29 | return Left(err);
30 | } on DioError catch (e) {
31 | if (e.error is DioFailure)
32 | return Left(
33 | InvalidLoginError(message: (e.error as DioFailure).message));
34 | else
35 | return Left(
36 | InvalidLoginError(message: 'Falha ao faer requisição ao servidor'));
37 | } on Exception catch (e) {
38 | return Left(InvalidLoginError(message: e.toString()));
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/lib/app/shared/components/password_text_form_field/password_text_form_field_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_mobx/flutter_mobx.dart';
3 | import 'package:flutter_modular/flutter_modular.dart';
4 | import 'package:font_awesome_flutter/font_awesome_flutter.dart';
5 |
6 | import '../rounded_text_field/rounded_text_field_widget.dart';
7 | import 'password_text_form_field_controller.dart';
8 |
9 | // ignore: must_be_immutable
10 | class PasswordTextFormFieldWidget extends StatefulWidget {
11 | final Function(String) onChanged;
12 | final String label;
13 | final Function validator;
14 |
15 | PasswordTextFormFieldWidget({
16 | Key key,
17 | this.onChanged,
18 | this.label,
19 | this.validator,
20 | }) : super(key: key);
21 |
22 | @override
23 | _PasswordTextFormFieldWidgetState createState() =>
24 | _PasswordTextFormFieldWidgetState();
25 | }
26 |
27 | class _PasswordTextFormFieldWidgetState extends ModularState<
28 | PasswordTextFormFieldWidget, PasswordTextFormFieldController> {
29 | @override
30 | Widget build(BuildContext context) {
31 | return Observer(
32 | builder: (_) {
33 | return RoundedTextFieldWidget(
34 | labelText: widget.label,
35 | fontColor: Colors.black.withOpacity(0.8),
36 | backgroundColor: Colors.transparent,
37 | obscureText: !controller.visible,
38 | onChanged: widget.onChanged,
39 | validator: widget.validator,
40 | suffixIcon: IconButton(
41 | onPressed: controller.switchVisible,
42 | icon: Icon(
43 | controller.visible
44 | ? FontAwesomeIcons.eyeSlash
45 | : FontAwesomeIcons.eye,
46 | color: Colors.black,
47 | ),
48 | ),
49 | );
50 | },
51 | );
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/lib/app/modules/login/infra/models/request/result_login_model.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import '../../../domain/entities/response/result_login.dart';
4 |
5 | class ResultLoginModel extends ResultLogin {
6 | final int idUsuario;
7 | final String nomeUsuario;
8 | final String loginUsuario;
9 | final String emailUsuario;
10 | final String cnpjCpf;
11 | final int statusLogin;
12 | final int idContrato;
13 | final int qtdeNcms;
14 |
15 | ResultLoginModel({
16 | this.idUsuario,
17 | this.nomeUsuario,
18 | this.loginUsuario,
19 | this.emailUsuario,
20 | this.cnpjCpf,
21 | this.statusLogin,
22 | this.idContrato,
23 | this.qtdeNcms,
24 | }) : super(
25 | idUsuario: idUsuario,
26 | nomeUsuario: nomeUsuario,
27 | loginUsuario: loginUsuario,
28 | emailUsuario: emailUsuario,
29 | );
30 |
31 | Map toMap() {
32 | return {
33 | 'id_usuario': idUsuario,
34 | 'nome_usuario': nomeUsuario,
35 | 'login_usuario': loginUsuario,
36 | 'email_usuario': emailUsuario,
37 | 'cnpJ_CPF': cnpjCpf,
38 | 'status_login': statusLogin,
39 | 'id_contrato': idContrato,
40 | 'qtde_ncms': qtdeNcms,
41 | };
42 | }
43 |
44 | factory ResultLoginModel.fromMap(Map map) {
45 | if (map == null) return null;
46 |
47 | return ResultLoginModel(
48 | idUsuario: map['id_usuario'],
49 | nomeUsuario: map['nome_usuario'],
50 | loginUsuario: map['login_usuario'],
51 | emailUsuario: map['email_usuario'],
52 | cnpjCpf: map['cnpJ_CPF'],
53 | statusLogin: map['status_login'],
54 | idContrato: map['id_contrato'],
55 | qtdeNcms: map['qtde_ncms'],
56 | );
57 | }
58 |
59 | String toJson() => json.encode(toMap());
60 |
61 | factory ResultLoginModel.fromJson(String source) =>
62 | ResultLoginModel.fromMap(json.decode(source));
63 | }
64 |
--------------------------------------------------------------------------------
/lib/app/shared/helpers/custom_dio/interceptors/custom_interceptor.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:dio/dio.dart';
4 | import 'package:flutter/foundation.dart';
5 |
6 | //import '../../../stores/user_store.dart';
7 | import '../../errors.dart';
8 |
9 | class CustomInterceptors extends InterceptorsWrapper {
10 | @override
11 | Future onRequest(RequestOptions options) async {
12 | // var userService = Modular.get();
13 | var token = '';
14 | //userService.user?.token ?? '';
15 | if (token.isNotEmpty) {
16 | var headerAuth = _genToken(token);
17 | options.headers['Authorization'] = headerAuth;
18 | }
19 | //Imprimindo informações do request para debug
20 | if (kDebugMode) {
21 | debugPrint(json.encode("BaseURL: ${options.baseUrl}"));
22 | debugPrint(json.encode("Endpoint: ${options.path}"));
23 | if (options.headers['Authorization'] != null) {
24 | debugPrint("Authorization: ${options.headers['Authorization']}");
25 | }
26 | if (options.data != null) {
27 | debugPrint("Payload ${json.encode(options.data)}");
28 | }
29 | }
30 |
31 | return super.onRequest(options);
32 | }
33 |
34 | @override
35 | Future onResponse(Response response) {
36 | return super.onResponse(response);
37 | }
38 |
39 | @override
40 | Future onError(DioError err) async {
41 | if (err.response?.statusCode == 400) {
42 | var msg = err.response.data["notifications"] == null
43 | ? err.error
44 | : err.response.data["notifications"][0]["message"];
45 |
46 | return DioFailure(message: msg, statusCode: err.response.statusCode);
47 | }
48 | return DioFailure(
49 | message:
50 | err.response.data ?? 'Ocorreu um erro na requisição com o servidor',
51 | statusCode: err.response?.statusCode ?? 500);
52 | }
53 |
54 | String _genToken(String token) {
55 | return 'Bearer $token';
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/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 29
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.example.ddd_example"
42 | minSdkVersion 16
43 | targetSdkVersion 29
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | }
47 |
48 | buildTypes {
49 | release {
50 | // TODO: Add your own signing config for the release build.
51 | // Signing with the debug keys for now, so `flutter run --release` works.
52 | signingConfig signingConfigs.debug
53 | }
54 | }
55 | }
56 |
57 | flutter {
58 | source '../..'
59 | }
60 |
61 | dependencies {
62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
63 | }
64 |
--------------------------------------------------------------------------------
/lib/app/shared/components/password_text_form_field/password_text_form_field_controller.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'password_text_form_field_controller.dart';
4 |
5 | // **************************************************************************
6 | // InjectionGenerator
7 | // **************************************************************************
8 |
9 | final $PasswordTextFormFieldController = BindInject(
10 | (i) => PasswordTextFormFieldController(),
11 | singleton: false,
12 | lazy: true,
13 | );
14 |
15 | // **************************************************************************
16 | // StoreGenerator
17 | // **************************************************************************
18 |
19 | // ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic
20 |
21 | mixin _$PasswordTextFormFieldController
22 | on _PasswordTextFormFieldControllerBase, Store {
23 | final _$visibleAtom =
24 | Atom(name: '_PasswordTextFormFieldControllerBase.visible');
25 |
26 | @override
27 | bool get visible {
28 | _$visibleAtom.reportRead();
29 | return super.visible;
30 | }
31 |
32 | @override
33 | set visible(bool value) {
34 | _$visibleAtom.reportWrite(value, super.visible, () {
35 | super.visible = value;
36 | });
37 | }
38 |
39 | final _$_PasswordTextFormFieldControllerBaseActionController =
40 | ActionController(name: '_PasswordTextFormFieldControllerBase');
41 |
42 | @override
43 | void switchVisible() {
44 | final _$actionInfo =
45 | _$_PasswordTextFormFieldControllerBaseActionController.startAction(
46 | name: '_PasswordTextFormFieldControllerBase.switchVisible');
47 | try {
48 | return super.switchVisible();
49 | } finally {
50 | _$_PasswordTextFormFieldControllerBaseActionController
51 | .endAction(_$actionInfo);
52 | }
53 | }
54 |
55 | @override
56 | String toString() {
57 | return '''
58 | visible: ${visible}
59 | ''';
60 | }
61 | }
62 |
--------------------------------------------------------------------------------
/lib/app/shared/components/circular_button_widget/circular_button_widget_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CircularButtonWidget extends StatelessWidget {
4 | final String label;
5 | final Color backgroundColor;
6 | final Color textColor;
7 | final Color bordeColor;
8 | final double height;
9 | final double width;
10 | final Widget icon;
11 | final Function onTap;
12 |
13 | const CircularButtonWidget(
14 | {Key key,
15 | this.label = "",
16 | this.backgroundColor,
17 | this.textColor = Colors.white,
18 | this.bordeColor,
19 | this.height = 55,
20 | this.width,
21 | this.icon,
22 | this.onTap})
23 | : super(key: key);
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return ClipRRect(
28 | borderRadius: BorderRadius.circular(10),
29 | child: Material(
30 | color: backgroundColor == null
31 | ? Theme.of(context).accentColor
32 | : backgroundColor,
33 | child: InkWell(
34 | onTap: onTap,
35 | child: Container(
36 | height: height,
37 | width: width,
38 | decoration: BoxDecoration(
39 | borderRadius: BorderRadius.circular(10),
40 | border:
41 | bordeColor == null ? null : Border.all(color: bordeColor)),
42 | alignment: Alignment.center,
43 | child: Padding(
44 | padding: const EdgeInsets.all(10),
45 | child: Row(
46 | mainAxisAlignment: MainAxisAlignment.center,
47 | children: [
48 | icon == null ? Container() : icon,
49 | Text(
50 | label,
51 | style: TextStyle(
52 | color: textColor,
53 | fontWeight: FontWeight.bold,
54 | fontSize: 18,
55 | ),
56 | textAlign: TextAlign.center,
57 | ),
58 | ],
59 | ),
60 | ),
61 | ),
62 | ),
63 | ),
64 | );
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/lib/app/modules/login/presenter/pages/login/login_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_mobx/flutter_mobx.dart';
3 | import 'package:flutter_modular/flutter_modular.dart';
4 |
5 | import 'components/login_form/login_form_widget.dart';
6 | import 'login_controller.dart';
7 | import 'states/login_state.dart';
8 |
9 | class LoginPage extends StatefulWidget {
10 | final String title;
11 | const LoginPage({Key key, this.title = "Login"}) : super(key: key);
12 |
13 | @override
14 | _LoginPageState createState() => _LoginPageState();
15 | }
16 |
17 | class _LoginPageState extends ModularState {
18 | @override
19 | Widget build(BuildContext context) {
20 | return Scaffold(
21 | body: SingleChildScrollView(
22 | child: Container(
23 | height: MediaQuery.of(context).size.height,
24 | child: Stack(
25 | children: [
26 | Container(
27 | width: double.infinity,
28 | child: Padding(
29 | padding: const EdgeInsets.symmetric(
30 | horizontal: 30,
31 | ),
32 | child: Column(
33 | children: [
34 | Padding(
35 | padding: const EdgeInsets.symmetric(vertical: 80),
36 | ),
37 | Observer(
38 | builder: (_) => Form(
39 | key: controller.formKey,
40 | child: LoginFormWidget(
41 | rememberme: controller.rememberMe,
42 | switchRememberMe: controller.switchRememberMe,
43 | onChangeLogin: controller.setLogin,
44 | onChangePassword: controller.setPassword,
45 | loading: controller.loginState is LoginLoad,
46 | loginPressed: controller.loginPressed,
47 | ),
48 | ),
49 | ),
50 | ],
51 | ),
52 | ),
53 | ),
54 | ],
55 | ),
56 | ),
57 | ),
58 | );
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/lib/app/modules/login/presenter/pages/login/login_controller.dart:
--------------------------------------------------------------------------------
1 | import 'package:dartz/dartz.dart';
2 | import 'package:ddd_example/app/modules/login/domain/entities/response/result_login.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_modular/flutter_modular.dart';
5 | import 'package:mobx/mobx.dart';
6 |
7 | import '../../../../../shared/helpers/utils.dart';
8 | import '../../../domain/entities/request/authenticate.dart';
9 | import '../../../domain/usecases/interfaces/authenticate_by_login_interface.dart';
10 | import 'states/login_state.dart';
11 |
12 | part 'login_controller.g.dart';
13 |
14 | class LoginController = _LoginControllerBase with _$LoginController;
15 |
16 | abstract class _LoginControllerBase with Store {
17 | final IAuthenticateByLogin _authenticateByLogin;
18 | final formKey = GlobalKey();
19 |
20 | _LoginControllerBase(this._authenticateByLogin);
21 |
22 | Future loginPressed() async {
23 | if (formKey.currentState.validate()) {
24 | formKey.currentState.save();
25 | await authenticate();
26 |
27 | if (loginState is LoginError) {
28 | LoginError stateError = loginState;
29 |
30 | Utils.showSnackBar(failure: stateError.error);
31 | } else if (loginState is LoginSuccess) {
32 | Utils.showSnackBar(
33 | msg: "Login Realizado com sucesso", bgColor: Colors.blueAccent);
34 | }
35 | }
36 | }
37 |
38 | @observable
39 | String login = '';
40 | @observable
41 | String password = '';
42 | @observable
43 | LoginState loginState = LoginStart();
44 | @observable
45 | bool rememberMe = false;
46 |
47 | @computed
48 | Authenticate get auth =>
49 | Authenticate(login: login, senha: password, rememberMe: rememberMe);
50 |
51 | @action
52 | void setLogin(String v) => login = v;
53 | @action
54 | void setPassword(String v) => password = v;
55 | @action
56 | void switchRememberMe() => rememberMe = !rememberMe;
57 |
58 | @action
59 | Future authenticate() async {
60 | loginState = LoginLoad();
61 | await Future.delayed(Duration(seconds: 1));
62 |
63 | var result = await _authenticateByLogin(auth);
64 |
65 | result.fold((l) => loginState = LoginError(optionOf(l)),
66 | (r) => loginState = LoginSuccess(r));
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/test/app/modules/login/data/external/datasource/authenticate_datasource_test.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:ddd_example/app/modules/login/infra/external/datasource/authenticate_datasource.dart';
4 | import 'package:ddd_example/app/modules/login/infra/models/reponse/authenticate_model.dart';
5 | import 'package:ddd_example/app/shared/helpers/errors.dart';
6 | import 'package:ddd_example/app/shared/helpers/responses/authentication_response.dart'
7 | as mock_response;
8 | import 'package:ddd_example/app/shared/helpers/custom_dio/mock/custom_dio_mock.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 | import 'package:mockito/mockito.dart';
11 | import 'package:dio/dio.dart';
12 |
13 | void main() {
14 | AuthenticateDatasource datasource;
15 | final client = CustomDioMock();
16 |
17 | setUp(() {
18 | datasource = AuthenticateDatasource(client);
19 | });
20 |
21 | group('Testes do DataSource para login', () {
22 | test('Deve retornar usuario autenticado', () async {
23 | var login = AuthenticateModel();
24 |
25 | when(client.post(any, data: login.toJson())).thenAnswer((_) async =>
26 | Response(
27 | data: jsonDecode(mock_response.loginResponseSuccess),
28 | statusCode: 200));
29 | final result = datasource.authenticate(login);
30 |
31 | expect(result, completes);
32 | });
33 |
34 | test(
35 | 'Deve retornar um DataSourceError quando api retorna que não obteve sucesso',
36 | () async {
37 | var login = AuthenticateModel();
38 |
39 | when(client.post(any, data: login.toJson())).thenAnswer((_) async =>
40 | Response(
41 | data: jsonDecode(mock_response.loginResponseFailure),
42 | statusCode: 200));
43 | final result = datasource.authenticate(login);
44 |
45 | expect(result, throwsA(isA()));
46 | });
47 |
48 | test('Deve retornar um DataSourceError se o código não for 200', () async {
49 | var login = AuthenticateModel();
50 |
51 | when(client.post(any, data: login.toJson()))
52 | .thenAnswer((_) async => Response(data: null, statusCode: 404));
53 | final result = datasource.authenticate(login);
54 |
55 | expect(result, throwsA(isA()));
56 | });
57 | });
58 | }
59 |
--------------------------------------------------------------------------------
/lib/app/shared/components/rounded_text_field/rounded_text_field_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | // ignore: must_be_immutable
4 | class RoundedTextFieldWidget extends StatelessWidget {
5 | final Function onSaved;
6 | final Function validator;
7 | final Function onTap;
8 | final Function(String) onChanged;
9 | final String labelText;
10 | final String initialValue;
11 | final TextEditingController controller;
12 | final bool readOnly;
13 | final bool obscureText;
14 | final int maxLines;
15 | final Color backgroundColor;
16 | final Color fontColor;
17 | final Widget suffixIcon;
18 | final bool showBorder;
19 | final Color labelStyleColor;
20 |
21 | RoundedTextFieldWidget({
22 | this.onSaved,
23 | this.validator,
24 | this.labelText,
25 | this.onChanged,
26 | this.controller,
27 | this.onTap,
28 | this.suffixIcon,
29 | this.showBorder = true,
30 | this.obscureText = false,
31 | this.readOnly = false,
32 | this.maxLines = 1,
33 | this.backgroundColor = Colors.transparent,
34 | this.labelStyleColor,
35 | @required this.fontColor,
36 | this.initialValue,
37 | });
38 |
39 | @override
40 | Widget build(BuildContext context) {
41 | return Container(
42 | decoration: BoxDecoration(
43 | color: backgroundColor,
44 | borderRadius: BorderRadius.all(Radius.circular(10))),
45 | child: TextFormField(
46 | readOnly: readOnly,
47 | controller: controller,
48 | obscureText: obscureText,
49 | keyboardType: TextInputType.text,
50 | maxLines: maxLines,
51 | style: TextStyle(color: fontColor),
52 | decoration: InputDecoration(
53 | contentPadding: const EdgeInsets.all(10.0),
54 | border: showBorder ? null : InputBorder.none,
55 | suffixIcon: suffixIcon,
56 | fillColor: Colors.greenAccent,
57 | labelText: labelText,
58 | labelStyle: TextStyle(
59 | color: labelStyleColor == null ? Colors.black : labelStyleColor,
60 | fontWeight: FontWeight.w400,
61 | fontSize: 16,
62 | ),
63 | ),
64 | validator: validator,
65 | onTap: onTap,
66 | onSaved: onSaved,
67 | onChanged: onChanged,
68 | ),
69 | );
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/test/app/modules/login/domain/usecases/authenticate_by_login_test.dart:
--------------------------------------------------------------------------------
1 | import 'package:dartz/dartz.dart';
2 | import 'package:ddd_example/app/modules/login/domain/entities/request/authenticate.dart';
3 | import 'package:ddd_example/app/modules/login/domain/errors/errors.dart';
4 | import 'package:ddd_example/app/modules/login/domain/repositories/mocks/authenticate_repository_mock.dart';
5 | import 'package:ddd_example/app/modules/login/domain/usecases/authenticate_by_login.dart';
6 | import 'package:ddd_example/app/modules/login/infra/models/request/result_login_model.dart';
7 | import 'package:flutter_test/flutter_test.dart';
8 | import 'package:mockito/mockito.dart';
9 |
10 | void main() {
11 | final repository = AuthenticateRepositoryMock();
12 |
13 | AuthenticateByLogin usercase;
14 |
15 | setUp(() {
16 | usercase = AuthenticateByLogin(repository);
17 | });
18 |
19 | group('Testes do caso de uso de autenticação', () {
20 | test('Deve retornar usuario autenticado', () async {
21 | when(repository.authenticate(any))
22 | .thenAnswer((_) async => Right(ResultLoginModel()));
23 |
24 | var login =
25 | Authenticate(login: 'toshiossada', senha: '123456', rememberMe: true);
26 | final result = await usercase(login);
27 |
28 | expect(result, isA());
29 | expect(result | null, isA());
30 | verify(repository.authenticate(any)).called(1);
31 | });
32 |
33 | test('Deve retornar um erro caso o login seja vazio', () async {
34 | when(repository.authenticate(any))
35 | .thenAnswer((_) async => Right(ResultLoginModel()));
36 |
37 | var result = await usercase(null);
38 |
39 | expect(result.isLeft(), true);
40 | expect(result.fold(id, id), isA());
41 |
42 | var login = Authenticate(login: '', senha: '123', rememberMe: false);
43 | result = await usercase(login);
44 |
45 | expect(result.isLeft(), true);
46 | expect(result.fold(id, id), isA());
47 | verifyNever(repository.authenticate(any));
48 |
49 | login = Authenticate(login: 'toshiossada', senha: '', rememberMe: false);
50 | result = await usercase(login);
51 |
52 | expect(result.isLeft(), true);
53 | expect(result.fold(id, id), isA());
54 | verifyNever(repository.authenticate(any));
55 | });
56 | });
57 | }
58 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
23 |
27 |
32 |
36 |
37 |
38 |
39 |
40 |
41 |
43 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/lib/app/modules/login/presenter/pages/login/components/login_form/login_form_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | import '../../../../../../../shared/components/circular_button_widget/circular_button_widget_widget.dart';
4 | import '../../../../../../../shared/components/circular_progress_indicator/circular_progress_indicator_widget.dart';
5 | import '../../../../../../../shared/components/password_text_form_field/password_text_form_field_widget.dart';
6 | import '../../../../../../../shared/components/rounded_text_field/rounded_text_field_widget.dart';
7 |
8 | class LoginFormWidget extends StatelessWidget {
9 | final Function(String) onChangeLogin;
10 | final Function(String) onChangePassword;
11 | final Function loginPressed;
12 | final Function authenticate;
13 | final Function switchRememberMe;
14 | final bool loading;
15 | final bool rememberme;
16 |
17 | const LoginFormWidget(
18 | {Key key,
19 | this.onChangeLogin,
20 | this.onChangePassword,
21 | this.loginPressed,
22 | this.authenticate,
23 | this.loading,
24 | this.switchRememberMe,
25 | this.rememberme})
26 | : super(key: key);
27 |
28 | @override
29 | Widget build(BuildContext context) {
30 | return SingleChildScrollView(
31 | child: Column(
32 | crossAxisAlignment: CrossAxisAlignment.start,
33 | mainAxisAlignment: MainAxisAlignment.center,
34 | children: [
35 | Text(
36 | 'Login',
37 | style: Theme.of(context).textTheme.headline6,
38 | ),
39 | RoundedTextFieldWidget(
40 | labelText: 'Usuário',
41 | fontColor: Colors.black.withOpacity(0.8),
42 | backgroundColor: Colors.transparent,
43 | onChanged: onChangeLogin,
44 | validator: (value) {
45 | if (value.isEmpty)
46 | return 'Usuário Inválido';
47 | else
48 | return null;
49 | },
50 | ),
51 | PasswordTextFormFieldWidget(
52 | onChanged: onChangePassword,
53 | validator: (value) {
54 | if (value.isEmpty)
55 | return 'Senha Inválido';
56 | else
57 | return null;
58 | },
59 | label: 'Senha',
60 | ),
61 | SizedBox(height: 30),
62 | Container(
63 | child: loading
64 | ? CircularProgressIndicatorWidget(
65 | color: Colors.black,
66 | )
67 | : Row(
68 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
69 | children: [
70 | CircularButtonWidget(
71 | backgroundColor: Colors.black,
72 | label: "ENTRAR",
73 | onTap: loginPressed,
74 | ),
75 | ],
76 | ),
77 | ),
78 | ],
79 | ),
80 | );
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/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.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: ddd_example
2 | description: A new Flutter project. Created by Slidy
3 |
4 | # The following line prevents the package from being accidentally published to
5 | # pub.dev using `pub publish`. This is preferred for private packages.
6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev
7 |
8 | # The following defines the version and build number for your application.
9 | # A version number is three numbers separated by dots, like 1.2.43
10 | # followed by an optional build number separated by a +.
11 | # Both the version and the builder number may be overridden in flutter
12 | # build by specifying --build-name and --build-number, respectively.
13 | # In Android, build-name is used as versionName while build-number used as versionCode.
14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
16 | # Read more about iOS versioning at
17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
18 | version: 1.0.0+1
19 |
20 | ## Slidy Scripts
21 | vars:
22 | clean: flutter clean
23 | get: flutter pub get
24 | runner: flutter pub run build_runner
25 | scripts:
26 | mobx_build: $runner build
27 | mobx_watch: $clean & $get & $runner watch
28 | mobx_build_clean: $clean & $get & $runner build --delete-conflicting-outputs
29 |
30 |
31 |
32 | environment:
33 | sdk: ">=2.7.0 <3.0.0"
34 |
35 | dependencies:
36 | font_awesome_flutter: ^8.10.0
37 | asuka: ^1.0.4
38 | dartz: ^0.9.2
39 | dio: ^3.0.10
40 | flutter_mobx: ^1.1.0+2
41 | mobx: ^1.2.1+4
42 | flutter_modular: ^2.0.1
43 | flutter:
44 | sdk: flutter
45 |
46 |
47 | # The following adds the Cupertino Icons font to your application.
48 | # Use with the CupertinoIcons class for iOS style icons.
49 |
50 | dev_dependencies:
51 | mockito: ^4.1.3
52 | modular_codegen: ^2.0.1
53 | mobx_codegen: ^1.1.2
54 | build_runner: ^1.10.1
55 | flutter_test:
56 | sdk: flutter
57 |
58 | # For information on the generic Dart part of this file, see the
59 | # following page: https://dart.dev/tools/pub/pubspec
60 |
61 | # The following section is specific to Flutter.
62 | flutter:
63 |
64 | # The following line ensures that the Material Icons font is
65 | # included with your application, so that you can use the icons in
66 | # the material Icons class.
67 | uses-material-design: true
68 |
69 | # To add assets to your application, add an assets section, like this:
70 | # assets:
71 | # - images/a_dot_burr.jpeg
72 | # - images/a_dot_ham.jpeg
73 |
74 | # An image asset can refer to one or more resolution-specific "variants", see
75 | # https://flutter.dev/assets-and-images/#resolution-aware.
76 |
77 | # For details regarding adding assets from package dependencies, see
78 | # https://flutter.dev/assets-and-images/#from-packages
79 |
80 | # To add custom fonts to your application, add a fonts section here,
81 | # in this "flutter" section. Each entry in this list should have a
82 | # "family" key with the font family name, and a "fonts" key with a
83 | # list giving the asset and other descriptors for the font. For
84 | # example:
85 | # fonts:
86 | # - family: Schyler
87 | # fonts:
88 | # - asset: fonts/Schyler-Regular.ttf
89 | # - asset: fonts/Schyler-Italic.ttf
90 | # style: italic
91 | # - family: Trajan Pro
92 | # fonts:
93 | # - asset: fonts/TrajanPro.ttf
94 | # - asset: fonts/TrajanPro_Bold.ttf
95 | # weight: 700
96 | #
97 | # For details regarding fonts from package dependencies,
98 | # see https://flutter.dev/custom-fonts/#from-packages
99 |
--------------------------------------------------------------------------------
/lib/app/modules/login/presenter/pages/login/login_controller.g.dart:
--------------------------------------------------------------------------------
1 | // GENERATED CODE - DO NOT MODIFY BY HAND
2 |
3 | part of 'login_controller.dart';
4 |
5 | // **************************************************************************
6 | // StoreGenerator
7 | // **************************************************************************
8 |
9 | // ignore_for_file: non_constant_identifier_names, unnecessary_brace_in_string_interps, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic
10 |
11 | mixin _$LoginController on _LoginControllerBase, Store {
12 | Computed _$authComputed;
13 |
14 | @override
15 | Authenticate get auth =>
16 | (_$authComputed ??= Computed(() => super.auth,
17 | name: '_LoginControllerBase.auth'))
18 | .value;
19 |
20 | final _$loginAtom = Atom(name: '_LoginControllerBase.login');
21 |
22 | @override
23 | String get login {
24 | _$loginAtom.reportRead();
25 | return super.login;
26 | }
27 |
28 | @override
29 | set login(String value) {
30 | _$loginAtom.reportWrite(value, super.login, () {
31 | super.login = value;
32 | });
33 | }
34 |
35 | final _$passwordAtom = Atom(name: '_LoginControllerBase.password');
36 |
37 | @override
38 | String get password {
39 | _$passwordAtom.reportRead();
40 | return super.password;
41 | }
42 |
43 | @override
44 | set password(String value) {
45 | _$passwordAtom.reportWrite(value, super.password, () {
46 | super.password = value;
47 | });
48 | }
49 |
50 | final _$loginStateAtom = Atom(name: '_LoginControllerBase.loginState');
51 |
52 | @override
53 | LoginState get loginState {
54 | _$loginStateAtom.reportRead();
55 | return super.loginState;
56 | }
57 |
58 | @override
59 | set loginState(LoginState value) {
60 | _$loginStateAtom.reportWrite(value, super.loginState, () {
61 | super.loginState = value;
62 | });
63 | }
64 |
65 | final _$rememberMeAtom = Atom(name: '_LoginControllerBase.rememberMe');
66 |
67 | @override
68 | bool get rememberMe {
69 | _$rememberMeAtom.reportRead();
70 | return super.rememberMe;
71 | }
72 |
73 | @override
74 | set rememberMe(bool value) {
75 | _$rememberMeAtom.reportWrite(value, super.rememberMe, () {
76 | super.rememberMe = value;
77 | });
78 | }
79 |
80 | final _$authenticateAsyncAction =
81 | AsyncAction('_LoginControllerBase.authenticate');
82 |
83 | @override
84 | Future authenticate() {
85 | return _$authenticateAsyncAction.run(() => super.authenticate());
86 | }
87 |
88 | final _$_LoginControllerBaseActionController =
89 | ActionController(name: '_LoginControllerBase');
90 |
91 | @override
92 | void setLogin(String v) {
93 | final _$actionInfo = _$_LoginControllerBaseActionController.startAction(
94 | name: '_LoginControllerBase.setLogin');
95 | try {
96 | return super.setLogin(v);
97 | } finally {
98 | _$_LoginControllerBaseActionController.endAction(_$actionInfo);
99 | }
100 | }
101 |
102 | @override
103 | void setPassword(String v) {
104 | final _$actionInfo = _$_LoginControllerBaseActionController.startAction(
105 | name: '_LoginControllerBase.setPassword');
106 | try {
107 | return super.setPassword(v);
108 | } finally {
109 | _$_LoginControllerBaseActionController.endAction(_$actionInfo);
110 | }
111 | }
112 |
113 | @override
114 | void switchRememberMe() {
115 | final _$actionInfo = _$_LoginControllerBaseActionController.startAction(
116 | name: '_LoginControllerBase.switchRememberMe');
117 | try {
118 | return super.switchRememberMe();
119 | } finally {
120 | _$_LoginControllerBaseActionController.endAction(_$actionInfo);
121 | }
122 | }
123 |
124 | @override
125 | String toString() {
126 | return '''
127 | login: ${login},
128 | password: ${password},
129 | loginState: ${loginState},
130 | rememberMe: ${rememberMe},
131 | auth: ${auth}
132 | ''';
133 | }
134 | }
135 |
--------------------------------------------------------------------------------
/pubspec.lock:
--------------------------------------------------------------------------------
1 | # Generated by pub
2 | # See https://dart.dev/tools/pub/glossary#lockfile
3 | packages:
4 | _fe_analyzer_shared:
5 | dependency: transitive
6 | description:
7 | name: _fe_analyzer_shared
8 | url: "https://pub.dartlang.org"
9 | source: hosted
10 | version: "12.0.0"
11 | analyzer:
12 | dependency: transitive
13 | description:
14 | name: analyzer
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "0.40.5"
18 | args:
19 | dependency: transitive
20 | description:
21 | name: args
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "1.6.0"
25 | asuka:
26 | dependency: "direct main"
27 | description:
28 | name: asuka
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.0.4"
32 | async:
33 | dependency: transitive
34 | description:
35 | name: async
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "2.5.0"
39 | 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: "1.5.0"
53 | build_config:
54 | dependency: transitive
55 | description:
56 | name: build_config
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "0.4.2"
60 | build_daemon:
61 | dependency: transitive
62 | description:
63 | name: build_daemon
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "2.1.4"
67 | build_resolvers:
68 | dependency: transitive
69 | description:
70 | name: build_resolvers
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "1.4.3"
74 | build_runner:
75 | dependency: "direct dev"
76 | description:
77 | name: build_runner
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "1.10.4"
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: "6.0.3"
88 | built_collection:
89 | dependency: transitive
90 | description:
91 | name: built_collection
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "4.3.2"
95 | built_value:
96 | dependency: transitive
97 | description:
98 | name: built_value
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "7.1.0"
102 | characters:
103 | dependency: transitive
104 | description:
105 | name: characters
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "1.1.0"
109 | charcode:
110 | dependency: transitive
111 | description:
112 | name: charcode
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "1.2.0"
116 | checked_yaml:
117 | dependency: transitive
118 | description:
119 | name: checked_yaml
120 | url: "https://pub.dartlang.org"
121 | source: hosted
122 | version: "1.0.2"
123 | cli_util:
124 | dependency: transitive
125 | description:
126 | name: cli_util
127 | url: "https://pub.dartlang.org"
128 | source: hosted
129 | version: "0.2.0"
130 | clock:
131 | dependency: transitive
132 | description:
133 | name: clock
134 | url: "https://pub.dartlang.org"
135 | source: hosted
136 | version: "1.1.0"
137 | code_builder:
138 | dependency: transitive
139 | description:
140 | name: code_builder
141 | url: "https://pub.dartlang.org"
142 | source: hosted
143 | version: "3.5.0"
144 | collection:
145 | dependency: transitive
146 | description:
147 | name: collection
148 | url: "https://pub.dartlang.org"
149 | source: hosted
150 | version: "1.15.0"
151 | convert:
152 | dependency: transitive
153 | description:
154 | name: convert
155 | url: "https://pub.dartlang.org"
156 | source: hosted
157 | version: "2.1.1"
158 | crypto:
159 | dependency: transitive
160 | description:
161 | name: crypto
162 | url: "https://pub.dartlang.org"
163 | source: hosted
164 | version: "2.1.5"
165 | dart_style:
166 | dependency: transitive
167 | description:
168 | name: dart_style
169 | url: "https://pub.dartlang.org"
170 | source: hosted
171 | version: "1.3.8+1"
172 | dartz:
173 | dependency: "direct main"
174 | description:
175 | name: dartz
176 | url: "https://pub.dartlang.org"
177 | source: hosted
178 | version: "0.9.2"
179 | dio:
180 | dependency: "direct main"
181 | description:
182 | name: dio
183 | url: "https://pub.dartlang.org"
184 | source: hosted
185 | version: "3.0.10"
186 | fake_async:
187 | dependency: transitive
188 | description:
189 | name: fake_async
190 | url: "https://pub.dartlang.org"
191 | source: hosted
192 | version: "1.2.0"
193 | fixnum:
194 | dependency: transitive
195 | description:
196 | name: fixnum
197 | url: "https://pub.dartlang.org"
198 | source: hosted
199 | version: "0.10.11"
200 | flutter:
201 | dependency: "direct main"
202 | description: flutter
203 | source: sdk
204 | version: "0.0.0"
205 | flutter_mobx:
206 | dependency: "direct main"
207 | description:
208 | name: flutter_mobx
209 | url: "https://pub.dartlang.org"
210 | source: hosted
211 | version: "1.1.0+2"
212 | flutter_modular:
213 | dependency: "direct main"
214 | description:
215 | name: flutter_modular
216 | url: "https://pub.dartlang.org"
217 | source: hosted
218 | version: "2.0.1"
219 | flutter_test:
220 | dependency: "direct dev"
221 | description: flutter
222 | source: sdk
223 | version: "0.0.0"
224 | font_awesome_flutter:
225 | dependency: "direct main"
226 | description:
227 | name: font_awesome_flutter
228 | url: "https://pub.dartlang.org"
229 | source: hosted
230 | version: "8.10.0"
231 | glob:
232 | dependency: transitive
233 | description:
234 | name: glob
235 | url: "https://pub.dartlang.org"
236 | source: hosted
237 | version: "1.2.0"
238 | graphs:
239 | dependency: transitive
240 | description:
241 | name: graphs
242 | url: "https://pub.dartlang.org"
243 | source: hosted
244 | version: "0.2.0"
245 | http_multi_server:
246 | dependency: transitive
247 | description:
248 | name: http_multi_server
249 | url: "https://pub.dartlang.org"
250 | source: hosted
251 | version: "2.2.0"
252 | http_parser:
253 | dependency: transitive
254 | description:
255 | name: http_parser
256 | url: "https://pub.dartlang.org"
257 | source: hosted
258 | version: "3.1.4"
259 | io:
260 | dependency: transitive
261 | description:
262 | name: io
263 | url: "https://pub.dartlang.org"
264 | source: hosted
265 | version: "0.3.4"
266 | js:
267 | dependency: transitive
268 | description:
269 | name: js
270 | url: "https://pub.dartlang.org"
271 | source: hosted
272 | version: "0.6.2"
273 | json_annotation:
274 | dependency: transitive
275 | description:
276 | name: json_annotation
277 | url: "https://pub.dartlang.org"
278 | source: hosted
279 | version: "3.1.0"
280 | logging:
281 | dependency: transitive
282 | description:
283 | name: logging
284 | url: "https://pub.dartlang.org"
285 | source: hosted
286 | version: "0.11.4"
287 | matcher:
288 | dependency: transitive
289 | description:
290 | name: matcher
291 | url: "https://pub.dartlang.org"
292 | source: hosted
293 | version: "0.12.10"
294 | meta:
295 | dependency: transitive
296 | description:
297 | name: meta
298 | url: "https://pub.dartlang.org"
299 | source: hosted
300 | version: "1.3.0"
301 | mime:
302 | dependency: transitive
303 | description:
304 | name: mime
305 | url: "https://pub.dartlang.org"
306 | source: hosted
307 | version: "0.9.7"
308 | mobx:
309 | dependency: "direct main"
310 | description:
311 | name: mobx
312 | url: "https://pub.dartlang.org"
313 | source: hosted
314 | version: "1.2.1+4"
315 | mobx_codegen:
316 | dependency: "direct dev"
317 | description:
318 | name: mobx_codegen
319 | url: "https://pub.dartlang.org"
320 | source: hosted
321 | version: "1.1.2"
322 | mockito:
323 | dependency: "direct dev"
324 | description:
325 | name: mockito
326 | url: "https://pub.dartlang.org"
327 | source: hosted
328 | version: "4.1.3"
329 | modular_codegen:
330 | dependency: "direct dev"
331 | description:
332 | name: modular_codegen
333 | url: "https://pub.dartlang.org"
334 | source: hosted
335 | version: "2.0.1"
336 | node_interop:
337 | dependency: transitive
338 | description:
339 | name: node_interop
340 | url: "https://pub.dartlang.org"
341 | source: hosted
342 | version: "1.2.0"
343 | node_io:
344 | dependency: transitive
345 | description:
346 | name: node_io
347 | url: "https://pub.dartlang.org"
348 | source: hosted
349 | version: "1.1.1"
350 | package_config:
351 | dependency: transitive
352 | description:
353 | name: package_config
354 | url: "https://pub.dartlang.org"
355 | source: hosted
356 | version: "1.9.3"
357 | path:
358 | dependency: transitive
359 | description:
360 | name: path
361 | url: "https://pub.dartlang.org"
362 | source: hosted
363 | version: "1.8.0"
364 | pedantic:
365 | dependency: transitive
366 | description:
367 | name: pedantic
368 | url: "https://pub.dartlang.org"
369 | source: hosted
370 | version: "1.9.2"
371 | pool:
372 | dependency: transitive
373 | description:
374 | name: pool
375 | url: "https://pub.dartlang.org"
376 | source: hosted
377 | version: "1.4.0"
378 | pub_semver:
379 | dependency: transitive
380 | description:
381 | name: pub_semver
382 | url: "https://pub.dartlang.org"
383 | source: hosted
384 | version: "1.4.4"
385 | pubspec_parse:
386 | dependency: transitive
387 | description:
388 | name: pubspec_parse
389 | url: "https://pub.dartlang.org"
390 | source: hosted
391 | version: "0.1.5"
392 | quiver:
393 | dependency: transitive
394 | description:
395 | name: quiver
396 | url: "https://pub.dartlang.org"
397 | source: hosted
398 | version: "2.1.4+1"
399 | shelf:
400 | dependency: transitive
401 | description:
402 | name: shelf
403 | url: "https://pub.dartlang.org"
404 | source: hosted
405 | version: "0.7.9"
406 | shelf_web_socket:
407 | dependency: transitive
408 | description:
409 | name: shelf_web_socket
410 | url: "https://pub.dartlang.org"
411 | source: hosted
412 | version: "0.2.3"
413 | sky_engine:
414 | dependency: transitive
415 | description: flutter
416 | source: sdk
417 | version: "0.0.99"
418 | source_gen:
419 | dependency: transitive
420 | description:
421 | name: source_gen
422 | url: "https://pub.dartlang.org"
423 | source: hosted
424 | version: "0.9.8"
425 | source_span:
426 | dependency: transitive
427 | description:
428 | name: source_span
429 | url: "https://pub.dartlang.org"
430 | source: hosted
431 | version: "1.8.0"
432 | stack_trace:
433 | dependency: transitive
434 | description:
435 | name: stack_trace
436 | url: "https://pub.dartlang.org"
437 | source: hosted
438 | version: "1.10.0"
439 | stream_channel:
440 | dependency: transitive
441 | description:
442 | name: stream_channel
443 | url: "https://pub.dartlang.org"
444 | source: hosted
445 | version: "2.1.0"
446 | stream_transform:
447 | dependency: transitive
448 | description:
449 | name: stream_transform
450 | url: "https://pub.dartlang.org"
451 | source: hosted
452 | version: "1.2.0"
453 | string_scanner:
454 | dependency: transitive
455 | description:
456 | name: string_scanner
457 | url: "https://pub.dartlang.org"
458 | source: hosted
459 | version: "1.1.0"
460 | term_glyph:
461 | dependency: transitive
462 | description:
463 | name: term_glyph
464 | url: "https://pub.dartlang.org"
465 | source: hosted
466 | version: "1.2.0"
467 | test_api:
468 | dependency: transitive
469 | description:
470 | name: test_api
471 | url: "https://pub.dartlang.org"
472 | source: hosted
473 | version: "0.2.19"
474 | timing:
475 | dependency: transitive
476 | description:
477 | name: timing
478 | url: "https://pub.dartlang.org"
479 | source: hosted
480 | version: "0.1.1+2"
481 | typed_data:
482 | dependency: transitive
483 | description:
484 | name: typed_data
485 | url: "https://pub.dartlang.org"
486 | source: hosted
487 | version: "1.3.0"
488 | vector_math:
489 | dependency: transitive
490 | description:
491 | name: vector_math
492 | url: "https://pub.dartlang.org"
493 | source: hosted
494 | version: "2.1.0"
495 | watcher:
496 | dependency: transitive
497 | description:
498 | name: watcher
499 | url: "https://pub.dartlang.org"
500 | source: hosted
501 | version: "0.9.7+15"
502 | web_socket_channel:
503 | dependency: transitive
504 | description:
505 | name: web_socket_channel
506 | url: "https://pub.dartlang.org"
507 | source: hosted
508 | version: "1.1.0"
509 | yaml:
510 | dependency: transitive
511 | description:
512 | name: yaml
513 | url: "https://pub.dartlang.org"
514 | source: hosted
515 | version: "2.2.1"
516 | sdks:
517 | dart: ">=2.12.0-0.0 <3.0.0"
518 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
16 | /* End PBXBuildFile section */
17 |
18 | /* Begin PBXCopyFilesBuildPhase section */
19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
20 | isa = PBXCopyFilesBuildPhase;
21 | buildActionMask = 2147483647;
22 | dstPath = "";
23 | dstSubfolderSpec = 10;
24 | files = (
25 | );
26 | name = "Embed Frameworks";
27 | runOnlyForDeploymentPostprocessing = 0;
28 | };
29 | /* End PBXCopyFilesBuildPhase section */
30 |
31 | /* Begin PBXFileReference section */
32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
45 | /* End PBXFileReference section */
46 |
47 | /* Begin PBXFrameworksBuildPhase section */
48 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
49 | isa = PBXFrameworksBuildPhase;
50 | buildActionMask = 2147483647;
51 | files = (
52 | );
53 | runOnlyForDeploymentPostprocessing = 0;
54 | };
55 | /* End PBXFrameworksBuildPhase section */
56 |
57 | /* Begin PBXGroup section */
58 | 9740EEB11CF90186004384FC /* Flutter */ = {
59 | isa = PBXGroup;
60 | children = (
61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
65 | );
66 | name = Flutter;
67 | sourceTree = "";
68 | };
69 | 97C146E51CF9000F007C117D = {
70 | isa = PBXGroup;
71 | children = (
72 | 9740EEB11CF90186004384FC /* Flutter */,
73 | 97C146F01CF9000F007C117D /* Runner */,
74 | 97C146EF1CF9000F007C117D /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | 97C146EF1CF9000F007C117D /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | 97C146EE1CF9000F007C117D /* Runner.app */,
82 | );
83 | name = Products;
84 | sourceTree = "";
85 | };
86 | 97C146F01CF9000F007C117D /* Runner */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
92 | 97C147021CF9000F007C117D /* Info.plist */,
93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
97 | );
98 | path = Runner;
99 | sourceTree = "";
100 | };
101 | /* End PBXGroup section */
102 |
103 | /* Begin PBXNativeTarget section */
104 | 97C146ED1CF9000F007C117D /* Runner */ = {
105 | isa = PBXNativeTarget;
106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
107 | buildPhases = (
108 | 9740EEB61CF901F6004384FC /* Run Script */,
109 | 97C146EA1CF9000F007C117D /* Sources */,
110 | 97C146EB1CF9000F007C117D /* Frameworks */,
111 | 97C146EC1CF9000F007C117D /* Resources */,
112 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
114 | );
115 | buildRules = (
116 | );
117 | dependencies = (
118 | );
119 | name = Runner;
120 | productName = Runner;
121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
122 | productType = "com.apple.product-type.application";
123 | };
124 | /* End PBXNativeTarget section */
125 |
126 | /* Begin PBXProject section */
127 | 97C146E61CF9000F007C117D /* Project object */ = {
128 | isa = PBXProject;
129 | attributes = {
130 | LastUpgradeCheck = 1020;
131 | ORGANIZATIONNAME = "";
132 | TargetAttributes = {
133 | 97C146ED1CF9000F007C117D = {
134 | CreatedOnToolsVersion = 7.3.1;
135 | LastSwiftMigration = 1100;
136 | };
137 | };
138 | };
139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
140 | compatibilityVersion = "Xcode 9.3";
141 | developmentRegion = en;
142 | hasScannedForEncodings = 0;
143 | knownRegions = (
144 | en,
145 | Base,
146 | );
147 | mainGroup = 97C146E51CF9000F007C117D;
148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
149 | projectDirPath = "";
150 | projectRoot = "";
151 | targets = (
152 | 97C146ED1CF9000F007C117D /* Runner */,
153 | );
154 | };
155 | /* End PBXProject section */
156 |
157 | /* Begin PBXResourcesBuildPhase section */
158 | 97C146EC1CF9000F007C117D /* Resources */ = {
159 | isa = PBXResourcesBuildPhase;
160 | buildActionMask = 2147483647;
161 | files = (
162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
166 | );
167 | runOnlyForDeploymentPostprocessing = 0;
168 | };
169 | /* End PBXResourcesBuildPhase section */
170 |
171 | /* Begin PBXShellScriptBuildPhase section */
172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
173 | isa = PBXShellScriptBuildPhase;
174 | buildActionMask = 2147483647;
175 | files = (
176 | );
177 | inputPaths = (
178 | );
179 | name = "Thin Binary";
180 | outputPaths = (
181 | );
182 | runOnlyForDeploymentPostprocessing = 0;
183 | shellPath = /bin/sh;
184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
185 | };
186 | 9740EEB61CF901F6004384FC /* Run Script */ = {
187 | isa = PBXShellScriptBuildPhase;
188 | buildActionMask = 2147483647;
189 | files = (
190 | );
191 | inputPaths = (
192 | );
193 | name = "Run Script";
194 | outputPaths = (
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | shellPath = /bin/sh;
198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
199 | };
200 | /* End PBXShellScriptBuildPhase section */
201 |
202 | /* Begin PBXSourcesBuildPhase section */
203 | 97C146EA1CF9000F007C117D /* Sources */ = {
204 | isa = PBXSourcesBuildPhase;
205 | buildActionMask = 2147483647;
206 | files = (
207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
209 | );
210 | runOnlyForDeploymentPostprocessing = 0;
211 | };
212 | /* End PBXSourcesBuildPhase section */
213 |
214 | /* Begin PBXVariantGroup section */
215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
216 | isa = PBXVariantGroup;
217 | children = (
218 | 97C146FB1CF9000F007C117D /* Base */,
219 | );
220 | name = Main.storyboard;
221 | sourceTree = "";
222 | };
223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
224 | isa = PBXVariantGroup;
225 | children = (
226 | 97C147001CF9000F007C117D /* Base */,
227 | );
228 | name = LaunchScreen.storyboard;
229 | sourceTree = "";
230 | };
231 | /* End PBXVariantGroup section */
232 |
233 | /* Begin XCBuildConfiguration section */
234 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
235 | isa = XCBuildConfiguration;
236 | buildSettings = {
237 | ALWAYS_SEARCH_USER_PATHS = NO;
238 | CLANG_ANALYZER_NONNULL = YES;
239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
240 | CLANG_CXX_LIBRARY = "libc++";
241 | CLANG_ENABLE_MODULES = YES;
242 | CLANG_ENABLE_OBJC_ARC = YES;
243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
244 | CLANG_WARN_BOOL_CONVERSION = YES;
245 | CLANG_WARN_COMMA = YES;
246 | CLANG_WARN_CONSTANT_CONVERSION = YES;
247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INFINITE_RECURSION = YES;
252 | CLANG_WARN_INT_CONVERSION = YES;
253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
258 | CLANG_WARN_STRICT_PROTOTYPES = YES;
259 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
260 | CLANG_WARN_UNREACHABLE_CODE = YES;
261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
263 | COPY_PHASE_STRIP = NO;
264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
265 | ENABLE_NS_ASSERTIONS = NO;
266 | ENABLE_STRICT_OBJC_MSGSEND = YES;
267 | GCC_C_LANGUAGE_STANDARD = gnu99;
268 | GCC_NO_COMMON_BLOCKS = YES;
269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
271 | GCC_WARN_UNDECLARED_SELECTOR = YES;
272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
273 | GCC_WARN_UNUSED_FUNCTION = YES;
274 | GCC_WARN_UNUSED_VARIABLE = YES;
275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
276 | MTL_ENABLE_DEBUG_INFO = NO;
277 | SDKROOT = iphoneos;
278 | SUPPORTED_PLATFORMS = iphoneos;
279 | TARGETED_DEVICE_FAMILY = "1,2";
280 | VALIDATE_PRODUCT = YES;
281 | };
282 | name = Profile;
283 | };
284 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
285 | isa = XCBuildConfiguration;
286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
287 | buildSettings = {
288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
289 | CLANG_ENABLE_MODULES = YES;
290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
291 | ENABLE_BITCODE = NO;
292 | FRAMEWORK_SEARCH_PATHS = (
293 | "$(inherited)",
294 | "$(PROJECT_DIR)/Flutter",
295 | );
296 | INFOPLIST_FILE = Runner/Info.plist;
297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
298 | LIBRARY_SEARCH_PATHS = (
299 | "$(inherited)",
300 | "$(PROJECT_DIR)/Flutter",
301 | );
302 | PRODUCT_BUNDLE_IDENTIFIER = com.example.dddExample;
303 | PRODUCT_NAME = "$(TARGET_NAME)";
304 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
305 | SWIFT_VERSION = 5.0;
306 | VERSIONING_SYSTEM = "apple-generic";
307 | };
308 | name = Profile;
309 | };
310 | 97C147031CF9000F007C117D /* Debug */ = {
311 | isa = XCBuildConfiguration;
312 | buildSettings = {
313 | ALWAYS_SEARCH_USER_PATHS = NO;
314 | CLANG_ANALYZER_NONNULL = YES;
315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
316 | CLANG_CXX_LIBRARY = "libc++";
317 | CLANG_ENABLE_MODULES = YES;
318 | CLANG_ENABLE_OBJC_ARC = YES;
319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
320 | CLANG_WARN_BOOL_CONVERSION = YES;
321 | CLANG_WARN_COMMA = YES;
322 | CLANG_WARN_CONSTANT_CONVERSION = YES;
323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
325 | CLANG_WARN_EMPTY_BODY = YES;
326 | CLANG_WARN_ENUM_CONVERSION = YES;
327 | CLANG_WARN_INFINITE_RECURSION = YES;
328 | CLANG_WARN_INT_CONVERSION = YES;
329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
330 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
334 | CLANG_WARN_STRICT_PROTOTYPES = YES;
335 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
336 | CLANG_WARN_UNREACHABLE_CODE = YES;
337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
339 | COPY_PHASE_STRIP = NO;
340 | DEBUG_INFORMATION_FORMAT = dwarf;
341 | ENABLE_STRICT_OBJC_MSGSEND = YES;
342 | ENABLE_TESTABILITY = YES;
343 | GCC_C_LANGUAGE_STANDARD = gnu99;
344 | GCC_DYNAMIC_NO_PIC = NO;
345 | GCC_NO_COMMON_BLOCKS = YES;
346 | GCC_OPTIMIZATION_LEVEL = 0;
347 | GCC_PREPROCESSOR_DEFINITIONS = (
348 | "DEBUG=1",
349 | "$(inherited)",
350 | );
351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
353 | GCC_WARN_UNDECLARED_SELECTOR = YES;
354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
355 | GCC_WARN_UNUSED_FUNCTION = YES;
356 | GCC_WARN_UNUSED_VARIABLE = YES;
357 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
358 | MTL_ENABLE_DEBUG_INFO = YES;
359 | ONLY_ACTIVE_ARCH = YES;
360 | SDKROOT = iphoneos;
361 | TARGETED_DEVICE_FAMILY = "1,2";
362 | };
363 | name = Debug;
364 | };
365 | 97C147041CF9000F007C117D /* Release */ = {
366 | isa = XCBuildConfiguration;
367 | buildSettings = {
368 | ALWAYS_SEARCH_USER_PATHS = NO;
369 | CLANG_ANALYZER_NONNULL = YES;
370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
371 | CLANG_CXX_LIBRARY = "libc++";
372 | CLANG_ENABLE_MODULES = YES;
373 | CLANG_ENABLE_OBJC_ARC = YES;
374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
375 | CLANG_WARN_BOOL_CONVERSION = YES;
376 | CLANG_WARN_COMMA = YES;
377 | CLANG_WARN_CONSTANT_CONVERSION = YES;
378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
380 | CLANG_WARN_EMPTY_BODY = YES;
381 | CLANG_WARN_ENUM_CONVERSION = YES;
382 | CLANG_WARN_INFINITE_RECURSION = YES;
383 | CLANG_WARN_INT_CONVERSION = YES;
384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
389 | CLANG_WARN_STRICT_PROTOTYPES = YES;
390 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
391 | CLANG_WARN_UNREACHABLE_CODE = YES;
392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
394 | COPY_PHASE_STRIP = NO;
395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
396 | ENABLE_NS_ASSERTIONS = NO;
397 | ENABLE_STRICT_OBJC_MSGSEND = YES;
398 | GCC_C_LANGUAGE_STANDARD = gnu99;
399 | GCC_NO_COMMON_BLOCKS = YES;
400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
402 | GCC_WARN_UNDECLARED_SELECTOR = YES;
403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
404 | GCC_WARN_UNUSED_FUNCTION = YES;
405 | GCC_WARN_UNUSED_VARIABLE = YES;
406 | IPHONEOS_DEPLOYMENT_TARGET = 9.0;
407 | MTL_ENABLE_DEBUG_INFO = NO;
408 | SDKROOT = iphoneos;
409 | SUPPORTED_PLATFORMS = iphoneos;
410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
411 | TARGETED_DEVICE_FAMILY = "1,2";
412 | VALIDATE_PRODUCT = YES;
413 | };
414 | name = Release;
415 | };
416 | 97C147061CF9000F007C117D /* Debug */ = {
417 | isa = XCBuildConfiguration;
418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
419 | buildSettings = {
420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
421 | CLANG_ENABLE_MODULES = YES;
422 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
423 | ENABLE_BITCODE = NO;
424 | FRAMEWORK_SEARCH_PATHS = (
425 | "$(inherited)",
426 | "$(PROJECT_DIR)/Flutter",
427 | );
428 | INFOPLIST_FILE = Runner/Info.plist;
429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
430 | LIBRARY_SEARCH_PATHS = (
431 | "$(inherited)",
432 | "$(PROJECT_DIR)/Flutter",
433 | );
434 | PRODUCT_BUNDLE_IDENTIFIER = com.example.dddExample;
435 | PRODUCT_NAME = "$(TARGET_NAME)";
436 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
437 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
438 | SWIFT_VERSION = 5.0;
439 | VERSIONING_SYSTEM = "apple-generic";
440 | };
441 | name = Debug;
442 | };
443 | 97C147071CF9000F007C117D /* Release */ = {
444 | isa = XCBuildConfiguration;
445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
446 | buildSettings = {
447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
448 | CLANG_ENABLE_MODULES = YES;
449 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
450 | ENABLE_BITCODE = NO;
451 | FRAMEWORK_SEARCH_PATHS = (
452 | "$(inherited)",
453 | "$(PROJECT_DIR)/Flutter",
454 | );
455 | INFOPLIST_FILE = Runner/Info.plist;
456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
457 | LIBRARY_SEARCH_PATHS = (
458 | "$(inherited)",
459 | "$(PROJECT_DIR)/Flutter",
460 | );
461 | PRODUCT_BUNDLE_IDENTIFIER = com.example.dddExample;
462 | PRODUCT_NAME = "$(TARGET_NAME)";
463 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
464 | SWIFT_VERSION = 5.0;
465 | VERSIONING_SYSTEM = "apple-generic";
466 | };
467 | name = Release;
468 | };
469 | /* End XCBuildConfiguration section */
470 |
471 | /* Begin XCConfigurationList section */
472 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
473 | isa = XCConfigurationList;
474 | buildConfigurations = (
475 | 97C147031CF9000F007C117D /* Debug */,
476 | 97C147041CF9000F007C117D /* Release */,
477 | 249021D3217E4FDB00AE95B9 /* Profile */,
478 | );
479 | defaultConfigurationIsVisible = 0;
480 | defaultConfigurationName = Release;
481 | };
482 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
483 | isa = XCConfigurationList;
484 | buildConfigurations = (
485 | 97C147061CF9000F007C117D /* Debug */,
486 | 97C147071CF9000F007C117D /* Release */,
487 | 249021D4217E4FDB00AE95B9 /* Profile */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | /* End XCConfigurationList section */
493 | };
494 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
495 | }
496 |
--------------------------------------------------------------------------------