├── teste ├── 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 │ │ ├── Info.plist │ │ └── Base.lproj │ │ │ ├── Main.storyboard │ │ │ └── LaunchScreen.storyboard │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── Runner.xcodeproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── .gitignore ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ └── Icon-512.png │ ├── manifest.json │ └── index.html ├── android │ ├── gradle.properties │ ├── .gitignore │ ├── 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 │ │ │ │ │ │ └── teste │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ └── build.gradle ├── lib │ ├── main.dart │ └── app │ │ ├── app_controller.dart │ │ ├── modules │ │ └── home │ │ │ ├── home_controller.dart │ │ │ ├── home_module.dart │ │ │ ├── home_controller.g.dart │ │ │ └── home_page.dart │ │ ├── app_widget.dart │ │ ├── app_module.dart │ │ └── app_controller.g.dart ├── .metadata ├── .slidy │ └── 1587386005471 ├── README.md ├── test │ └── app │ │ ├── app_controller_test.dart │ │ └── modules │ │ └── home │ │ ├── home_controller_test.dart │ │ └── home_page_test.dart ├── .gitignore ├── pubspec.yaml └── pubspec.lock ├── README.md ├── tests_example ├── .slidy │ ├── 1587218445442 │ ├── 1587218725515 │ ├── 1587227982140 │ ├── 1587227996565 │ ├── 1587218586565 │ ├── 1587219093230 │ ├── 1587219341613 │ ├── 1587228778756 │ ├── 1587228787897 │ ├── 1587228795953 │ ├── 1587219199808 │ ├── 1587227843252 │ ├── 1587227861488 │ ├── 1587228961736 │ ├── 1587228928401 │ ├── 1587228979318 │ ├── 1587228892611 │ ├── 1587228873243 │ └── 1587228992177 ├── 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 │ └── .gitignore ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ └── Icon-512.png │ ├── manifest.json │ └── index.html ├── android │ ├── gradle.properties │ ├── .gitignore │ ├── 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 │ │ │ │ │ │ └── tests_example │ │ │ │ │ │ └── MainActivity.kt │ │ │ │ └── AndroidManifest.xml │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ └── build.gradle │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ └── build.gradle ├── assets │ └── mocks │ │ ├── months.json │ │ ├── payroll.json │ │ └── login.json ├── lib │ ├── app │ │ ├── app_controller.dart │ │ ├── shared │ │ │ ├── utils │ │ │ │ ├── settings.dart │ │ │ │ └── utils.dart │ │ │ ├── repositories │ │ │ │ ├── interfaces │ │ │ │ │ ├── user_respository_interface.dart │ │ │ │ │ └── user_local_storage_repository_interface.dart │ │ │ │ ├── mocks │ │ │ │ │ ├── user_repository_mock.dart │ │ │ │ │ └── user_local_storage_repository_mock.dart │ │ │ │ ├── user_repository.dart │ │ │ │ └── user_local_storage_repository.dart │ │ │ ├── custom_dio │ │ │ │ ├── custom_dio.dart │ │ │ │ └── custom_interceptor.dart │ │ │ ├── services │ │ │ │ ├── interfaces │ │ │ │ │ ├── user_service_interface.dart │ │ │ │ │ └── user_storage_service_interface.dart │ │ │ │ ├── user_service.dart │ │ │ │ └── user_storage_service.dart │ │ │ └── models │ │ │ │ ├── authentication_model.dart │ │ │ │ ├── user_model.dart │ │ │ │ ├── authentication_model.g.dart │ │ │ │ └── user_model.g.dart │ │ ├── modules │ │ │ └── home │ │ │ │ ├── components │ │ │ │ ├── loading │ │ │ │ │ └── loading_widget.dart │ │ │ │ ├── header │ │ │ │ │ └── header_widget.dart │ │ │ │ └── master │ │ │ │ │ └── master_widget.dart │ │ │ │ ├── pages │ │ │ │ ├── payslip │ │ │ │ │ ├── services │ │ │ │ │ │ ├── interfaces │ │ │ │ │ │ │ └── payslip_service_interface.dart │ │ │ │ │ │ └── payslip_service.dart │ │ │ │ │ ├── repositories │ │ │ │ │ │ ├── interfaces │ │ │ │ │ │ │ └── payslip_repository_interface.dart │ │ │ │ │ │ ├── mocks │ │ │ │ │ │ │ └── payslip_repository_mock.dart │ │ │ │ │ │ └── payslip_repository.dart │ │ │ │ │ ├── models │ │ │ │ │ │ ├── payment_model.dart │ │ │ │ │ │ ├── month_model.dart │ │ │ │ │ │ ├── payment_model.g.dart │ │ │ │ │ │ └── month_model.g.dart │ │ │ │ │ ├── payslip_controller.dart │ │ │ │ │ ├── payslip_controller.g.dart │ │ │ │ │ └── payslip_page.dart │ │ │ │ └── login │ │ │ │ │ ├── components │ │ │ │ │ ├── password_field │ │ │ │ │ │ ├── password_field_controller.dart │ │ │ │ │ │ ├── password_field_controller.g.dart │ │ │ │ │ │ └── password_field_widget.dart │ │ │ │ │ ├── login_button │ │ │ │ │ │ └── login_button_widget.dart │ │ │ │ │ ├── circular_button │ │ │ │ │ │ └── circular_button_widget.dart │ │ │ │ │ └── rounded_text_field │ │ │ │ │ │ └── rounded_text_field_widget.dart │ │ │ │ │ ├── login_controller.dart │ │ │ │ │ ├── login_page.dart │ │ │ │ │ └── login_controller.g.dart │ │ │ │ ├── home_controller.dart │ │ │ │ ├── home_controller.g.dart │ │ │ │ ├── home_module.dart │ │ │ │ └── home_page.dart │ │ ├── app_widget.dart │ │ ├── app_controller.g.dart │ │ └── app_module.dart │ └── main.dart ├── .metadata ├── README.md ├── test │ └── app │ │ ├── app_controller_test.dart │ │ └── modules │ │ └── home │ │ ├── home_page_test.dart │ │ └── pages │ │ └── login │ │ └── login_page_test.dart ├── .gitignore └── pubspec.yaml └── Testes_novo.pptx /teste/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /teste/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | "# FlutterTestPresentation" 2 | "# FlutterTestPresentation" 3 | -------------------------------------------------------------------------------- /tests_example/.slidy/1587218445442: -------------------------------------------------------------------------------- 1 | lib/app/shared/models/user_model_model.dart -------------------------------------------------------------------------------- /tests_example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /tests_example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /teste/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /tests_example/.slidy/1587218725515: -------------------------------------------------------------------------------- 1 | lib/app/shared/models/authentication_model.dart -------------------------------------------------------------------------------- /tests_example/.slidy/1587227982140: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/pages/payslip/models/month_model.dart -------------------------------------------------------------------------------- /tests_example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /tests_example/.slidy/1587227996565: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/pages/payslip/models/payment_model.dart -------------------------------------------------------------------------------- /Testes_novo.pptx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/Testes_novo.pptx -------------------------------------------------------------------------------- /teste/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/web/favicon.png -------------------------------------------------------------------------------- /teste/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/web/icons/Icon-192.png -------------------------------------------------------------------------------- /teste/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/web/icons/Icon-512.png -------------------------------------------------------------------------------- /tests_example/.slidy/1587218586565: -------------------------------------------------------------------------------- 1 | lib/app/shared/services/user_service.dart 2 | test/app/shared/services/user_service_test.dart -------------------------------------------------------------------------------- /tests_example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/web/favicon.png -------------------------------------------------------------------------------- /tests_example/.slidy/1587219093230: -------------------------------------------------------------------------------- 1 | lib/app/shared/repositories/user_repository.dart 2 | test/app/shared/repositories/user_repository_test.dart -------------------------------------------------------------------------------- /tests_example/.slidy/1587219341613: -------------------------------------------------------------------------------- 1 | lib/app/shared/services/user_storage_service.dart 2 | test/app/shared/services/user_storage_service_test.dart -------------------------------------------------------------------------------- /tests_example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /tests_example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /teste/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /teste/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /tests_example/.slidy/1587228778756: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/components/header/header_widget.dart 2 | test/app/modules/home/components/header/header_widget_test.dart -------------------------------------------------------------------------------- /tests_example/.slidy/1587228787897: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/components/master/master_widget.dart 2 | test/app/modules/home/components/master/master_widget_test.dart -------------------------------------------------------------------------------- /tests_example/.slidy/1587228795953: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/components/loading/loading_widget.dart 2 | test/app/modules/home/components/loading/loading_widget_test.dart -------------------------------------------------------------------------------- /tests_example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /tests_example/.slidy/1587219199808: -------------------------------------------------------------------------------- 1 | lib/app/shared/repositories/user_local_storage_repository.dart 2 | test/app/shared/repositories/user_local_storage_repository_test.dart -------------------------------------------------------------------------------- /tests_example/.slidy/1587227843252: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/pages/payslip/services/payslip_service.dart 2 | test/app/modules/home/pages/payslip/services/payslip_service_test.dart -------------------------------------------------------------------------------- /tests_example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /teste/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /teste/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_example/.slidy/1587227861488: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/pages/payslip/repositories/payslip_repository.dart 2 | test/app/modules/home/pages/payslip/repositories/payslip_repository_test.dart -------------------------------------------------------------------------------- /teste/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /teste/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /teste/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_example/.slidy/1587228961736: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/pages/login/components/login_button/login_button_widget.dart 2 | test/app/modules/home/pages/login/components/login_button/login_button_widget_test.dart -------------------------------------------------------------------------------- /tests_example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /tests_example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /teste/android/app/src/main/kotlin/com/example/teste/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.teste 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /tests_example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /tests_example/.slidy/1587228928401: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/pages/login/components/circular_button/circular_button_widget.dart 2 | test/app/modules/home/pages/login/components/circular_button/circular_button_widget_test.dart -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/teste/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /teste/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests_example/.slidy/1587228979318: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/pages/login/components/rounded_text_field/rounded_text_field_widget.dart 2 | test/app/modules/home/pages/login/components/rounded_text_field/rounded_text_field_widget_test.dart -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /teste/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:teste/app/app_module.dart'; 3 | import 'package:flutter_modular/flutter_modular.dart'; 4 | 5 | void main() => runApp(ModularApp(module: AppModule())); 6 | -------------------------------------------------------------------------------- /tests_example/android/app/src/main/kotlin/com/example/tests_example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.tests_example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /tests_example/assets/mocks/months.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "month": 12, 5 | "year": 2019 6 | }, 7 | { 8 | "id": 2, 9 | "month": 1, 10 | "year": 2020 11 | } 12 | ] -------------------------------------------------------------------------------- /tests_example/assets/mocks/payroll.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "id": 1, 4 | "description": "01 - Pagamento mensal" 5 | }, 6 | { 7 | "id": 2, 8 | "description": "02 - Pagamento anual" 9 | } 10 | ] -------------------------------------------------------------------------------- /tests_example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toshiossada/FlutterTestPresentation/HEAD/tests_example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /tests_example/lib/app/app_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:mobx/mobx.dart'; 2 | 3 | part 'app_controller.g.dart'; 4 | 5 | class AppController = _AppControllerBase with _$AppController; 6 | 7 | abstract class _AppControllerBase with Store {} 8 | -------------------------------------------------------------------------------- /teste/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests_example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:tests_example/app/app_module.dart'; 3 | import 'package:flutter_modular/flutter_modular.dart'; 4 | 5 | void main() => runApp(ModularApp(module: AppModule())); 6 | -------------------------------------------------------------------------------- /tests_example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests_example/.slidy/1587228892611: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/pages/login/login_page.dart 2 | test/app/modules/home/pages/login/login_page_test.dart 3 | lib/app/modules/home/pages/login/login_controller.dart 4 | test/app/modules/home/pages/login/login_controller_test.dart -------------------------------------------------------------------------------- /tests_example/lib/app/shared/utils/settings.dart: -------------------------------------------------------------------------------- 1 | import 'package:tests_example/app/shared/models/user_model.dart'; 2 | 3 | class Settings { 4 | static String apiUrl = 'http://10.254.37.23:3000/'; 5 | static String token; 6 | static UserModel user; 7 | } 8 | -------------------------------------------------------------------------------- /tests_example/.slidy/1587228873243: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/pages/payslip/payslip_page.dart 2 | test/app/modules/home/pages/payslip/payslip_page_test.dart 3 | lib/app/modules/home/pages/payslip/payslip_controller.dart 4 | test/app/modules/home/pages/payslip/payslip_controller_test.dart -------------------------------------------------------------------------------- /teste/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 | -------------------------------------------------------------------------------- /tests_example/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 | -------------------------------------------------------------------------------- /teste/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /teste/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests_example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /teste/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests_example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/repositories/interfaces/user_respository_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:tests_example/app/shared/models/authentication_model.dart'; 2 | import 'package:tests_example/app/shared/models/user_model.dart'; 3 | 4 | abstract class IUserRepository { 5 | Future authenticate({AuthenticationModel model}); 6 | } 7 | -------------------------------------------------------------------------------- /teste/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests_example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /teste/lib/app/app_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:mobx/mobx.dart'; 2 | 3 | part 'app_controller.g.dart'; 4 | 5 | class AppController = _AppControllerBase with _$AppController; 6 | 7 | abstract class _AppControllerBase with Store { 8 | @observable 9 | int value = 0; 10 | 11 | @action 12 | void increment() { 13 | value++; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /teste/.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: 7f56b53de4e5da2147c4d30d857a72c6f2e4f42f 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /tests_example/.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: b8bd09db210d2c6299555643af8db4b8ff3e8d92 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/custom_dio/custom_dio.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'custom_interceptor.dart'; 3 | 4 | class CustomDio { 5 | final Dio client; 6 | 7 | CustomDio(this.client) { 8 | client.options = BaseOptions(); 9 | 10 | client.interceptors.add(CustomInterceptors()); 11 | 12 | client.options.connectTimeout = 25000; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/services/interfaces/user_service_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:tests_example/app/shared/models/authentication_model.dart'; 2 | import 'package:tests_example/app/shared/models/user_model.dart'; 3 | 4 | abstract class IUserService { 5 | Future authenticate({AuthenticationModel model}); 6 | Future getCurrentUser(); 7 | logout(); 8 | } 9 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/utils/utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | import 'dart:io'; 3 | 4 | class Utils { 5 | static dynamic loadJsonAsset(String fileName) async { 6 | try { 7 | var file = File('assets/mocks/$fileName.json'); 8 | 9 | return jsonDecode(await file.readAsString()); 10 | } catch (e) { 11 | print('object'); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /teste/.slidy/1587386005471: -------------------------------------------------------------------------------- 1 | lib/main.dart 2 | lib/app/app_module.dart 3 | lib/app/app_widget.dart 4 | lib/app/modules/home/home_module.dart 5 | lib/app/modules/home/home_page.dart 6 | test/app/modules/home/home_page_test.dart 7 | lib/app/app_controller.dart 8 | test/app/app_controller_test.dart 9 | lib/app/modules/home/home_controller.dart 10 | test/app/modules/home/home_controller_test.dart -------------------------------------------------------------------------------- /teste/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /teste/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests_example/.slidy/1587228992177: -------------------------------------------------------------------------------- 1 | lib/app/modules/home/pages/login/components/password_field/password_field_widget.dart 2 | test/app/modules/home/pages/login/components/password_field/password_field_widget_test.dart 3 | lib/app/modules/home/pages/login/components/password_field/password_field_controller.dart 4 | test/app/modules/home/pages/login/components/password_field/password_field_controller_test.dart -------------------------------------------------------------------------------- /teste/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. -------------------------------------------------------------------------------- /tests_example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests_example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests_example/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. -------------------------------------------------------------------------------- /tests_example/lib/app/shared/services/interfaces/user_storage_service_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:tests_example/app/shared/models/user_model.dart'; 2 | 3 | abstract class IUserStorageService { 4 | Future> getAll(); 5 | Future get(int id); 6 | Future count(); 7 | Future add(UserModel model); 8 | update(UserModel model); 9 | remove(String username); 10 | clear(); 11 | } 12 | -------------------------------------------------------------------------------- /teste/lib/app/modules/home/home_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:mobx/mobx.dart'; 2 | 3 | part 'home_controller.g.dart'; 4 | 5 | class HomeController = _HomeControllerBase with _$HomeController; 6 | 7 | abstract class _HomeControllerBase with Store { 8 | @observable 9 | int value = 0; 10 | 11 | @action 12 | void increment() { 13 | value++; 14 | } 15 | 16 | @action 17 | void decrement() { 18 | value--; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/repositories/interfaces/user_local_storage_repository_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:tests_example/app/shared/models/user_model.dart'; 2 | 3 | abstract class IUserLocalStorageRepository { 4 | Future> getAll(); 5 | Future get(int id); 6 | Future count(); 7 | Future add(UserModel model); 8 | update(UserModel model); 9 | remove(String userName); 10 | clear(); 11 | } 12 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/components/loading/loading_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LoadingWidget extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return Container( 7 | child: Center( 8 | child: CircularProgressIndicator( 9 | valueColor: 10 | AlwaysStoppedAnimation(Theme.of(context).primaryColor))), 11 | ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/payslip/services/interfaces/payslip_service_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:tests_example/app/modules/home/pages/payslip/models/month_model.dart'; 2 | import 'package:tests_example/app/modules/home/pages/payslip/models/payment_model.dart'; 3 | 4 | abstract class IPayslipService { 5 | Future> getMonth(); 6 | Future> getPayment(); 7 | Future downloadPdf(MonthModel month, PaymentModel payment); 8 | } 9 | -------------------------------------------------------------------------------- /teste/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 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/payslip/repositories/interfaces/payslip_repository_interface.dart: -------------------------------------------------------------------------------- 1 | import 'package:tests_example/app/modules/home/pages/payslip/models/month_model.dart'; 2 | import 'package:tests_example/app/modules/home/pages/payslip/models/payment_model.dart'; 3 | 4 | abstract class IPayslipRepository { 5 | Future> getMonth(); 6 | Future> getPayment(); 7 | Future downloadPdf(MonthModel month, PaymentModel payment); 8 | } 9 | -------------------------------------------------------------------------------- /tests_example/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 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/login/components/password_field/password_field_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:mobx/mobx.dart'; 2 | 3 | part 'password_field_controller.g.dart'; 4 | 5 | class PasswordFieldController = _PasswordFieldControllerBase 6 | with _$PasswordFieldController; 7 | 8 | abstract class _PasswordFieldControllerBase with Store { 9 | @observable 10 | bool passwordVisible = false; 11 | @action 12 | setVisibility(bool v) { 13 | passwordVisible = v; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/payslip/models/payment_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'payment_model.g.dart'; 4 | 5 | @JsonSerializable() 6 | class PaymentModel { 7 | int id; 8 | String description; 9 | 10 | PaymentModel({this.id = 0, this.description}); 11 | 12 | factory PaymentModel.fromJson(Map json) => 13 | _$PaymentModelFromJson(json); 14 | Map toJson() => _$PaymentModelToJson(this); 15 | } 16 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/models/authentication_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | part 'authentication_model.g.dart'; 3 | 4 | @JsonSerializable() 5 | class AuthenticationModel { 6 | String login; 7 | String password; 8 | 9 | AuthenticationModel({this.login, this.password}); 10 | 11 | factory AuthenticationModel.fromJson(Map json) => 12 | _$AuthenticationModelFromJson(json); 13 | Map toJson() => _$AuthenticationModelToJson(this); 14 | } 15 | -------------------------------------------------------------------------------- /teste/lib/app/app_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_modular/flutter_modular.dart'; 3 | 4 | class AppWidget extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return MaterialApp( 8 | navigatorKey: Modular.navigatorKey, 9 | title: 'Flutter Slidy', 10 | theme: ThemeData( 11 | primarySwatch: Colors.blue, 12 | ), 13 | initialRoute: '/', 14 | onGenerateRoute: Modular.generateRoute, 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /teste/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /tests_example/lib/app/app_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_modular/flutter_modular.dart'; 3 | 4 | class AppWidget extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return MaterialApp( 8 | navigatorKey: Modular.navigatorKey, 9 | title: 'Flutter Slidy', 10 | theme: ThemeData( 11 | primarySwatch: Colors.blue, 12 | ), 13 | initialRoute: '/', 14 | onGenerateRoute: Modular.generateRoute, 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/models/user_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'user_model.g.dart'; 4 | 5 | @JsonSerializable() 6 | class UserModel { 7 | String userName; 8 | String name; 9 | String password; 10 | String accessToken; 11 | 12 | UserModel({this.userName, this.password, this.name, this.accessToken}); 13 | 14 | factory UserModel.fromJson(Map json) => 15 | _$UserModelFromJson(json); 16 | Map toJson() => _$UserModelToJson(this); 17 | } 18 | -------------------------------------------------------------------------------- /tests_example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /teste/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 | -------------------------------------------------------------------------------- /tests_example/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 | -------------------------------------------------------------------------------- /teste/lib/app/modules/home/home_module.dart: -------------------------------------------------------------------------------- 1 | import 'package:teste/app/modules/home/home_controller.dart'; 2 | import 'package:flutter_modular/flutter_modular.dart'; 3 | import 'package:teste/app/modules/home/home_page.dart'; 4 | 5 | class HomeModule extends ChildModule { 6 | @override 7 | List get binds => [ 8 | Bind((i) => HomeController()), 9 | ]; 10 | 11 | @override 12 | List get routers => [ 13 | Router(Modular.initialRoute, child: (_, args) => HomePage()), 14 | ]; 15 | 16 | static Inject get to => Inject.of(); 17 | } 18 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/payslip/models/month_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'month_model.g.dart'; 4 | 5 | @JsonSerializable() 6 | class MonthModel { 7 | int id; 8 | int month; 9 | int year; 10 | 11 | MonthModel({this.id = 0, this.month, this.year}); 12 | 13 | String monthFormated() { 14 | return month.toString().padLeft(2, '0'); 15 | } 16 | 17 | factory MonthModel.fromJson(Map json) => 18 | _$MonthModelFromJson(json); 19 | Map toJson() => _$MonthModelToJson(this); 20 | } 21 | -------------------------------------------------------------------------------- /teste/README.md: -------------------------------------------------------------------------------- 1 | # teste 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /tests_example/README.md: -------------------------------------------------------------------------------- 1 | # tests_example 2 | 3 | 'A new Flutter project. Created by Slidy' 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /tests_example/lib/app/app_controller.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'app_controller.dart'; 4 | 5 | // ************************************************************************** 6 | // StoreGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: non_constant_identifier_names, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic 10 | 11 | mixin _$AppController on _AppControllerBase, Store { 12 | @override 13 | String toString() { 14 | final string = ''; 15 | return '{$string}'; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /teste/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "teste", 3 | "short_name": "teste", 4 | "start_url": ".", 5 | "display": "minimal-ui", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /teste/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 | -------------------------------------------------------------------------------- /teste/android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /teste/lib/app/app_module.dart: -------------------------------------------------------------------------------- 1 | import 'package:teste/app/app_controller.dart'; 2 | import 'package:flutter_modular/flutter_modular.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:teste/app/app_widget.dart'; 5 | import 'package:teste/app/modules/home/home_module.dart'; 6 | 7 | class AppModule extends MainModule { 8 | @override 9 | List get binds => [ 10 | Bind((i) => AppController()), 11 | ]; 12 | 13 | @override 14 | List get routers => [ 15 | Router(Modular.initialRoute, module: HomeModule()), 16 | ]; 17 | 18 | @override 19 | Widget get bootstrap => AppWidget(); 20 | 21 | static Inject get to => Inject.of(); 22 | } 23 | -------------------------------------------------------------------------------- /tests_example/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 | -------------------------------------------------------------------------------- /tests_example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /tests_example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "tests_example", 3 | "short_name": "tests_example", 4 | "start_url": ".", 5 | "display": "minimal-ui", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "'A new Flutter project. Created by Slidy'", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /teste/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 | -------------------------------------------------------------------------------- /tests_example/test/app/app_controller_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_modular/flutter_modular_test.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | import '../../lib/app/app_module.dart'; 5 | 6 | void main() { 7 | initModule(AppModule()); 8 | // AppController app; 9 | // 10 | setUp(() { 11 | // app = AppModule.to.get(); 12 | }); 13 | 14 | group('AppController Test', () { 15 | // test("First Test", () { 16 | // expect(app, isInstanceOf()); 17 | // }); 18 | 19 | // test("Set Value", () { 20 | // expect(app.value, equals(0)); 21 | // app.increment(); 22 | // expect(app.value, equals(1)); 23 | // }); 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/payslip/models/payment_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'payment_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | PaymentModel _$PaymentModelFromJson(Map json) { 10 | return PaymentModel( 11 | id: json['id'] as int, 12 | description: json['description'] as String, 13 | ); 14 | } 15 | 16 | Map _$PaymentModelToJson(PaymentModel instance) => 17 | { 18 | 'id': instance.id, 19 | 'description': instance.description, 20 | }; 21 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/home_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:mobx/mobx.dart'; 2 | import 'package:tests_example/app/shared/models/user_model.dart'; 3 | import 'package:tests_example/app/shared/services/interfaces/user_service_interface.dart'; 4 | 5 | part 'home_controller.g.dart'; 6 | 7 | class HomeController = _HomeControllerBase with _$HomeController; 8 | 9 | abstract class _HomeControllerBase with Store { 10 | IUserService _userService; 11 | @observable 12 | UserModel userModel; 13 | @computed 14 | Future get user async { 15 | if (userModel == null) 16 | userModel = await _userService.getCurrentUser() ?? UserModel(); 17 | 18 | return userModel; 19 | } 20 | 21 | _HomeControllerBase(this._userService); 22 | } 23 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/payslip/models/month_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'month_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | MonthModel _$MonthModelFromJson(Map json) { 10 | return MonthModel( 11 | id: json['id'] as int, 12 | month: json['month'] as int, 13 | year: json['year'] as int, 14 | ); 15 | } 16 | 17 | Map _$MonthModelToJson(MonthModel instance) => 18 | { 19 | 'id': instance.id, 20 | 'month': instance.month, 21 | 'year': instance.year, 22 | }; 23 | -------------------------------------------------------------------------------- /teste/test/app/app_controller_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_modular/flutter_modular_test.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | import 'package:teste/app/app_controller.dart'; 5 | import 'package:teste/app/app_module.dart'; 6 | 7 | void main() { 8 | initModule(AppModule()); 9 | // AppController app; 10 | // 11 | setUp(() { 12 | // app = AppModule.to.get(); 13 | }); 14 | 15 | group('AppController Test', () { 16 | // test("First Test", () { 17 | // expect(app, isInstanceOf()); 18 | // }); 19 | 20 | // test("Set Value", () { 21 | // expect(app.value, equals(0)); 22 | // app.increment(); 23 | // expect(app.value, equals(1)); 24 | // }); 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/models/authentication_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'authentication_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | AuthenticationModel _$AuthenticationModelFromJson(Map json) { 10 | return AuthenticationModel( 11 | login: json['login'] as String, 12 | password: json['password'] as String, 13 | ); 14 | } 15 | 16 | Map _$AuthenticationModelToJson( 17 | AuthenticationModel instance) => 18 | { 19 | 'login': instance.login, 20 | 'password': instance.password, 21 | }; 22 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/models/user_model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'user_model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | UserModel _$UserModelFromJson(Map json) { 10 | return UserModel( 11 | userName: json['userName'] as String, 12 | password: json['password'] as String, 13 | name: json['name'] as String, 14 | accessToken: json['accessToken'] as String, 15 | ); 16 | } 17 | 18 | Map _$UserModelToJson(UserModel instance) => { 19 | 'userName': instance.userName, 20 | 'name': instance.name, 21 | 'password': instance.password, 22 | 'accessToken': instance.accessToken, 23 | }; 24 | -------------------------------------------------------------------------------- /teste/test/app/modules/home/home_controller_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_modular/flutter_modular_test.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | import 'package:teste/app/modules/home/home_controller.dart'; 5 | import 'package:teste/app/modules/home/home_module.dart'; 6 | 7 | void main() { 8 | initModule(HomeModule()); 9 | HomeController _homeController; 10 | 11 | setUp(() { 12 | _homeController = HomeModule.to.get(); 13 | }); 14 | 15 | group('HomeController Test', () { 16 | test("First Test", () { 17 | expect(_homeController, isInstanceOf()); 18 | }); 19 | 20 | test('Quando estiver 0 e incrementar devera retornar 1', () { 21 | expect(_homeController.value, 0); 22 | _homeController.increment(); 23 | expect(_homeController.value, 1); 24 | }); 25 | }); 26 | } 27 | 28 | 29 | -------------------------------------------------------------------------------- /teste/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /teste/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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests_example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /tests_example/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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests_example/assets/mocks/login.json: -------------------------------------------------------------------------------- 1 | { 2 | "authenticated": true, 3 | "created": "2020-02-19 12:27:59", 4 | "expiration": "2020-02-19 20:27:59", 5 | "accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6WyJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20iLCJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20iXSwianRpIjoiM2ZiN2U3OTYtOGQ2My00ZTZjLTgyZjEtZjNjODFkODI3NTNhIiwibmJmIjoxNTgyMTI2MDc5LCJleHAiOjE1ODIxNTQ4NzksImlhdCI6MTU4MjEyNjA3OSwiaXNzIjoiUmljYXJkbyBSb2RyaWd1ZXMiLCJhdWQiOiJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20ifQ.xKjlvPISEO-jg17yuGC8AFdikZ0A0KuXrahaVSMlEnSu1cqIIf4hk-X3-CPS8mA22-_0NLR6yHSqRDLxhQ9x7t-UbDHesJc6R_aKLsnHByHynTlSnh5vVwWbcjkuaj2VhpUBV9uwA1JxkSKATA_v6pmbO_k9vzIGE6KxhQYKDByg1S6oyFGF3bcIyBd1ekXkZkFMswdN0JVC0C31dBM5Hb358zkveaPDZe4p9kJePRcyQqwuy4Bgfi12OA4DW5ojfZhbRr4-yFeK8ejdVgtGa8xtlhNhCuIKg-GXKNAUFzHUJs95DzZh0Fo8Eru0aTE_l0IduODOfFxVo8rCyJj0-w", 6 | "userName": "ricardo.caiuba@gmail.com", 7 | "name": "Ricardo Rodrigues", 8 | "message": "Usuário logado com sucesso" 9 | } -------------------------------------------------------------------------------- /tests_example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: tests_example 2 | description: "A new Flutter project. Created by Slidy" 3 | 4 | publish_to: "none" 5 | 6 | version: 1.0.0+1 7 | 8 | environment: 9 | sdk: ">=2.7.0 <3.0.0" 10 | 11 | scripts: 12 | mobx: flutter clean & flutter pub get & flutter pub run build_runner build --delete-conflicting-outputs 13 | 14 | dependencies: 15 | open_file: ^3.0.1 16 | url_launcher: ^5.4.2 17 | font_awesome_flutter: ^8.8.1 18 | flutter_mobx: ^1.1.0 19 | mobx: ^1.1.1 20 | dio: ^3.0.9 21 | rxdart: 22 | flutter_modular: ^1.1.2 23 | json_annotation: ^3.0.1 24 | hive: ^1.4.1+1 25 | path_provider: ^1.6.5 26 | flutter: 27 | sdk: flutter 28 | 29 | dev_dependencies: 30 | mockito: ^4.1.1 31 | mobx_codegen: ^1.0.3 32 | build_runner: ^1.8.1 33 | json_serializable: ^3.3.0 34 | flutter_test: 35 | sdk: flutter 36 | 37 | flutter: 38 | uses-material-design: true 39 | assets: 40 | - assets/mocks/months.json 41 | - assets/mocks/payroll.json 42 | - assets/mocks/login.json -------------------------------------------------------------------------------- /teste/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /tests_example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /tests_example/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 | project.configurations.all { 28 | resolutionStrategy.eachDependency { details -> 29 | if (details.requested.group == 'com.android.support' 30 | && !details.requested.name.contains('multidex') ) { 31 | details.useVersion "27.1.1" 32 | } 33 | } 34 | } 35 | } 36 | 37 | task clean(type: Delete) { 38 | delete rootProject.buildDir 39 | } 40 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/payslip/services/payslip_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_modular/flutter_modular.dart'; 2 | import 'package:tests_example/app/modules/home/pages/payslip/models/month_model.dart'; 3 | import 'package:tests_example/app/modules/home/pages/payslip/models/payment_model.dart'; 4 | import 'package:tests_example/app/modules/home/pages/payslip/repositories/interfaces/payslip_repository_interface.dart'; 5 | 6 | import 'interfaces/payslip_service_interface.dart'; 7 | 8 | class PayslipService extends Disposable implements IPayslipService { 9 | IPayslipRepository _repository; 10 | 11 | PayslipService(this._repository); 12 | 13 | @override 14 | void dispose() {} 15 | 16 | @override 17 | Future> getMonth() async { 18 | return await _repository.getMonth(); 19 | } 20 | 21 | @override 22 | Future> getPayment() async { 23 | return await _repository.getPayment(); 24 | } 25 | 26 | @override 27 | Future downloadPdf(MonthModel month, PaymentModel payment) async { 28 | return await _repository.downloadPdf(month, payment); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/components/header/header_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class HeaderWidget extends StatelessWidget { 4 | final String title; 5 | final String subTitle; 6 | final TextStyle titleStyle; 7 | final TextStyle subtitleStyle; 8 | 9 | const HeaderWidget( 10 | {Key key, this.title, this.subTitle, this.subtitleStyle, this.titleStyle}) 11 | : super(key: key); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Column( 16 | mainAxisAlignment: MainAxisAlignment.start, 17 | crossAxisAlignment: CrossAxisAlignment.start, 18 | children: [ 19 | Text( 20 | title, 21 | style: titleStyle ?? 22 | TextStyle( 23 | fontSize: 32, 24 | fontWeight: FontWeight.bold, 25 | color: Colors.blue[800], 26 | ), 27 | ), 28 | Text( 29 | subTitle, 30 | style: subtitleStyle ?? 31 | TextStyle( 32 | fontWeight: FontWeight.bold, 33 | color: Colors.blue[600], 34 | ), 35 | ), 36 | ], 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/payslip/repositories/mocks/payslip_repository_mock.dart: -------------------------------------------------------------------------------- 1 | import 'package:mockito/mockito.dart'; 2 | import 'package:tests_example/app/modules/home/pages/payslip/models/month_model.dart'; 3 | import 'package:tests_example/app/modules/home/pages/payslip/models/payment_model.dart'; 4 | import 'package:tests_example/app/modules/home/pages/payslip/repositories/interfaces/payslip_repository_interface.dart'; 5 | import 'package:tests_example/app/shared/utils/utils.dart'; 6 | 7 | class PayslipRepositoryMock extends Mock implements IPayslipRepository { 8 | Future downloadPdf(MonthModel month, PaymentModel payment) async { 9 | return 'C:/teste'; 10 | } 11 | 12 | @override 13 | Future> getMonth() async { 14 | final json = await Utils.loadJsonAsset('months'); 15 | var result = 16 | json.map((json) => MonthModel.fromJson(json)).toList(); 17 | 18 | return result; 19 | } 20 | 21 | @override 22 | Future> getPayment() async { 23 | final json = await Utils.loadJsonAsset('payroll'); 24 | var result = 25 | json.map((json) => PaymentModel.fromJson(json)).toList(); 26 | 27 | return result; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /teste/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | teste 18 | 19 | 20 | 21 | 24 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tests_example/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | tests_example 18 | 19 | 20 | 21 | 24 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/repositories/mocks/user_repository_mock.dart: -------------------------------------------------------------------------------- 1 | import 'package:mockito/mockito.dart'; 2 | import 'package:tests_example/app/shared/models/authentication_model.dart'; 3 | import 'package:tests_example/app/shared/models/user_model.dart'; 4 | import 'package:tests_example/app/shared/repositories/interfaces/user_respository_interface.dart'; 5 | 6 | class UserRepositoryMock extends Mock implements IUserRepository { 7 | @override 8 | Future authenticate({AuthenticationModel model}) async { 9 | return UserModel( 10 | accessToken: 11 | 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6WyJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20iLCJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20iXSwianRpIjoiM2ZiN2U3OTYtOGQ2My00ZTZjLTgyZjEtZjNjODFkODI3NTNhIiwibmJmIjoxNTgyMTI2MDc5LCJleHAiOjE1ODIxNTQ4NzksImlhdCI6MTU4MjEyNjA3OSwiaXNzIjoiUmljYXJkbyBSb2RyaWd1ZXMiLCJhdWQiOiJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20ifQ.xKjlvPISEO-jg17yuGC8AFdikZ0A0KuXrahaVSMlEnSu1cqIIf4hk-X3-CPS8mA22-_0NLR6yHSqRDLxhQ9x7t-UbDHesJc6R_aKLsnHByHynTlSnh5vVwWbcjkuaj2VhpUBV9uwA1JxkSKATA_v6pmbO_k9vzIGE6KxhQYKDByg1S6oyFGF3bcIyBd1ekXkZkFMswdN0JVC0C31dBM5Hb358zkveaPDZe4p9kJePRcyQqwuy4Bgfi12OA4DW5ojfZhbRr4-yFeK8ejdVgtGa8xtlhNhCuIKg-GXKNAUFzHUJs95DzZh0Fo8Eru0aTE_l0IduODOfFxVo8rCyJj0-w', 12 | name: 'Toshi Ossada', 13 | userName: 'toshiossada', 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /teste/test/app/modules/home/home_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_modular/flutter_modular.dart'; 3 | import 'package:flutter_test/flutter_test.dart'; 4 | import 'package:flutter_modular/flutter_modular_test.dart'; 5 | import 'package:teste/app/modules/home/home_controller.dart'; 6 | import 'package:teste/app/modules/home/home_module.dart'; 7 | 8 | import 'package:teste/app/modules/home/home_page.dart'; 9 | 10 | main() { 11 | HomeController _homeController; 12 | setUp(() { 13 | initModules([HomeModule()]); 14 | _homeController = Modular.get(); 15 | }); 16 | 17 | group('Home Page Test', () { 18 | testWidgets('Aciona botão de incrementar uma vez e decrementar duas vezes', 19 | (WidgetTester tester) async { 20 | await tester.pumpWidget(buildTestableWidget(HomePage(title: 'Home'))); 21 | 22 | expect(find.text('0'), findsOneWidget); 23 | final decrement = find.byTooltip('Decrement'); 24 | final increment = find.byTooltip('Increment'); 25 | expect(decrement, findsOneWidget); 26 | expect(increment, findsOneWidget); 27 | 28 | await tester.tap(increment); 29 | await tester.tap(decrement); 30 | await tester.tap(decrement); 31 | await tester.pump(); 32 | expect(find.text('-1'), findsOneWidget); 33 | }); 34 | }); 35 | } 36 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/services/user_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_modular/flutter_modular.dart'; 2 | import 'package:tests_example/app/shared/models/authentication_model.dart'; 3 | import 'package:tests_example/app/shared/models/user_model.dart'; 4 | import 'package:tests_example/app/shared/repositories/interfaces/user_respository_interface.dart'; 5 | import 'package:tests_example/app/shared/services/interfaces/user_service_interface.dart'; 6 | 7 | import 'interfaces/user_storage_service_interface.dart'; 8 | 9 | class UserService extends Disposable implements IUserService { 10 | //dispose will be called automatically 11 | @override 12 | void dispose() {} 13 | 14 | final IUserRepository _userRepository; 15 | final IUserStorageService _storage; 16 | 17 | UserService(this._userRepository, this._storage); 18 | 19 | Future authenticate({AuthenticationModel model}) async { 20 | var res = await _userRepository.authenticate(model: model); 21 | 22 | var count = await _storage.count(); 23 | if (count > 0) await _storage.clear(); 24 | await _storage.add(res); 25 | 26 | return res; 27 | } 28 | 29 | Future getCurrentUser() async { 30 | var count = await _storage.count(); 31 | if (count > 0) { 32 | var user = await _storage.getAll(); 33 | return user.first; 34 | } 35 | 36 | return null; 37 | } 38 | 39 | logout() async { 40 | await _storage.clear(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/home_controller.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'home_controller.dart'; 4 | 5 | // ************************************************************************** 6 | // StoreGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: non_constant_identifier_names, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic 10 | 11 | mixin _$HomeController on _HomeControllerBase, Store { 12 | Computed> _$userComputed; 13 | 14 | @override 15 | Future get user => 16 | (_$userComputed ??= Computed>(() => super.user)).value; 17 | 18 | final _$userModelAtom = Atom(name: '_HomeControllerBase.userModel'); 19 | 20 | @override 21 | UserModel get userModel { 22 | _$userModelAtom.context.enforceReadPolicy(_$userModelAtom); 23 | _$userModelAtom.reportObserved(); 24 | return super.userModel; 25 | } 26 | 27 | @override 28 | set userModel(UserModel value) { 29 | _$userModelAtom.context.conditionallyRunInAction(() { 30 | super.userModel = value; 31 | _$userModelAtom.reportChanged(); 32 | }, _$userModelAtom, name: '${_$userModelAtom.name}_set'); 33 | } 34 | 35 | @override 36 | String toString() { 37 | final string = 38 | 'userModel: ${userModel.toString()},user: ${user.toString()}'; 39 | return '{$string}'; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/services/user_storage_service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_modular/flutter_modular.dart'; 2 | import 'package:tests_example/app/shared/models/user_model.dart'; 3 | import 'package:tests_example/app/shared/repositories/interfaces/user_local_storage_repository_interface.dart'; 4 | 5 | import 'interfaces/user_storage_service_interface.dart'; 6 | 7 | class UserStorageService extends Disposable implements IUserStorageService { 8 | final IUserLocalStorageRepository _userLocalStorageRepositoryRepository; 9 | UserStorageService(this._userLocalStorageRepositoryRepository); 10 | 11 | Future> getAll() async { 12 | return await _userLocalStorageRepositoryRepository.getAll(); 13 | } 14 | 15 | Future count() async { 16 | return await _userLocalStorageRepositoryRepository.count(); 17 | } 18 | 19 | Future get(int id) async { 20 | return await _userLocalStorageRepositoryRepository.get(id); 21 | } 22 | 23 | Future add(UserModel model) async { 24 | return await _userLocalStorageRepositoryRepository.add(model); 25 | } 26 | 27 | update(UserModel model) async { 28 | await _userLocalStorageRepositoryRepository.update(model); 29 | } 30 | 31 | remove(String username) async { 32 | await _userLocalStorageRepositoryRepository.remove(username); 33 | } 34 | 35 | clear() async { 36 | await _userLocalStorageRepositoryRepository.clear(); 37 | } 38 | 39 | @override 40 | void dispose() { 41 | // TODO: implement dispose 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /teste/lib/app/app_controller.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'app_controller.dart'; 4 | 5 | // ************************************************************************** 6 | // StoreGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: non_constant_identifier_names, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic 10 | 11 | mixin _$AppController on _AppControllerBase, Store { 12 | final _$valueAtom = Atom(name: '_AppControllerBase.value'); 13 | 14 | @override 15 | int get value { 16 | _$valueAtom.context.enforceReadPolicy(_$valueAtom); 17 | _$valueAtom.reportObserved(); 18 | return super.value; 19 | } 20 | 21 | @override 22 | set value(int value) { 23 | _$valueAtom.context.conditionallyRunInAction(() { 24 | super.value = value; 25 | _$valueAtom.reportChanged(); 26 | }, _$valueAtom, name: '${_$valueAtom.name}_set'); 27 | } 28 | 29 | final _$_AppControllerBaseActionController = 30 | ActionController(name: '_AppControllerBase'); 31 | 32 | @override 33 | void increment() { 34 | final _$actionInfo = _$_AppControllerBaseActionController.startAction(); 35 | try { 36 | return super.increment(); 37 | } finally { 38 | _$_AppControllerBaseActionController.endAction(_$actionInfo); 39 | } 40 | } 41 | 42 | @override 43 | String toString() { 44 | final string = 'value: ${value.toString()}'; 45 | return '{$string}'; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /teste/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 | teste 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 | -------------------------------------------------------------------------------- /teste/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 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/payslip/payslip_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:mobx/mobx.dart'; 2 | 3 | import 'models/month_model.dart'; 4 | import 'models/payment_model.dart'; 5 | import 'services/interfaces/payslip_service_interface.dart'; 6 | 7 | part 'payslip_controller.g.dart'; 8 | 9 | class PayslipController = _PayslipControllerBase with _$PayslipController; 10 | 11 | abstract class _PayslipControllerBase with Store { 12 | IPayslipService _payslipService; 13 | 14 | _PayslipControllerBase(this._payslipService); 15 | 16 | @observable 17 | MonthModel selectedMonth; 18 | @observable 19 | PaymentModel selectedPayment; 20 | @observable 21 | ObservableList months; 22 | @observable 23 | ObservableList payment; 24 | @observable 25 | bool loading = false; 26 | 27 | @action 28 | setSelectedMonth(v) { 29 | selectedMonth = v; 30 | } 31 | 32 | @action 33 | setLoading(v) { 34 | loading = v; 35 | } 36 | 37 | @action 38 | setSelectedPayment(v) { 39 | selectedPayment = v; 40 | } 41 | 42 | @action 43 | getMonth() async { 44 | var list = await _payslipService.getMonth(); 45 | months = list.asObservable(); 46 | if (list.isNotEmpty) selectedMonth = list.first; 47 | } 48 | 49 | @action 50 | getPayments() async { 51 | var list = await _payslipService.getPayment(); 52 | payment = list.asObservable(); 53 | if (list.isNotEmpty) selectedPayment = list.first; 54 | } 55 | 56 | @action 57 | downloadPdf() async { 58 | try { 59 | loading = true; 60 | return await _payslipService.downloadPdf(selectedMonth, selectedPayment); 61 | } catch (e) {} finally { 62 | loading = false; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /tests_example/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 | -------------------------------------------------------------------------------- /tests_example/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 | tests_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 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/components/master/master_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:tests_example/app/modules/home/components/header/header_widget.dart'; 3 | 4 | class MasterWidget extends StatelessWidget { 5 | final _formKey = GlobalKey(); 6 | final GlobalKey scaffoldKey; 7 | final Widget body; 8 | final String title; 9 | final String subTitle; 10 | final PreferredSizeWidget appBar; 11 | 12 | MasterWidget( 13 | {Key key, 14 | this.body, 15 | this.title, 16 | this.subTitle, 17 | this.scaffoldKey, 18 | this.appBar}) 19 | : super(key: key); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Scaffold( 24 | key: scaffoldKey ?? GlobalKey(), 25 | appBar: appBar ?? 26 | AppBar( 27 | backgroundColor: Colors.white, 28 | elevation: 0, 29 | ), 30 | backgroundColor: Colors.white, 31 | body: SingleChildScrollView( 32 | child: Padding( 33 | padding: const EdgeInsets.symmetric(horizontal: 50), 34 | child: Form( 35 | key: _formKey, 36 | child: Column( 37 | crossAxisAlignment: CrossAxisAlignment.start, 38 | mainAxisAlignment: MainAxisAlignment.center, 39 | children: [ 40 | HeaderWidget( 41 | title: title, 42 | subTitle: subTitle, 43 | ), 44 | SizedBox( 45 | height: 50, 46 | ), 47 | body 48 | ], 49 | ), 50 | ), 51 | ), 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/repositories/user_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_modular/flutter_modular.dart'; 2 | import 'package:tests_example/app/shared/custom_dio/custom_dio.dart'; 3 | import 'package:tests_example/app/shared/models/user_model.dart'; 4 | import 'package:tests_example/app/shared/models/authentication_model.dart'; 5 | import 'package:tests_example/app/shared/repositories/interfaces/user_respository_interface.dart'; 6 | 7 | class UserRepository extends Disposable implements IUserRepository { 8 | final CustomDio _dio; 9 | final String controllerName = '/messages'; 10 | UserRepository(this._dio); 11 | 12 | @override 13 | void dispose() {} 14 | 15 | @override 16 | Future authenticate({AuthenticationModel model}) async { 17 | // var url = '$controllerName/authenticated'; 18 | // var response = await dio.client.post(url, data: model); 19 | 20 | // return UserModel.fromJson(response.data['data']); 21 | 22 | var result = UserModel( 23 | accessToken: 24 | 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6WyJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20iLCJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20iXSwianRpIjoiM2ZiN2U3OTYtOGQ2My00ZTZjLTgyZjEtZjNjODFkODI3NTNhIiwibmJmIjoxNTgyMTI2MDc5LCJleHAiOjE1ODIxNTQ4NzksImlhdCI6MTU4MjEyNjA3OSwiaXNzIjoiUmljYXJkbyBSb2RyaWd1ZXMiLCJhdWQiOiJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20ifQ.xKjlvPISEO-jg17yuGC8AFdikZ0A0KuXrahaVSMlEnSu1cqIIf4hk-X3-CPS8mA22-_0NLR6yHSqRDLxhQ9x7t-UbDHesJc6R_aKLsnHByHynTlSnh5vVwWbcjkuaj2VhpUBV9uwA1JxkSKATA_v6pmbO_k9vzIGE6KxhQYKDByg1S6oyFGF3bcIyBd1ekXkZkFMswdN0JVC0C31dBM5Hb358zkveaPDZe4p9kJePRcyQqwuy4Bgfi12OA4DW5ojfZhbRr4-yFeK8ejdVgtGa8xtlhNhCuIKg-GXKNAUFzHUJs95DzZh0Fo8Eru0aTE_l0IduODOfFxVo8rCyJj0-w', 25 | name: 'Toshi Ossada', 26 | userName: 'toshiossada@gmail.com', 27 | ); 28 | 29 | return result; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /teste/lib/app/modules/home/home_controller.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'home_controller.dart'; 4 | 5 | // ************************************************************************** 6 | // StoreGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: non_constant_identifier_names, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic 10 | 11 | mixin _$HomeController on _HomeControllerBase, Store { 12 | final _$valueAtom = Atom(name: '_HomeControllerBase.value'); 13 | 14 | @override 15 | int get value { 16 | _$valueAtom.context.enforceReadPolicy(_$valueAtom); 17 | _$valueAtom.reportObserved(); 18 | return super.value; 19 | } 20 | 21 | @override 22 | set value(int value) { 23 | _$valueAtom.context.conditionallyRunInAction(() { 24 | super.value = value; 25 | _$valueAtom.reportChanged(); 26 | }, _$valueAtom, name: '${_$valueAtom.name}_set'); 27 | } 28 | 29 | final _$_HomeControllerBaseActionController = 30 | ActionController(name: '_HomeControllerBase'); 31 | 32 | @override 33 | void increment() { 34 | final _$actionInfo = _$_HomeControllerBaseActionController.startAction(); 35 | try { 36 | return super.increment(); 37 | } finally { 38 | _$_HomeControllerBaseActionController.endAction(_$actionInfo); 39 | } 40 | } 41 | 42 | @override 43 | void decrement() { 44 | final _$actionInfo = _$_HomeControllerBaseActionController.startAction(); 45 | try { 46 | return super.decrement(); 47 | } finally { 48 | _$_HomeControllerBaseActionController.endAction(_$actionInfo); 49 | } 50 | } 51 | 52 | @override 53 | String toString() { 54 | final string = 'value: ${value.toString()}'; 55 | return '{$string}'; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/login/components/password_field/password_field_controller.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'password_field_controller.dart'; 4 | 5 | // ************************************************************************** 6 | // StoreGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: non_constant_identifier_names, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic 10 | 11 | mixin _$PasswordFieldController on _PasswordFieldControllerBase, Store { 12 | final _$passwordVisibleAtom = 13 | Atom(name: '_PasswordFieldControllerBase.passwordVisible'); 14 | 15 | @override 16 | bool get passwordVisible { 17 | _$passwordVisibleAtom.context.enforceReadPolicy(_$passwordVisibleAtom); 18 | _$passwordVisibleAtom.reportObserved(); 19 | return super.passwordVisible; 20 | } 21 | 22 | @override 23 | set passwordVisible(bool value) { 24 | _$passwordVisibleAtom.context.conditionallyRunInAction(() { 25 | super.passwordVisible = value; 26 | _$passwordVisibleAtom.reportChanged(); 27 | }, _$passwordVisibleAtom, name: '${_$passwordVisibleAtom.name}_set'); 28 | } 29 | 30 | final _$_PasswordFieldControllerBaseActionController = 31 | ActionController(name: '_PasswordFieldControllerBase'); 32 | 33 | @override 34 | dynamic setVisibility(bool v) { 35 | final _$actionInfo = 36 | _$_PasswordFieldControllerBaseActionController.startAction(); 37 | try { 38 | return super.setVisibility(v); 39 | } finally { 40 | _$_PasswordFieldControllerBaseActionController.endAction(_$actionInfo); 41 | } 42 | } 43 | 44 | @override 45 | String toString() { 46 | final string = 'passwordVisible: ${passwordVisible.toString()}'; 47 | return '{$string}'; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/login/login_controller.dart: -------------------------------------------------------------------------------- 1 | import 'package:mobx/mobx.dart'; 2 | import 'package:tests_example/app/shared/models/authentication_model.dart'; 3 | import 'package:tests_example/app/shared/models/user_model.dart'; 4 | import 'package:tests_example/app/shared/services/interfaces/user_service_interface.dart'; 5 | 6 | part 'login_controller.g.dart'; 7 | 8 | class LoginController = _LoginControllerBase with _$LoginController; 9 | 10 | abstract class _LoginControllerBase with Store { 11 | IUserService _userService; 12 | 13 | _LoginControllerBase(this._userService) { 14 | user = null; 15 | } 16 | 17 | @observable 18 | UserModel user; 19 | @observable 20 | String email; 21 | @observable 22 | String password; 23 | @computed 24 | bool get hasUser => (user?.userName ?? '').isNotEmpty; 25 | 26 | AuthenticationModel getAuthentication() => 27 | AuthenticationModel(login: email, password: password); 28 | 29 | @action 30 | authentication({AuthenticationModel authentication}) async { 31 | try { 32 | if (authentication.login.isEmpty || authentication.password.isEmpty) 33 | user = UserModel(); 34 | else 35 | user = await _userService.authenticate(model: authentication); 36 | } catch (e) { 37 | user = UserModel(); 38 | } 39 | } 40 | 41 | @action 42 | logOut() async { 43 | user = await _userService.logout(); 44 | user = UserModel(); 45 | } 46 | 47 | @action 48 | getUser() async { 49 | try { 50 | user = await _userService.getCurrentUser() ?? UserModel(); 51 | } catch (e) { 52 | user = UserModel(); 53 | } 54 | } 55 | 56 | @observable 57 | bool loading = false; 58 | 59 | @action 60 | void setLoading(bool v) => loading = v; 61 | 62 | @action 63 | void setLogin(String v) => user.userName = v; 64 | @action 65 | void setPassword(String v) => user.userName = v; 66 | } 67 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/payslip/repositories/payslip_repository.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter_modular/flutter_modular.dart'; 4 | import 'package:path_provider/path_provider.dart'; 5 | import 'package:tests_example/app/modules/home/pages/payslip/models/month_model.dart'; 6 | import 'package:tests_example/app/modules/home/pages/payslip/models/payment_model.dart'; 7 | import 'package:tests_example/app/shared/custom_dio/custom_dio.dart'; 8 | 9 | import 'interfaces/payslip_repository_interface.dart'; 10 | 11 | class PayslipRepository extends Disposable implements IPayslipRepository { 12 | final CustomDio _dio; 13 | final String controllerName = '/payslip'; 14 | PayslipRepository(this._dio); 15 | @override 16 | void dispose() {} 17 | 18 | @override 19 | Future> getMonth() async { 20 | var months = [ 21 | MonthModel(id: 1, month: 1, year: 2020), 22 | MonthModel(id: 2, month: 2, year: 2020), 23 | ]; 24 | return months; 25 | } 26 | 27 | @override 28 | Future> getPayment() async { 29 | var payments = [ 30 | PaymentModel(id: 1, description: '01 - Pagamento mensal'), 31 | PaymentModel(id: 2, description: '02 - Pagamento anual'), 32 | ]; 33 | return payments; 34 | } 35 | 36 | Future downloadPdf(MonthModel month, PaymentModel payment) async { 37 | Directory appDocDir = await getApplicationDocumentsDirectory(); 38 | String appDocPath = '${appDocDir.path}/holerite.pdf'; 39 | await _dio.client.download( 40 | 'http://www.rrsantos.com.br/holerite/holerite.pdf', 41 | appDocPath, 42 | onReceiveProgress: _showDownloadProgress, 43 | deleteOnError: true, 44 | ); 45 | 46 | return appDocPath; 47 | } 48 | 49 | void _showDownloadProgress(received, total) { 50 | if (total != -1) { 51 | print((received / total * 100).toStringAsFixed(0) + "%"); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /tests_example/test/app/modules/home/home_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_modular/flutter_modular.dart'; 3 | import 'package:flutter_test/flutter_test.dart'; 4 | import 'package:flutter_modular/flutter_modular_test.dart'; 5 | import 'package:tests_example/app/app_module.dart'; 6 | import 'package:tests_example/app/modules/home/home_module.dart'; 7 | 8 | import 'package:tests_example/app/modules/home/home_page.dart'; 9 | import 'package:tests_example/app/modules/home/pages/login/login_controller.dart'; 10 | import 'package:tests_example/app/shared/models/authentication_model.dart'; 11 | import 'package:tests_example/app/shared/repositories/interfaces/user_local_storage_repository_interface.dart'; 12 | import 'package:tests_example/app/shared/repositories/interfaces/user_respository_interface.dart'; 13 | import 'package:tests_example/app/shared/repositories/mocks/user_local_storage_repository_mock.dart'; 14 | import 'package:tests_example/app/shared/repositories/mocks/user_repository_mock.dart'; 15 | 16 | main() { 17 | LoginController loginController; 18 | setUp(() async { 19 | initModule(AppModule(), changeBinds: [ 20 | Bind( 21 | (i) => UserLocalStorageRepositoryMock()), 22 | Bind((i) => UserRepositoryMock()), 23 | ]); 24 | 25 | initModule(HomeModule()); 26 | loginController = Modular.get(); 27 | await loginController.authentication( 28 | authentication: 29 | AuthenticationModel(login: 'Toshi Ossada', password: '123456')); 30 | }); 31 | 32 | group('PayslipPage Tests', () { 33 | testWidgets('PayslipPage has title', (WidgetTester tester) async { 34 | await tester.pumpWidget(buildTestableWidget(HomePage())); 35 | await tester.pump(); 36 | final titleFinder = find.text('${loginController.user.name},'); 37 | expect(titleFinder, findsOneWidget); 38 | }); 39 | }); 40 | } 41 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/login/components/login_button/login_button_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:tests_example/app/modules/home/components/loading/loading_widget.dart'; 5 | import 'package:tests_example/app/modules/home/pages/login/components/circular_button/circular_button_widget.dart'; 6 | 7 | import '../../login_controller.dart'; 8 | 9 | class LoginButtonWidget extends StatelessWidget { 10 | final LoginController _controller = Modular.get(); 11 | final Function onError; 12 | 13 | LoginButtonWidget({Key key, this.onError}) : super(key: key); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Container( 18 | child: Observer( 19 | builder: (_) => _controller.loading 20 | ? LoadingWidget() 21 | : CircularButtonWidget( 22 | width: MediaQuery.of(context).size.width - 100, 23 | backgroundColor: Colors.blue[800], 24 | label: "Acessar", 25 | icon: Icon( 26 | Icons.done, 27 | color: Colors.white, 28 | ), 29 | onTap: () async { 30 | try { 31 | _controller.setLoading(true); 32 | var user = _controller.getAuthentication(); 33 | await _controller.authentication(authentication: user); 34 | 35 | if (_controller.hasUser) 36 | Modular.to.pushReplacementNamed('/home'); 37 | else 38 | onError(); 39 | } catch (e) { 40 | onError(); 41 | } finally { 42 | _controller.setLoading(false); 43 | } 44 | }, 45 | ), 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /teste/lib/app/modules/home/home_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 | import 'home_controller.dart'; 5 | 6 | class HomePage extends StatefulWidget { 7 | final String title; 8 | const HomePage({Key key, this.title = "Home"}) : super(key: key); 9 | 10 | @override 11 | _HomePageState createState() => _HomePageState(); 12 | } 13 | 14 | class _HomePageState extends ModularState { 15 | //use 'controller' variable to access controller 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | appBar: AppBar( 21 | title: Text(widget.title), 22 | ), 23 | body: Center( 24 | child: Column( 25 | mainAxisAlignment: MainAxisAlignment.center, 26 | children: [ 27 | Text( 28 | 'You have pushed the button this many times:', 29 | ), 30 | Observer( 31 | builder: (_) { 32 | return Text( 33 | '${controller.value}', 34 | style: Theme.of(context).textTheme.headline4, 35 | ); 36 | }, 37 | ), 38 | ], 39 | ), 40 | ), 41 | floatingActionButton: Row( 42 | mainAxisAlignment: MainAxisAlignment.end, 43 | children: [ 44 | FloatingActionButton( 45 | onPressed: controller.decrement, 46 | tooltip: 'Decrement', 47 | child: Icon(Icons.remove), 48 | ), 49 | SizedBox( 50 | width: 50, 51 | ), 52 | FloatingActionButton( 53 | onPressed: controller.increment, 54 | tooltip: 'Increment', 55 | child: Icon(Icons.add), 56 | ), 57 | ], 58 | )); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tests_example/test/app/modules/home/pages/login/login_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_modular/flutter_modular.dart'; 3 | import 'package:flutter_test/flutter_test.dart'; 4 | import 'package:flutter_modular/flutter_modular_test.dart'; 5 | import 'package:tests_example/app/app_module.dart'; 6 | import 'package:tests_example/app/modules/home/home_module.dart'; 7 | 8 | import 'package:tests_example/app/modules/home/pages/login/login_page.dart'; 9 | import 'package:tests_example/app/shared/repositories/interfaces/user_local_storage_repository_interface.dart'; 10 | import 'package:tests_example/app/shared/repositories/interfaces/user_respository_interface.dart'; 11 | import 'package:tests_example/app/shared/repositories/mocks/user_local_storage_repository_mock.dart'; 12 | import 'package:tests_example/app/shared/repositories/mocks/user_repository_mock.dart'; 13 | 14 | main() { 15 | setUp(() { 16 | initModule(AppModule(), changeBinds: [ 17 | Bind( 18 | (i) => UserLocalStorageRepositoryMock()), 19 | Bind((i) => UserRepositoryMock()), 20 | ]); 21 | initModule(HomeModule()); 22 | }); 23 | 24 | group('LoginPage tests', () { 25 | testWidgets('LoginPage has Welcome', (WidgetTester tester) async { 26 | await tester.pumpWidget(buildTestableWidget(LoginPage())); 27 | await tester.pump(); 28 | final titleFinder = find.widgetWithText(Text, 'Bem Vindo!'); 29 | 30 | expect(titleFinder, findsNothing); 31 | }); 32 | testWidgets('Test login', (WidgetTester tester) async { 33 | await tester.pumpWidget(buildTestableWidget(LoginPage())); 34 | await tester.pump(); 35 | 36 | final btnAcessar = find.byType(InkWell); 37 | expect(btnAcessar, findsOneWidget); 38 | await tester.pump(); 39 | await tester.tap(btnAcessar); 40 | await tester.pump(); 41 | expect(find.text('Usuário ou senha invalidos'), findsOneWidget); 42 | }); 43 | }); 44 | } 45 | -------------------------------------------------------------------------------- /teste/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 28 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.teste" 42 | minSdkVersion 16 43 | targetSdkVersion 28 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 | -------------------------------------------------------------------------------- /tests_example/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 28 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.tests_example" 42 | minSdkVersion 16 43 | targetSdkVersion 28 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 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/home_module.dart: -------------------------------------------------------------------------------- 1 | import 'package:tests_example/app/modules/home/pages/payslip/repositories/payslip_repository.dart'; 2 | import 'package:tests_example/app/modules/home/pages/payslip/services/payslip_service.dart'; 3 | import 'package:tests_example/app/modules/home/pages/login/components/password_field/password_field_controller.dart'; 4 | import 'package:tests_example/app/modules/home/pages/login/login_controller.dart'; 5 | import 'package:tests_example/app/modules/home/pages/payslip/payslip_controller.dart'; 6 | import 'package:tests_example/app/modules/home/home_controller.dart'; 7 | import 'package:flutter_modular/flutter_modular.dart'; 8 | import 'package:tests_example/app/modules/home/home_page.dart'; 9 | import 'package:tests_example/app/shared/custom_dio/custom_dio.dart'; 10 | import 'package:tests_example/app/shared/services/interfaces/user_service_interface.dart'; 11 | 12 | import '../../app_module.dart'; 13 | import 'pages/login/login_page.dart'; 14 | import 'pages/payslip/payslip_page.dart'; 15 | import 'pages/payslip/repositories/interfaces/payslip_repository_interface.dart'; 16 | import 'pages/payslip/services/interfaces/payslip_service_interface.dart'; 17 | 18 | class HomeModule extends ChildModule { 19 | @override 20 | List get binds => [ 21 | Bind( 22 | (i) => PayslipRepository(AppModule.to.get())), 23 | Bind( 24 | (i) => PayslipService(i.get())), 25 | Bind((i) => PasswordFieldController()), 26 | Bind((i) => LoginController(AppModule.to.get())), 27 | Bind((i) => PayslipController(i.get())), 28 | Bind((i) => HomeController(AppModule.to.get())), 29 | ]; 30 | 31 | @override 32 | List get routers => [ 33 | Router(Modular.initialRoute, child: (_, args) => LoginPage()), 34 | Router('/home', child: (_, args) => HomePage()), 35 | Router('/payslip', child: (_, args) => PayslipPage()), 36 | ]; 37 | 38 | static Inject get to => Inject.of(); 39 | } 40 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/repositories/user_local_storage_repository.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter_modular/flutter_modular.dart'; 4 | import 'package:hive/hive.dart'; 5 | import 'package:tests_example/app/shared/models/user_model.dart'; 6 | import 'package:path_provider/path_provider.dart'; 7 | 8 | import 'interfaces/user_local_storage_repository_interface.dart'; 9 | 10 | class UserLocalStorageRepository extends Disposable 11 | implements IUserLocalStorageRepository { 12 | Completer _completer = Completer(); 13 | 14 | @override 15 | Future dispose() async { 16 | final box = await _completer.future; 17 | box.close(); 18 | } 19 | 20 | UserLocalStorageRepository() { 21 | _initDb(); 22 | } 23 | 24 | _initDb() async { 25 | final directory = await getApplicationDocumentsDirectory(); 26 | Hive.init(directory.path); 27 | 28 | final box = await Hive.openBox('current_user'); 29 | if (!_completer.isCompleted) _completer.complete(box); 30 | } 31 | 32 | Future> getAll() async { 33 | final box = await _completer.future; 34 | 35 | return box.values 36 | .map((item) => UserModel.fromJson(Map.from(item))) 37 | .toList(); 38 | } 39 | 40 | Future count() async { 41 | final box = await _completer.future; 42 | return box.values.length; 43 | } 44 | 45 | Future get(int id) async { 46 | final box = await _completer.future; 47 | return UserModel.fromJson(box.get(id)); 48 | } 49 | 50 | Future add(UserModel model) async { 51 | final box = await _completer.future; 52 | await box.put(model.userName, model.toJson()); 53 | 54 | return model; 55 | } 56 | 57 | update(UserModel model) async { 58 | final box = await _completer.future; 59 | box.put(model.userName, model.toJson()); 60 | } 61 | 62 | remove(String userName) async { 63 | final box = await _completer.future; 64 | await box.delete(userName); 65 | } 66 | 67 | clear() async { 68 | final box = await _completer.future; 69 | await box.clear(); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/login/components/circular_button/circular_button_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: Row( 44 | mainAxisAlignment: MainAxisAlignment.center, 45 | children: [ 46 | icon == null ? Container() : drawIcon(), 47 | Text( 48 | label, 49 | style: 50 | TextStyle(color: textColor, fontWeight: FontWeight.bold), 51 | textAlign: TextAlign.center, 52 | ), 53 | ], 54 | ), 55 | ), 56 | ), 57 | ), 58 | ); 59 | } 60 | 61 | Widget drawIcon() { 62 | return Row( 63 | children: [ 64 | icon, 65 | SizedBox(width: 10), 66 | ], 67 | ); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /tests_example/lib/app/app_module.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:tests_example/app/shared/custom_dio/custom_dio.dart'; 3 | import 'package:tests_example/app/shared/services/interfaces/user_storage_service_interface.dart'; 4 | import 'package:tests_example/app/shared/services/user_storage_service.dart'; 5 | import 'package:tests_example/app/shared/repositories/user_local_storage_repository.dart'; 6 | import 'package:tests_example/app/shared/repositories/user_repository.dart'; 7 | import 'package:tests_example/app/shared/services/user_service.dart'; 8 | import 'package:tests_example/app/app_controller.dart'; 9 | import 'package:flutter_modular/flutter_modular.dart'; 10 | import 'package:flutter/material.dart'; 11 | import 'package:tests_example/app/app_widget.dart'; 12 | import 'package:tests_example/app/modules/home/home_module.dart'; 13 | import 'package:tests_example/app/shared/utils/settings.dart'; 14 | 15 | import 'shared/repositories/interfaces/user_local_storage_repository_interface.dart'; 16 | import 'shared/repositories/interfaces/user_respository_interface.dart'; 17 | import 'shared/repositories/mocks/user_repository_mock.dart'; 18 | import 'shared/services/interfaces/user_service_interface.dart'; 19 | 20 | class AppModule extends MainModule { 21 | @override 22 | List get binds => [ 23 | Bind( 24 | (i) => UserStorageService(i.get())), 25 | Bind((i) => UserLocalStorageRepository()), 26 | Bind((i) => UserRepositoryMock()), 27 | Bind((i) => UserService( 28 | i.get(), 29 | i.get(), 30 | )), 31 | Bind((i) => AppController()), 32 | Bind((i) => Dio(BaseOptions(baseUrl: Settings.apiUrl))), 33 | Bind((i) => CustomDio(i.get())), 34 | ]; 35 | 36 | @override 37 | List get routers => [ 38 | Router(Modular.initialRoute, module: HomeModule()), 39 | ]; 40 | 41 | @override 42 | Widget get bootstrap => AppWidget(); 43 | 44 | static Inject get to => Inject.of(); 45 | } 46 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/login/components/password_field/password_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 | import 'package:tests_example/app/modules/home/pages/login/components/password_field/password_field_controller.dart'; 6 | import 'package:tests_example/app/modules/home/pages/login/components/rounded_text_field/rounded_text_field_widget.dart'; 7 | 8 | class PasswordFieldWidget extends StatelessWidget { 9 | final PasswordFieldController _passwordFieldController = Modular.get(); 10 | final Function onChanged; 11 | final String label; 12 | final Function validator; 13 | final Color fontColor; 14 | final Color backgroundColor; 15 | final Color labelStyleColor; 16 | final bool showBorder; 17 | final Key key; 18 | 19 | PasswordFieldWidget( 20 | {this.onChanged, 21 | @required this.label, 22 | this.validator, 23 | this.fontColor, 24 | this.backgroundColor, 25 | this.labelStyleColor, 26 | this.showBorder, 27 | this.key}); 28 | @override 29 | Widget build(BuildContext context) { 30 | return Container( 31 | child: Observer( 32 | builder: (_) => RoundedTextFieldWidget( 33 | key: key, 34 | showBorder: showBorder, 35 | labelText: label, 36 | fontColor: fontColor, 37 | backgroundColor: backgroundColor, 38 | obscureText: !_passwordFieldController.passwordVisible, 39 | onChanged: onChanged, 40 | validator: validator, 41 | labelStyleColor: labelStyleColor, 42 | suffixIcon: IconButton( 43 | onPressed: () { 44 | _passwordFieldController.passwordVisible = 45 | !_passwordFieldController.passwordVisible; 46 | }, 47 | icon: Icon( 48 | _passwordFieldController.passwordVisible 49 | ? FontAwesomeIcons.eyeSlash 50 | : FontAwesomeIcons.eye, 51 | color: labelStyleColor, 52 | ), 53 | ), 54 | ), 55 | ), 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/login/components/rounded_text_field/rounded_text_field_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class RoundedTextFieldWidget extends StatelessWidget { 4 | final Function onSaved; 5 | final Function validator; 6 | final Function onTap; 7 | final Function onChanged; 8 | final String labelText; 9 | final String initialValue; 10 | final TextEditingController controller; 11 | final bool readOnly; 12 | final bool obscureText; 13 | final int maxLines; 14 | final Color backgroundColor; 15 | final Color fontColor; 16 | final Widget suffixIcon; 17 | final Color labelStyleColor; 18 | final bool showBorder; 19 | final Key key; 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.obscureText = false, 30 | this.readOnly = false, 31 | this.maxLines = 1, 32 | this.backgroundColor = Colors.transparent, 33 | this.labelStyleColor, 34 | @required this.fontColor, 35 | this.initialValue, 36 | this.showBorder, 37 | @required this.key, 38 | }); 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | return Container( 43 | decoration: BoxDecoration( 44 | color: backgroundColor, 45 | borderRadius: BorderRadius.all(Radius.circular(10))), 46 | child: TextFormField( 47 | readOnly: readOnly, 48 | key: key, 49 | controller: this.controller, 50 | obscureText: this.obscureText, 51 | keyboardType: TextInputType.text, 52 | maxLines: this.maxLines, 53 | style: TextStyle(color: fontColor), 54 | decoration: InputDecoration( 55 | contentPadding: const EdgeInsets.all(10.0), 56 | border: showBorder ? null : InputBorder.none, 57 | suffixIcon: suffixIcon, 58 | fillColor: Colors.greenAccent, 59 | labelText: this.labelText, 60 | labelStyle: TextStyle( 61 | color: labelStyleColor == null 62 | ? Theme.of(context).accentColor 63 | : labelStyleColor, 64 | fontWeight: FontWeight.w400, 65 | fontSize: 16, 66 | ), 67 | ), 68 | validator: this.validator, 69 | onTap: onTap, 70 | onSaved: this.onSaved ?? (v) {}, 71 | onChanged: this.onChanged ?? (v) {}, 72 | ), 73 | ); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /teste/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 | -------------------------------------------------------------------------------- /tests_example/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 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_modular/flutter_modular.dart'; 3 | import 'components/header/header_widget.dart'; 4 | import 'components/master/master_widget.dart'; 5 | import 'home_controller.dart'; 6 | import 'pages/login/login_controller.dart'; 7 | 8 | class HomePage extends StatefulWidget { 9 | final String title; 10 | const HomePage({Key key, this.title = "Home"}) : super(key: key); 11 | 12 | @override 13 | _HomePageState createState() => _HomePageState(); 14 | } 15 | 16 | class _HomePageState extends ModularState { 17 | final LoginController _controller = Modular.get(); 18 | @override 19 | Widget build(BuildContext context) { 20 | return MasterWidget( 21 | title: '${_controller.user.name},', 22 | subTitle: 'Abaixo temos suas opções:', 23 | appBar: AppBar( 24 | backgroundColor: Colors.transparent, 25 | elevation: 0, 26 | actions: [ 27 | IconButton( 28 | icon: Icon( 29 | Icons.exit_to_app, 30 | size: 30, 31 | color: Colors.blue[800], 32 | ), 33 | onPressed: () async { 34 | await _controller.logOut(); 35 | Modular.to.pushReplacementNamed('/'); 36 | }, 37 | ), 38 | ], 39 | ), 40 | body: Container( 41 | child: ListView( 42 | scrollDirection: Axis.vertical, 43 | shrinkWrap: true, 44 | children: [ 45 | ListTile( 46 | contentPadding: EdgeInsets.symmetric(vertical: 10), 47 | title: HeaderWidget( 48 | title: 'Holerites', 49 | subtitleStyle: TextStyle(color: Colors.grey), 50 | subTitle: 51 | 'Encontre seus holerites informando o periodo e o tipo', 52 | ), 53 | onTap: () { 54 | Modular.to.pushNamed('/payslip'); 55 | }, 56 | ), 57 | ListTile( 58 | contentPadding: EdgeInsets.symmetric(vertical: 10), 59 | title: HeaderWidget( 60 | title: 'Comprovante de residência', 61 | subtitleStyle: TextStyle(color: Colors.grey), 62 | titleStyle: TextStyle( 63 | fontSize: 22, 64 | color: Colors.blue[800], 65 | ), 66 | subTitle: 67 | 'Encontre seus holerites informando o periodo e o tipo', 68 | ), 69 | onTap: () {}, 70 | ), 71 | ], 72 | ), 73 | ), 74 | ); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /teste/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /tests_example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /tests_example/lib/app/shared/custom_dio/custom_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:flutter_modular/flutter_modular.dart'; 3 | import 'package:tests_example/app/shared/models/authentication_model.dart'; 4 | import 'package:tests_example/app/shared/services/interfaces/user_service_interface.dart'; 5 | 6 | import 'custom_dio.dart'; 7 | 8 | class CustomInterceptors extends InterceptorsWrapper { 9 | @override 10 | Future onRequest(RequestOptions options) async { 11 | IUserService userService = Modular.get(); 12 | CustomDio dio = Modular.get(); 13 | var user = await userService.getCurrentUser(); 14 | if (user != null) { 15 | if (options.headers['Authorization'] == null) { 16 | dio.client.lock(); 17 | 18 | options.headers.addAll({"Authorization": 'Bearer ${user.accessToken}'}); 19 | 20 | dio.client.unlock(); 21 | } 22 | } 23 | print( 24 | 'URL ${options.baseUrl} - Request[${options.method}] => PATH: ${options.path} : '); 25 | if (options.data != null) print(options.data.toJson()); 26 | print('Authorization: ${options.headers['Authorization']}'); 27 | 28 | // TODO: implement onRequest 29 | return super.onRequest(options); 30 | } 31 | 32 | @override 33 | Future onResponse(Response response) { 34 | print('Response[${response.statusCode}] => PATH: ${response.request.path}'); 35 | 36 | // TODO: implement onResponse 37 | return super.onResponse(response); 38 | } 39 | 40 | @override 41 | Future onError(DioError e) async { 42 | //print('Response[${e.response.statusCode}] => PATH: ${e.request.path}'); 43 | IUserService userService = Modular.get(); 44 | var user = await userService.getCurrentUser(); 45 | 46 | if (user != null && e.response.statusCode == 401) { 47 | CustomDio dio = Modular.get(); 48 | 49 | var options = e.response.request; 50 | 51 | if (user.accessToken == options.headers['Authorization']) { 52 | options.headers['Authorization'] = user.accessToken; 53 | return dio.client.request(options.path, options: options); 54 | } 55 | dio.client.lock(); 56 | dio.client.interceptors.responseLock.lock(); 57 | dio.client.interceptors.errorLock.lock(); 58 | 59 | return userService 60 | .authenticate( 61 | model: AuthenticationModel( 62 | login: user.userName, password: user.userName)) 63 | .then((d) { 64 | options.headers['Authorization'] = d.accessToken; 65 | }).whenComplete(() { 66 | dio.client.unlock(); 67 | dio.client.interceptors.responseLock.unlock(); 68 | dio.client.interceptors.errorLock.unlock(); 69 | }).then((e) => dio.client.request(options.path, options: options)); 70 | } else { 71 | throw e.response.data[0] ?? e.response.data['errorMessage']; 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /teste/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 | -------------------------------------------------------------------------------- /tests_example/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 | -------------------------------------------------------------------------------- /teste/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: teste 2 | description: A new Flutter project. 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 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | dio: ^3.0.9 25 | flutter_mobx: ^1.1.0 26 | mobx: ^1.1.1 27 | flutter_modular: ^1.1.2 28 | flutter: 29 | sdk: flutter 30 | 31 | 32 | # The following adds the Cupertino Icons font to your application. 33 | # Use with the CupertinoIcons class for iOS style icons. 34 | 35 | dev_dependencies: 36 | mockito: ^4.1.1 37 | mobx_codegen: ^1.0.3 38 | build_runner: ^1.8.1 39 | flutter_test: 40 | sdk: flutter 41 | 42 | # For information on the generic Dart part of this file, see the 43 | # following page: https://dart.dev/tools/pub/pubspec 44 | 45 | # The following section is specific to Flutter. 46 | flutter: 47 | 48 | # The following line ensures that the Material Icons font is 49 | # included with your application, so that you can use the icons in 50 | # the material Icons class. 51 | uses-material-design: true 52 | 53 | # To add assets to your application, add an assets section, like this: 54 | # assets: 55 | # - images/a_dot_burr.jpeg 56 | # - images/a_dot_ham.jpeg 57 | 58 | # An image asset can refer to one or more resolution-specific "variants", see 59 | # https://flutter.dev/assets-and-images/#resolution-aware. 60 | 61 | # For details regarding adding assets from package dependencies, see 62 | # https://flutter.dev/assets-and-images/#from-packages 63 | 64 | # To add custom fonts to your application, add a fonts section here, 65 | # in this "flutter" section. Each entry in this list should have a 66 | # "family" key with the font family name, and a "fonts" key with a 67 | # list giving the asset and other descriptors for the font. For 68 | # example: 69 | # fonts: 70 | # - family: Schyler 71 | # fonts: 72 | # - asset: fonts/Schyler-Regular.ttf 73 | # - asset: fonts/Schyler-Italic.ttf 74 | # style: italic 75 | # - family: Trajan Pro 76 | # fonts: 77 | # - asset: fonts/TrajanPro.ttf 78 | # - asset: fonts/TrajanPro_Bold.ttf 79 | # weight: 700 80 | # 81 | # For details regarding fonts from package dependencies, 82 | # see https://flutter.dev/custom-fonts/#from-packages -------------------------------------------------------------------------------- /tests_example/lib/app/shared/repositories/mocks/user_local_storage_repository_mock.dart: -------------------------------------------------------------------------------- 1 | import 'package:mockito/mockito.dart'; 2 | import 'package:tests_example/app/shared/models/user_model.dart'; 3 | import 'package:tests_example/app/shared/repositories/interfaces/user_local_storage_repository_interface.dart'; 4 | 5 | class UserLocalStorageRepositoryMock extends Mock 6 | implements IUserLocalStorageRepository { 7 | @override 8 | Future> getAll() async { 9 | return [ 10 | UserModel( 11 | accessToken: 12 | 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6WyJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20iLCJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20iXSwianRpIjoiM2ZiN2U3OTYtOGQ2My00ZTZjLTgyZjEtZjNjODFkODI3NTNhIiwibmJmIjoxNTgyMTI2MDc5LCJleHAiOjE1ODIxNTQ4NzksImlhdCI6MTU4MjEyNjA3OSwiaXNzIjoiUmljYXJkbyBSb2RyaWd1ZXMiLCJhdWQiOiJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20ifQ.xKjlvPISEO-jg17yuGC8AFdikZ0A0KuXrahaVSMlEnSu1cqIIf4hk-X3-CPS8mA22-_0NLR6yHSqRDLxhQ9x7t-UbDHesJc6R_aKLsnHByHynTlSnh5vVwWbcjkuaj2VhpUBV9uwA1JxkSKATA_v6pmbO_k9vzIGE6KxhQYKDByg1S6oyFGF3bcIyBd1ekXkZkFMswdN0JVC0C31dBM5Hb358zkveaPDZe4p9kJePRcyQqwuy4Bgfi12OA4DW5ojfZhbRr4-yFeK8ejdVgtGa8xtlhNhCuIKg-GXKNAUFzHUJs95DzZh0Fo8Eru0aTE_l0IduODOfFxVo8rCyJj0-w', 13 | name: 'toshiossada@gmail.com', 14 | userName: 'Toshi Ossada', 15 | ) 16 | ]; 17 | } 18 | 19 | @override 20 | Future count() async { 21 | return 0; 22 | } 23 | 24 | @override 25 | Future get(int id) async { 26 | return UserModel( 27 | accessToken: 28 | 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6WyJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20iLCJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20iXSwianRpIjoiM2ZiN2U3OTYtOGQ2My00ZTZjLTgyZjEtZjNjODFkODI3NTNhIiwibmJmIjoxNTgyMTI2MDc5LCJleHAiOjE1ODIxNTQ4NzksImlhdCI6MTU4MjEyNjA3OSwiaXNzIjoiUmljYXJkbyBSb2RyaWd1ZXMiLCJhdWQiOiJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20ifQ.xKjlvPISEO-jg17yuGC8AFdikZ0A0KuXrahaVSMlEnSu1cqIIf4hk-X3-CPS8mA22-_0NLR6yHSqRDLxhQ9x7t-UbDHesJc6R_aKLsnHByHynTlSnh5vVwWbcjkuaj2VhpUBV9uwA1JxkSKATA_v6pmbO_k9vzIGE6KxhQYKDByg1S6oyFGF3bcIyBd1ekXkZkFMswdN0JVC0C31dBM5Hb358zkveaPDZe4p9kJePRcyQqwuy4Bgfi12OA4DW5ojfZhbRr4-yFeK8ejdVgtGa8xtlhNhCuIKg-GXKNAUFzHUJs95DzZh0Fo8Eru0aTE_l0IduODOfFxVo8rCyJj0-w', 29 | name: 'toshiossada@gmail.com', 30 | userName: 'Toshi Ossada', 31 | ); 32 | } 33 | 34 | @override 35 | Future add(UserModel model) async { 36 | return UserModel( 37 | accessToken: 38 | 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6WyJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20iLCJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20iXSwianRpIjoiM2ZiN2U3OTYtOGQ2My00ZTZjLTgyZjEtZjNjODFkODI3NTNhIiwibmJmIjoxNTgyMTI2MDc5LCJleHAiOjE1ODIxNTQ4NzksImlhdCI6MTU4MjEyNjA3OSwiaXNzIjoiUmljYXJkbyBSb2RyaWd1ZXMiLCJhdWQiOiJyaWNhcmRvLmNhaXViYUBnbWFpbC5jb20ifQ.xKjlvPISEO-jg17yuGC8AFdikZ0A0KuXrahaVSMlEnSu1cqIIf4hk-X3-CPS8mA22-_0NLR6yHSqRDLxhQ9x7t-UbDHesJc6R_aKLsnHByHynTlSnh5vVwWbcjkuaj2VhpUBV9uwA1JxkSKATA_v6pmbO_k9vzIGE6KxhQYKDByg1S6oyFGF3bcIyBd1ekXkZkFMswdN0JVC0C31dBM5Hb358zkveaPDZe4p9kJePRcyQqwuy4Bgfi12OA4DW5ojfZhbRr4-yFeK8ejdVgtGa8xtlhNhCuIKg-GXKNAUFzHUJs95DzZh0Fo8Eru0aTE_l0IduODOfFxVo8rCyJj0-w', 39 | name: 'toshiossada@gmail.com', 40 | userName: 'Toshi Ossada', 41 | ); 42 | } 43 | 44 | @override 45 | update(UserModel model) async {} 46 | @override 47 | remove(String userName) async {} 48 | } 49 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/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 | import 'package:tests_example/app/modules/home/components/loading/loading_widget.dart'; 5 | import 'package:tests_example/app/modules/home/components/master/master_widget.dart'; 6 | 7 | import 'components/login_button/login_button_widget.dart'; 8 | import 'components/password_field/password_field_widget.dart'; 9 | import 'components/rounded_text_field/rounded_text_field_widget.dart'; 10 | import 'login_controller.dart'; 11 | 12 | class LoginPage extends StatefulWidget { 13 | final String title; 14 | LoginPage({Key key, this.title = "Login"}) : super(key: key); 15 | 16 | @override 17 | _LoginPageState createState() => _LoginPageState(); 18 | } 19 | 20 | class _LoginPageState extends ModularState { 21 | final _scaffoldKey = GlobalKey(); 22 | final Key keyLogin = Key('txtLogin'); 23 | final Key keyPassword = Key('txtpassword'); 24 | 25 | @override 26 | initState() { 27 | super.initState(); 28 | 29 | verifyLoggedIn(); 30 | } 31 | 32 | verifyLoggedIn() async { 33 | await controller.getUser(); 34 | 35 | if (controller.hasUser) Modular.to.pushReplacementNamed('/home'); 36 | } 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | return MasterWidget( 41 | scaffoldKey: _scaffoldKey, 42 | title: 'Bem Vindo!', 43 | subTitle: 'Insira seus dados para continuar.', 44 | body: Observer( 45 | builder: (_) { 46 | if (controller.user == null) return LoadingWidget(); 47 | 48 | return Column( 49 | children: [ 50 | RoundedTextFieldWidget( 51 | key: keyLogin, 52 | showBorder: true, 53 | labelText: 'Email', 54 | fontColor: Colors.black, 55 | backgroundColor: Colors.white, 56 | labelStyleColor: Colors.blue, 57 | onChanged: controller.setLogin, 58 | validator: (value) { 59 | if (value.isEmpty) 60 | return 'Usuário Inválido'; 61 | else 62 | return null; 63 | }, 64 | ), 65 | PasswordFieldWidget( 66 | key: keyPassword, 67 | showBorder: true, 68 | onChanged: controller.setPassword, 69 | fontColor: Colors.black, 70 | backgroundColor: Colors.white, 71 | labelStyleColor: Colors.blue, 72 | validator: (value) { 73 | if (value.isEmpty) 74 | return 'Senha Inválido'; 75 | else 76 | return null; 77 | }, 78 | label: 'Senha', 79 | ), 80 | SizedBox(height: 30), 81 | LoginButtonWidget( 82 | onError: () { 83 | final snackBar = SnackBar( 84 | content: Text('Usuário ou senha invalidos'), 85 | backgroundColor: Colors.red, 86 | ); 87 | _scaffoldKey.currentState.showSnackBar(snackBar); 88 | }, 89 | ), 90 | ], 91 | ); 92 | }, 93 | ), 94 | ); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /teste/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 | -------------------------------------------------------------------------------- /tests_example/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 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/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_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 _$hasUserComputed; 13 | 14 | @override 15 | bool get hasUser => 16 | (_$hasUserComputed ??= Computed(() => super.hasUser)).value; 17 | 18 | final _$userAtom = Atom(name: '_LoginControllerBase.user'); 19 | 20 | @override 21 | UserModel get user { 22 | _$userAtom.context.enforceReadPolicy(_$userAtom); 23 | _$userAtom.reportObserved(); 24 | return super.user; 25 | } 26 | 27 | @override 28 | set user(UserModel value) { 29 | _$userAtom.context.conditionallyRunInAction(() { 30 | super.user = value; 31 | _$userAtom.reportChanged(); 32 | }, _$userAtom, name: '${_$userAtom.name}_set'); 33 | } 34 | 35 | final _$emailAtom = Atom(name: '_LoginControllerBase.email'); 36 | 37 | @override 38 | String get email { 39 | _$emailAtom.context.enforceReadPolicy(_$emailAtom); 40 | _$emailAtom.reportObserved(); 41 | return super.email; 42 | } 43 | 44 | @override 45 | set email(String value) { 46 | _$emailAtom.context.conditionallyRunInAction(() { 47 | super.email = value; 48 | _$emailAtom.reportChanged(); 49 | }, _$emailAtom, name: '${_$emailAtom.name}_set'); 50 | } 51 | 52 | final _$passwordAtom = Atom(name: '_LoginControllerBase.password'); 53 | 54 | @override 55 | String get password { 56 | _$passwordAtom.context.enforceReadPolicy(_$passwordAtom); 57 | _$passwordAtom.reportObserved(); 58 | return super.password; 59 | } 60 | 61 | @override 62 | set password(String value) { 63 | _$passwordAtom.context.conditionallyRunInAction(() { 64 | super.password = value; 65 | _$passwordAtom.reportChanged(); 66 | }, _$passwordAtom, name: '${_$passwordAtom.name}_set'); 67 | } 68 | 69 | final _$loadingAtom = Atom(name: '_LoginControllerBase.loading'); 70 | 71 | @override 72 | bool get loading { 73 | _$loadingAtom.context.enforceReadPolicy(_$loadingAtom); 74 | _$loadingAtom.reportObserved(); 75 | return super.loading; 76 | } 77 | 78 | @override 79 | set loading(bool value) { 80 | _$loadingAtom.context.conditionallyRunInAction(() { 81 | super.loading = value; 82 | _$loadingAtom.reportChanged(); 83 | }, _$loadingAtom, name: '${_$loadingAtom.name}_set'); 84 | } 85 | 86 | final _$authenticationAsyncAction = AsyncAction('authentication'); 87 | 88 | @override 89 | Future authentication({AuthenticationModel authentication}) { 90 | return _$authenticationAsyncAction 91 | .run(() => super.authentication(authentication: authentication)); 92 | } 93 | 94 | final _$logOutAsyncAction = AsyncAction('logOut'); 95 | 96 | @override 97 | Future logOut() { 98 | return _$logOutAsyncAction.run(() => super.logOut()); 99 | } 100 | 101 | final _$getUserAsyncAction = AsyncAction('getUser'); 102 | 103 | @override 104 | Future getUser() { 105 | return _$getUserAsyncAction.run(() => super.getUser()); 106 | } 107 | 108 | final _$_LoginControllerBaseActionController = 109 | ActionController(name: '_LoginControllerBase'); 110 | 111 | @override 112 | void setLoading(bool v) { 113 | final _$actionInfo = _$_LoginControllerBaseActionController.startAction(); 114 | try { 115 | return super.setLoading(v); 116 | } finally { 117 | _$_LoginControllerBaseActionController.endAction(_$actionInfo); 118 | } 119 | } 120 | 121 | @override 122 | void setLogin(String v) { 123 | final _$actionInfo = _$_LoginControllerBaseActionController.startAction(); 124 | try { 125 | return super.setLogin(v); 126 | } finally { 127 | _$_LoginControllerBaseActionController.endAction(_$actionInfo); 128 | } 129 | } 130 | 131 | @override 132 | void setPassword(String v) { 133 | final _$actionInfo = _$_LoginControllerBaseActionController.startAction(); 134 | try { 135 | return super.setPassword(v); 136 | } finally { 137 | _$_LoginControllerBaseActionController.endAction(_$actionInfo); 138 | } 139 | } 140 | 141 | @override 142 | String toString() { 143 | final string = 144 | 'user: ${user.toString()},email: ${email.toString()},password: ${password.toString()},loading: ${loading.toString()},hasUser: ${hasUser.toString()}'; 145 | return '{$string}'; 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/payslip/payslip_controller.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'payslip_controller.dart'; 4 | 5 | // ************************************************************************** 6 | // StoreGenerator 7 | // ************************************************************************** 8 | 9 | // ignore_for_file: non_constant_identifier_names, unnecessary_lambdas, prefer_expression_function_bodies, lines_longer_than_80_chars, avoid_as, avoid_annotating_with_dynamic 10 | 11 | mixin _$PayslipController on _PayslipControllerBase, Store { 12 | final _$selectedMonthAtom = 13 | Atom(name: '_PayslipControllerBase.selectedMonth'); 14 | 15 | @override 16 | MonthModel get selectedMonth { 17 | _$selectedMonthAtom.context.enforceReadPolicy(_$selectedMonthAtom); 18 | _$selectedMonthAtom.reportObserved(); 19 | return super.selectedMonth; 20 | } 21 | 22 | @override 23 | set selectedMonth(MonthModel value) { 24 | _$selectedMonthAtom.context.conditionallyRunInAction(() { 25 | super.selectedMonth = value; 26 | _$selectedMonthAtom.reportChanged(); 27 | }, _$selectedMonthAtom, name: '${_$selectedMonthAtom.name}_set'); 28 | } 29 | 30 | final _$selectedPaymentAtom = 31 | Atom(name: '_PayslipControllerBase.selectedPayment'); 32 | 33 | @override 34 | PaymentModel get selectedPayment { 35 | _$selectedPaymentAtom.context.enforceReadPolicy(_$selectedPaymentAtom); 36 | _$selectedPaymentAtom.reportObserved(); 37 | return super.selectedPayment; 38 | } 39 | 40 | @override 41 | set selectedPayment(PaymentModel value) { 42 | _$selectedPaymentAtom.context.conditionallyRunInAction(() { 43 | super.selectedPayment = value; 44 | _$selectedPaymentAtom.reportChanged(); 45 | }, _$selectedPaymentAtom, name: '${_$selectedPaymentAtom.name}_set'); 46 | } 47 | 48 | final _$monthsAtom = Atom(name: '_PayslipControllerBase.months'); 49 | 50 | @override 51 | ObservableList get months { 52 | _$monthsAtom.context.enforceReadPolicy(_$monthsAtom); 53 | _$monthsAtom.reportObserved(); 54 | return super.months; 55 | } 56 | 57 | @override 58 | set months(ObservableList value) { 59 | _$monthsAtom.context.conditionallyRunInAction(() { 60 | super.months = value; 61 | _$monthsAtom.reportChanged(); 62 | }, _$monthsAtom, name: '${_$monthsAtom.name}_set'); 63 | } 64 | 65 | final _$paymentAtom = Atom(name: '_PayslipControllerBase.payment'); 66 | 67 | @override 68 | ObservableList get payment { 69 | _$paymentAtom.context.enforceReadPolicy(_$paymentAtom); 70 | _$paymentAtom.reportObserved(); 71 | return super.payment; 72 | } 73 | 74 | @override 75 | set payment(ObservableList value) { 76 | _$paymentAtom.context.conditionallyRunInAction(() { 77 | super.payment = value; 78 | _$paymentAtom.reportChanged(); 79 | }, _$paymentAtom, name: '${_$paymentAtom.name}_set'); 80 | } 81 | 82 | final _$loadingAtom = Atom(name: '_PayslipControllerBase.loading'); 83 | 84 | @override 85 | bool get loading { 86 | _$loadingAtom.context.enforceReadPolicy(_$loadingAtom); 87 | _$loadingAtom.reportObserved(); 88 | return super.loading; 89 | } 90 | 91 | @override 92 | set loading(bool value) { 93 | _$loadingAtom.context.conditionallyRunInAction(() { 94 | super.loading = value; 95 | _$loadingAtom.reportChanged(); 96 | }, _$loadingAtom, name: '${_$loadingAtom.name}_set'); 97 | } 98 | 99 | final _$getMonthAsyncAction = AsyncAction('getMonth'); 100 | 101 | @override 102 | Future getMonth() { 103 | return _$getMonthAsyncAction.run(() => super.getMonth()); 104 | } 105 | 106 | final _$getPaymentsAsyncAction = AsyncAction('getPayments'); 107 | 108 | @override 109 | Future getPayments() { 110 | return _$getPaymentsAsyncAction.run(() => super.getPayments()); 111 | } 112 | 113 | final _$downloadPdfAsyncAction = AsyncAction('downloadPdf'); 114 | 115 | @override 116 | Future downloadPdf() { 117 | return _$downloadPdfAsyncAction.run(() => super.downloadPdf()); 118 | } 119 | 120 | final _$_PayslipControllerBaseActionController = 121 | ActionController(name: '_PayslipControllerBase'); 122 | 123 | @override 124 | dynamic setSelectedMonth(dynamic v) { 125 | final _$actionInfo = _$_PayslipControllerBaseActionController.startAction(); 126 | try { 127 | return super.setSelectedMonth(v); 128 | } finally { 129 | _$_PayslipControllerBaseActionController.endAction(_$actionInfo); 130 | } 131 | } 132 | 133 | @override 134 | dynamic setLoading(dynamic v) { 135 | final _$actionInfo = _$_PayslipControllerBaseActionController.startAction(); 136 | try { 137 | return super.setLoading(v); 138 | } finally { 139 | _$_PayslipControllerBaseActionController.endAction(_$actionInfo); 140 | } 141 | } 142 | 143 | @override 144 | dynamic setSelectedPayment(dynamic v) { 145 | final _$actionInfo = _$_PayslipControllerBaseActionController.startAction(); 146 | try { 147 | return super.setSelectedPayment(v); 148 | } finally { 149 | _$_PayslipControllerBaseActionController.endAction(_$actionInfo); 150 | } 151 | } 152 | 153 | @override 154 | String toString() { 155 | final string = 156 | 'selectedMonth: ${selectedMonth.toString()},selectedPayment: ${selectedPayment.toString()},months: ${months.toString()},payment: ${payment.toString()},loading: ${loading.toString()}'; 157 | return '{$string}'; 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /tests_example/lib/app/modules/home/pages/payslip/payslip_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 | import 'package:open_file/open_file.dart'; 5 | import 'package:tests_example/app/modules/home/components/loading/loading_widget.dart'; 6 | import 'package:tests_example/app/modules/home/components/master/master_widget.dart'; 7 | import 'package:tests_example/app/modules/home/home_controller.dart'; 8 | import 'package:tests_example/app/modules/home/pages/login/components/circular_button/circular_button_widget.dart'; 9 | import 'package:tests_example/app/modules/home/pages/login/login_controller.dart'; 10 | import 'package:tests_example/app/shared/models/user_model.dart'; 11 | 12 | import 'payslip_controller.dart'; 13 | 14 | class PayslipPage extends StatefulWidget { 15 | final String title; 16 | const PayslipPage({Key key, this.title = "Payslip"}) : super(key: key); 17 | 18 | @override 19 | _PayslipPageState createState() => _PayslipPageState(); 20 | } 21 | 22 | class _PayslipPageState extends ModularState { 23 | final HomeController _homeController = Modular.get(); 24 | final _scaffoldKey = GlobalKey(); 25 | 26 | @override 27 | void initState() { 28 | super.initState(); 29 | 30 | controller.getMonth(); 31 | controller.getPayments(); 32 | } 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return FutureBuilder( 37 | future: _homeController.user, 38 | builder: (context, snapshot) { 39 | if (!snapshot.hasData || snapshot.data == null) 40 | return CircularProgressIndicator(); 41 | return MasterWidget( 42 | title: snapshot.data.name, 43 | subTitle: 'você selecionou holerites:', 44 | scaffoldKey: _scaffoldKey, 45 | appBar: AppBar( 46 | iconTheme: IconThemeData(color: Colors.black), 47 | backgroundColor: Colors.transparent, 48 | elevation: 0, 49 | ), 50 | body: Container( 51 | child: Column( 52 | children: [ 53 | Observer( 54 | builder: (_) { 55 | return controller.months == null 56 | ? LoadingWidget() 57 | : DropdownButton( 58 | items: controller.months.map((value) { 59 | return DropdownMenuItem( 60 | value: value, 61 | child: new Text( 62 | '${value.monthFormated()}/${value.year}', 63 | style: TextStyle(color: Colors.black), 64 | ), 65 | ); 66 | }).toList(), 67 | underline: Text(''), 68 | iconEnabledColor: Colors.black, 69 | value: controller.selectedMonth, 70 | style: TextStyle(color: Colors.grey), 71 | isExpanded: true, 72 | onChanged: controller.setSelectedMonth, 73 | ); 74 | }, 75 | ), 76 | Container(color: Colors.grey, height: 2), 77 | Observer( 78 | builder: (_) { 79 | return controller.payment == null 80 | ? LoadingWidget() 81 | : DropdownButton( 82 | items: controller.payment.map((value) { 83 | return DropdownMenuItem( 84 | value: value, 85 | child: new Text( 86 | value.description, 87 | style: TextStyle(color: Colors.black), 88 | ), 89 | ); 90 | }).toList(), 91 | underline: Text(''), 92 | iconEnabledColor: Colors.black, 93 | value: controller.selectedPayment, 94 | style: TextStyle(color: Colors.grey), 95 | isExpanded: true, 96 | onChanged: controller.setSelectedPayment, 97 | ); 98 | }, 99 | ), 100 | Container(color: Colors.grey, height: 2), 101 | SizedBox(height: 10), 102 | Container( 103 | child: Observer( 104 | builder: (_) => controller.loading ?? false 105 | ? LoadingWidget() 106 | : CircularButtonWidget( 107 | width: MediaQuery.of(context).size.width - 100, 108 | backgroundColor: Colors.blue[800], 109 | label: "Consultar", 110 | icon: Icon( 111 | Icons.done, 112 | color: Colors.white, 113 | ), 114 | onTap: () async { 115 | try { 116 | var file = await controller.downloadPdf(); 117 | OpenFile.open(file, type: "application/pdf"); 118 | } catch (e) { 119 | onError(); 120 | } finally { 121 | controller.setLoading(false); 122 | } 123 | }, 124 | ), 125 | ), 126 | ) 127 | ], 128 | ), 129 | ), 130 | ); 131 | }); 132 | } 133 | 134 | onError() { 135 | controller.setLoading(true); 136 | 137 | final snackBar = SnackBar( 138 | content: Text('Erro ao tentar gerar holerite'), 139 | backgroundColor: Colors.red, 140 | ); 141 | _scaffoldKey.currentState.showSnackBar(snackBar); 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /teste/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: "2.2.0" 11 | analyzer: 12 | dependency: transitive 13 | description: 14 | name: analyzer 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "0.39.7" 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 | async: 26 | dependency: transitive 27 | description: 28 | name: async 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.4.1" 32 | boolean_selector: 33 | dependency: transitive 34 | description: 35 | name: boolean_selector 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.0.0" 39 | build: 40 | dependency: transitive 41 | description: 42 | name: build 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.2.2" 46 | build_config: 47 | dependency: transitive 48 | description: 49 | name: build_config 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "0.4.2" 53 | build_daemon: 54 | dependency: transitive 55 | description: 56 | name: build_daemon 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.1.4" 60 | build_resolvers: 61 | dependency: transitive 62 | description: 63 | name: build_resolvers 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.3.5" 67 | build_runner: 68 | dependency: "direct dev" 69 | description: 70 | name: build_runner 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.8.1" 74 | build_runner_core: 75 | dependency: transitive 76 | description: 77 | name: build_runner_core 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "5.0.0" 81 | built_collection: 82 | dependency: transitive 83 | description: 84 | name: built_collection 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "4.3.2" 88 | built_value: 89 | dependency: transitive 90 | description: 91 | name: built_value 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "7.0.9" 95 | charcode: 96 | dependency: transitive 97 | description: 98 | name: charcode 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "1.1.3" 102 | checked_yaml: 103 | dependency: transitive 104 | description: 105 | name: checked_yaml 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "1.0.2" 109 | clock: 110 | dependency: transitive 111 | description: 112 | name: clock 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "1.0.1" 116 | code_builder: 117 | dependency: transitive 118 | description: 119 | name: code_builder 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "3.2.1" 123 | collection: 124 | dependency: transitive 125 | description: 126 | name: collection 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "1.14.12" 130 | convert: 131 | dependency: transitive 132 | description: 133 | name: convert 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "2.1.1" 137 | crypto: 138 | dependency: transitive 139 | description: 140 | name: crypto 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "2.1.4" 144 | csslib: 145 | dependency: transitive 146 | description: 147 | name: csslib 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "0.16.1" 151 | dart_style: 152 | dependency: transitive 153 | description: 154 | name: dart_style 155 | url: "https://pub.dartlang.org" 156 | source: hosted 157 | version: "1.3.4" 158 | dio: 159 | dependency: "direct main" 160 | description: 161 | name: dio 162 | url: "https://pub.dartlang.org" 163 | source: hosted 164 | version: "3.0.9" 165 | fake_async: 166 | dependency: transitive 167 | description: 168 | name: fake_async 169 | url: "https://pub.dartlang.org" 170 | source: hosted 171 | version: "1.1.0" 172 | fixnum: 173 | dependency: transitive 174 | description: 175 | name: fixnum 176 | url: "https://pub.dartlang.org" 177 | source: hosted 178 | version: "0.10.11" 179 | flutter: 180 | dependency: "direct main" 181 | description: flutter 182 | source: sdk 183 | version: "0.0.0" 184 | flutter_mobx: 185 | dependency: "direct main" 186 | description: 187 | name: flutter_mobx 188 | url: "https://pub.dartlang.org" 189 | source: hosted 190 | version: "1.1.0" 191 | flutter_modular: 192 | dependency: "direct main" 193 | description: 194 | name: flutter_modular 195 | url: "https://pub.dartlang.org" 196 | source: hosted 197 | version: "1.1.2" 198 | flutter_test: 199 | dependency: "direct dev" 200 | description: flutter 201 | source: sdk 202 | version: "0.0.0" 203 | glob: 204 | dependency: transitive 205 | description: 206 | name: glob 207 | url: "https://pub.dartlang.org" 208 | source: hosted 209 | version: "1.2.0" 210 | graphs: 211 | dependency: transitive 212 | description: 213 | name: graphs 214 | url: "https://pub.dartlang.org" 215 | source: hosted 216 | version: "0.2.0" 217 | html: 218 | dependency: transitive 219 | description: 220 | name: html 221 | url: "https://pub.dartlang.org" 222 | source: hosted 223 | version: "0.14.0+3" 224 | http_multi_server: 225 | dependency: transitive 226 | description: 227 | name: http_multi_server 228 | url: "https://pub.dartlang.org" 229 | source: hosted 230 | version: "2.2.0" 231 | http_parser: 232 | dependency: transitive 233 | description: 234 | name: http_parser 235 | url: "https://pub.dartlang.org" 236 | source: hosted 237 | version: "3.1.4" 238 | io: 239 | dependency: transitive 240 | description: 241 | name: io 242 | url: "https://pub.dartlang.org" 243 | source: hosted 244 | version: "0.3.4" 245 | js: 246 | dependency: transitive 247 | description: 248 | name: js 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "0.6.1+1" 252 | json_annotation: 253 | dependency: transitive 254 | description: 255 | name: json_annotation 256 | url: "https://pub.dartlang.org" 257 | source: hosted 258 | version: "3.0.1" 259 | logging: 260 | dependency: transitive 261 | description: 262 | name: logging 263 | url: "https://pub.dartlang.org" 264 | source: hosted 265 | version: "0.11.4" 266 | matcher: 267 | dependency: transitive 268 | description: 269 | name: matcher 270 | url: "https://pub.dartlang.org" 271 | source: hosted 272 | version: "0.12.6" 273 | meta: 274 | dependency: transitive 275 | description: 276 | name: meta 277 | url: "https://pub.dartlang.org" 278 | source: hosted 279 | version: "1.1.8" 280 | mime: 281 | dependency: transitive 282 | description: 283 | name: mime 284 | url: "https://pub.dartlang.org" 285 | source: hosted 286 | version: "0.9.6+3" 287 | mobx: 288 | dependency: "direct main" 289 | description: 290 | name: mobx 291 | url: "https://pub.dartlang.org" 292 | source: hosted 293 | version: "1.1.1" 294 | mobx_codegen: 295 | dependency: "direct dev" 296 | description: 297 | name: mobx_codegen 298 | url: "https://pub.dartlang.org" 299 | source: hosted 300 | version: "1.0.3" 301 | mockito: 302 | dependency: "direct dev" 303 | description: 304 | name: mockito 305 | url: "https://pub.dartlang.org" 306 | source: hosted 307 | version: "4.1.1" 308 | node_interop: 309 | dependency: transitive 310 | description: 311 | name: node_interop 312 | url: "https://pub.dartlang.org" 313 | source: hosted 314 | version: "1.0.3" 315 | node_io: 316 | dependency: transitive 317 | description: 318 | name: node_io 319 | url: "https://pub.dartlang.org" 320 | source: hosted 321 | version: "1.0.1+2" 322 | package_config: 323 | dependency: transitive 324 | description: 325 | name: package_config 326 | url: "https://pub.dartlang.org" 327 | source: hosted 328 | version: "1.9.3" 329 | path: 330 | dependency: transitive 331 | description: 332 | name: path 333 | url: "https://pub.dartlang.org" 334 | source: hosted 335 | version: "1.7.0" 336 | pedantic: 337 | dependency: transitive 338 | description: 339 | name: pedantic 340 | url: "https://pub.dartlang.org" 341 | source: hosted 342 | version: "1.9.0" 343 | pool: 344 | dependency: transitive 345 | description: 346 | name: pool 347 | url: "https://pub.dartlang.org" 348 | source: hosted 349 | version: "1.4.0" 350 | pub_semver: 351 | dependency: transitive 352 | description: 353 | name: pub_semver 354 | url: "https://pub.dartlang.org" 355 | source: hosted 356 | version: "1.4.4" 357 | pubspec_parse: 358 | dependency: transitive 359 | description: 360 | name: pubspec_parse 361 | url: "https://pub.dartlang.org" 362 | source: hosted 363 | version: "0.1.5" 364 | quiver: 365 | dependency: transitive 366 | description: 367 | name: quiver 368 | url: "https://pub.dartlang.org" 369 | source: hosted 370 | version: "2.1.3" 371 | shelf: 372 | dependency: transitive 373 | description: 374 | name: shelf 375 | url: "https://pub.dartlang.org" 376 | source: hosted 377 | version: "0.7.5" 378 | shelf_web_socket: 379 | dependency: transitive 380 | description: 381 | name: shelf_web_socket 382 | url: "https://pub.dartlang.org" 383 | source: hosted 384 | version: "0.2.3" 385 | sky_engine: 386 | dependency: transitive 387 | description: flutter 388 | source: sdk 389 | version: "0.0.99" 390 | source_gen: 391 | dependency: transitive 392 | description: 393 | name: source_gen 394 | url: "https://pub.dartlang.org" 395 | source: hosted 396 | version: "0.9.5" 397 | source_span: 398 | dependency: transitive 399 | description: 400 | name: source_span 401 | url: "https://pub.dartlang.org" 402 | source: hosted 403 | version: "1.7.0" 404 | stack_trace: 405 | dependency: transitive 406 | description: 407 | name: stack_trace 408 | url: "https://pub.dartlang.org" 409 | source: hosted 410 | version: "1.9.3" 411 | stream_channel: 412 | dependency: transitive 413 | description: 414 | name: stream_channel 415 | url: "https://pub.dartlang.org" 416 | source: hosted 417 | version: "2.0.0" 418 | stream_transform: 419 | dependency: transitive 420 | description: 421 | name: stream_transform 422 | url: "https://pub.dartlang.org" 423 | source: hosted 424 | version: "1.2.0" 425 | string_scanner: 426 | dependency: transitive 427 | description: 428 | name: string_scanner 429 | url: "https://pub.dartlang.org" 430 | source: hosted 431 | version: "1.0.5" 432 | term_glyph: 433 | dependency: transitive 434 | description: 435 | name: term_glyph 436 | url: "https://pub.dartlang.org" 437 | source: hosted 438 | version: "1.1.0" 439 | test_api: 440 | dependency: transitive 441 | description: 442 | name: test_api 443 | url: "https://pub.dartlang.org" 444 | source: hosted 445 | version: "0.2.15" 446 | timing: 447 | dependency: transitive 448 | description: 449 | name: timing 450 | url: "https://pub.dartlang.org" 451 | source: hosted 452 | version: "0.1.1+2" 453 | typed_data: 454 | dependency: transitive 455 | description: 456 | name: typed_data 457 | url: "https://pub.dartlang.org" 458 | source: hosted 459 | version: "1.1.6" 460 | vector_math: 461 | dependency: transitive 462 | description: 463 | name: vector_math 464 | url: "https://pub.dartlang.org" 465 | source: hosted 466 | version: "2.0.8" 467 | watcher: 468 | dependency: transitive 469 | description: 470 | name: watcher 471 | url: "https://pub.dartlang.org" 472 | source: hosted 473 | version: "0.9.7+14" 474 | web_socket_channel: 475 | dependency: transitive 476 | description: 477 | name: web_socket_channel 478 | url: "https://pub.dartlang.org" 479 | source: hosted 480 | version: "1.1.0" 481 | yaml: 482 | dependency: transitive 483 | description: 484 | name: yaml 485 | url: "https://pub.dartlang.org" 486 | source: hosted 487 | version: "2.2.0" 488 | sdks: 489 | dart: ">=2.7.0 <3.0.0" 490 | --------------------------------------------------------------------------------