├── lib ├── src │ ├── models │ │ ├── models.dart │ │ ├── movies.g.dart │ │ └── movies.dart │ ├── providers │ │ ├── providers.dart │ │ └── app_provider.dart │ ├── services │ │ ├── services.dart │ │ └── app_service.dart │ ├── blocs │ │ ├── blocs.dart │ │ ├── app_event.dart │ │ ├── app_state.dart │ │ └── app_bloc.dart │ ├── widgets │ │ ├── widgets.dart │ │ ├── movies_list.dart │ │ ├── movie_card.dart │ │ └── home.dart │ └── app.dart └── main.dart ├── ios ├── 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 ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── .gitignore ├── assets └── devfest.jpeg ├── android ├── .settings │ └── org.eclipse.buildship.core.prefs ├── 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 │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── flutter_movie_deep_dive_test │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .project ├── settings.gradle └── build.gradle ├── integration_test ├── driver.dart ├── main.dart └── app_test.dart ├── cloudbuild.sh ├── .codecov.yaml ├── .metadata ├── bin └── coverage-ci.sh ├── coverage.sh ├── test └── src │ ├── models │ └── movies_test.dart │ ├── app_test.dart │ ├── widgets │ ├── movies_list_test.dart │ ├── movie_card_test.dart │ └── home_test.dart │ ├── services │ └── app_service_test.dart │ ├── blocs │ ├── app_bloc_test.mocks.dart │ └── app_bloc_test.dart │ └── common.dart ├── .gitignore ├── .github └── workflows │ └── ci.yml ├── .gitlab-ci.yml ├── pubspec.yaml ├── cloudbuild.yaml ├── README.md └── pubspec.lock /lib/src/models/models.dart: -------------------------------------------------------------------------------- 1 | export 'movies.dart'; -------------------------------------------------------------------------------- /lib/src/providers/providers.dart: -------------------------------------------------------------------------------- 1 | export 'app_provider.dart'; -------------------------------------------------------------------------------- /lib/src/services/services.dart: -------------------------------------------------------------------------------- 1 | export 'app_service.dart'; 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /assets/devfest.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/assets/devfest.jpeg -------------------------------------------------------------------------------- /lib/src/blocs/blocs.dart: -------------------------------------------------------------------------------- 1 | export 'app_bloc.dart'; 2 | export 'app_event.dart'; 3 | export 'app_state.dart'; -------------------------------------------------------------------------------- /lib/src/widgets/widgets.dart: -------------------------------------------------------------------------------- 1 | export 'home.dart'; 2 | export 'movie_card.dart'; 3 | export 'movies_list.dart'; -------------------------------------------------------------------------------- /android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /integration_test/driver.dart: -------------------------------------------------------------------------------- 1 | import 'package:integration_test/integration_test_driver.dart'; 2 | 3 | Future main() => integrationDriver(); 4 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /lib/src/blocs/app_event.dart: -------------------------------------------------------------------------------- 1 | abstract class AppEvent {} 2 | 3 | class FetchEvent extends AppEvent { 4 | final region; 5 | 6 | FetchEvent({this.region}); 7 | } 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bwnyasse/flutter-testing-tutorial/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /cloudbuild.sh: -------------------------------------------------------------------------------- 1 | !#/bin/bash 2 | 3 | cd /workspace/$1 4 | HEAD_SHA=$(git rev-parse --verify HEAD) 5 | VERSION_CODE=$(git rev-list --count master) 6 | #TODO: We can add flutter test 7 | flutter build apk --build-name=$HEAD_SHA --build-number=$VERSION_CODE -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.codecov.yaml: -------------------------------------------------------------------------------- 1 | coverage: 2 | precision: 2 3 | round: down 4 | range: "70...100" 5 | 6 | status: 7 | project: no 8 | patch: yes 9 | changes: no 10 | 11 | ignore: 12 | - "lib/src/**/*.g.dart" 13 | 14 | # https://docs.codecov.io/docs/pull-request-comments 15 | comment: 16 | layout: "reach, diff, flags, files" 17 | behavior: default -------------------------------------------------------------------------------- /.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: ee032f67c734e607d8ea5c870ba744daf4bf56e7 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:http/http.dart' show Client; 3 | import 'package:flutter_movie_deep_dive_test/src/app.dart'; 4 | import 'package:flutter_movie_deep_dive_test/src/providers/providers.dart'; 5 | 6 | void main() => runApp(AppProvider( 7 | httpClient: Client(), 8 | child: MyApp(), 9 | )); 10 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /bin/coverage-ci.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Effective test coverage 4 | # Why --no-test-assets : https://github.com/flutter/flutter/issues/35907 5 | flutter test --coverage --no-test-assets 6 | 7 | # Install https://pub.dev/packages/remove_from_coverage 8 | pub global activate remove_from_coverage 9 | 10 | export PATH="$PATH":"$HOME/.pub-cache/bin" 11 | 12 | # Remove Generate dart files 13 | remove_from_coverage -f coverage/lcov.info -r '.g.dart$' 14 | -------------------------------------------------------------------------------- /coverage.sh: -------------------------------------------------------------------------------- 1 | ## ONLY FOR MAC OR LINUX 2 | 3 | 4 | # Install https://pub.dev/packages/remove_from_coverage 5 | pub global activate remove_from_coverage 6 | 7 | # Effective test coverage 8 | flutter test --coverage 9 | 10 | # Remove Generate dart files 11 | remove_from_coverage -f coverage/lcov.info -r '.g.dart$' 12 | 13 | # Generate coverage info 14 | genhtml -o coverage coverage/lcov.info 15 | 16 | # Open to see coverage info 17 | open coverage/index.html -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/flutter_movie_deep_dive_test/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.flutter_movie_deep_dive_test 2 | 3 | import android.os.Bundle 4 | import io.flutter.app.FlutterActivity 5 | import io.flutter.plugins.GeneratedPluginRegistrant 6 | 7 | class MainActivity: FlutterActivity() { 8 | override fun onCreate(savedInstanceState: Bundle?) { 9 | super.onCreate(savedInstanceState) 10 | GeneratedPluginRegistrant.registerWith(this) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android__ 4 | Project android__ created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /lib/src/blocs/app_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:flutter_movie_deep_dive_test/src/models/models.dart'; 3 | 4 | abstract class AppState extends Equatable { 5 | @override 6 | List get props => []; 7 | } 8 | 9 | class AppError extends AppState {} 10 | 11 | class AppEmpty extends AppState {} 12 | 13 | class AppLoading extends AppState {} 14 | 15 | class AppLoaded extends AppState { 16 | final MoviesResponse response; 17 | 18 | AppLoaded({required this.response}); 19 | } 20 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /test/src/models/movies_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_movie_deep_dive_test/src/models/models.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | main() { 5 | group('movie.posterPathResolved', () { 6 | test('posterPath is not empty', () { 7 | Movie m = Movie(); 8 | expect(m.posterPathResolved, equals('https://via.placeholder.com/300')); 9 | }); 10 | 11 | test('posterPath is valid', () { 12 | Movie m = Movie(posterPath: 'some-value'); 13 | expect(m.posterPathResolved, 14 | equals('http://image.tmdb.org/t/p/w185/some-value')); 15 | }); 16 | }); 17 | } -------------------------------------------------------------------------------- /integration_test/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_movie_deep_dive_test/src/app.dart'; 5 | import 'package:flutter_movie_deep_dive_test/src/providers/providers.dart'; 6 | import 'package:http/http.dart'; 7 | import 'package:http/testing.dart'; 8 | 9 | import '../test/src/common.dart'; 10 | 11 | void main() { 12 | final mockClient = MockClient((request) async { 13 | return Response(json.encode(exampleJsonResponse2), 200); 14 | }); 15 | 16 | return runApp(AppProvider( 17 | httpClient: mockClient, 18 | child: MyApp(), 19 | )); 20 | } 21 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/src/providers/app_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:http/http.dart' show Client; 3 | import 'package:flutter_movie_deep_dive_test/src/services/services.dart'; 4 | import 'package:provider/provider.dart'; 5 | 6 | class AppProvider extends StatelessWidget { 7 | final Client httpClient; 8 | final Widget child; 9 | 10 | AppProvider({ 11 | required this.httpClient, 12 | required this.child, 13 | }); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return MultiProvider( 18 | providers: [ 19 | Provider(create: (_) => AppService(httpClient)), 20 | ], 21 | child: child, 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.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 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Web related 33 | lib/generated_plugin_registrant.dart 34 | 35 | # Exceptions to above rules. 36 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 37 | 38 | coverage/ -------------------------------------------------------------------------------- /lib/src/blocs/app_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc/bloc.dart'; 2 | import 'package:flutter_movie_deep_dive_test/src/blocs/blocs.dart'; 3 | import 'package:flutter_movie_deep_dive_test/src/services/services.dart'; 4 | 5 | class AppBloc extends Bloc { 6 | final AppService service; 7 | final AppState initWithState; 8 | 9 | AppBloc({ 10 | required this.service, 11 | required this.initWithState, 12 | }) : super(initWithState); 13 | 14 | @override 15 | Stream mapEventToState(AppEvent event) async* { 16 | yield initWithState; 17 | // 18 | // FETCH 19 | // 20 | if (event is FetchEvent) { 21 | yield AppLoading(); 22 | try { 23 | final list = await service.loadMovies(); 24 | yield AppLoaded(response: list); 25 | } catch (e) { 26 | print(e); 27 | yield AppError(); 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/src/widgets/movies_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_movie_deep_dive_test/src/models/models.dart'; 3 | import 'package:flutter_movie_deep_dive_test/src/widgets/movie_card.dart'; 4 | 5 | class MoviesList extends StatelessWidget { 6 | final MoviesResponse response; 7 | 8 | MoviesList({required this.response}); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | final movies = response.movies; 13 | return ListView.separated( 14 | padding: const EdgeInsets.all(8.0), 15 | itemCount: movies.length, 16 | itemBuilder: (BuildContext context, int index) { 17 | Movie movie = movies[index]; 18 | return MovieCard( 19 | key: Key("${movie.id}"), 20 | data: movie, 21 | ); 22 | }, 23 | separatorBuilder: (BuildContext context, int index) => const Divider(), 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test/src/app_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter_test/flutter_test.dart'; 4 | import 'package:integration_test/integration_test.dart'; 5 | import 'package:http/http.dart'; 6 | import 'package:http/testing.dart'; 7 | import 'package:flutter_movie_deep_dive_test/src/providers/providers.dart'; 8 | import 'package:flutter_movie_deep_dive_test/src/widgets/widgets.dart'; 9 | import 'package:flutter_movie_deep_dive_test/src/app.dart'; 10 | 11 | import 'common.dart'; 12 | 13 | void main() { 14 | 15 | testWidgets('Display App', (WidgetTester tester) async { 16 | await tester.pumpWidget(AppProvider( 17 | httpClient: MockClient((request) async { 18 | return Response(json.encode(exampleJsonResponse), 200); 19 | }), 20 | child: MyApp(), 21 | )); 22 | 23 | Finder textFinder = find.byType(MyHomePage); 24 | expect(textFinder, findsOneWidget); 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/src/app.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_movie_deep_dive_test/src/blocs/blocs.dart'; 4 | import 'package:flutter_movie_deep_dive_test/src/services/services.dart'; 5 | import 'package:flutter_movie_deep_dive_test/src/widgets/widgets.dart'; 6 | import 'package:provider/provider.dart'; 7 | 8 | class MyApp extends StatelessWidget { 9 | @override 10 | Widget build(BuildContext context) { 11 | return MaterialApp( 12 | title: 'MoviesDB for Testing', 13 | theme: ThemeData(primarySwatch: Colors.blue), 14 | home: BlocProvider( 15 | create: (context) => AppBloc( 16 | service: Provider.of( 17 | context, 18 | listen: false, 19 | ), 20 | initWithState: AppEmpty(), 21 | ), 22 | child: MyHomePage(title: 'Flutter Testing Tutorial'), 23 | ), 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Flutter%20Testing%20Tutorial%20CI%20On%20push 2 | 3 | # Trigger on push 4 | on: push 5 | 6 | jobs: 7 | flutter: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v1 12 | 13 | - uses: actions/setup-java@v1 14 | with: 15 | java-version: '12.x' 16 | 17 | - uses: subosito/flutter-action@v1 18 | with: 19 | channel: 'stable' 20 | 21 | - name: Get packages 22 | run: flutter pub get 23 | 24 | - name: Test 25 | run: flutter test --coverage 26 | 27 | - name: Build - APK 28 | run: flutter build apk 29 | 30 | - name: Archive production artifacts 31 | uses: actions/upload-artifact@v1 32 | with: 33 | name: apk 34 | path: build/app/outputs/apk/release/app-release.apk 35 | 36 | - name: Collect the code coverage 37 | uses: codecov/codecov-action@v1.0.3 38 | with: 39 | token: ${{secrets.CODECOV_TOKEN}} #required 40 | file: ./coverage/lcov.info -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | stages: 2 | - test 3 | - build_coverage 4 | - deploy_coverage 5 | 6 | unit_test: # Name of the lane 7 | image: cirrusci/flutter:stable 8 | stage: test 9 | script: 10 | - /bin/sh bin/coverage-ci.sh 11 | artifacts: 12 | paths: 13 | - coverage/ 14 | coverage: '/^lines\.+: |\d+\.?\d+\%/' 15 | except: 16 | - /^release-.*$/ 17 | 18 | coverage_test: # Name of the lane 19 | image: gableroux/flutter:v1.2.1 20 | stage: build_coverage 21 | script: 22 | - echo "${CODECOV_TOKEN}" 23 | - genhtml -o coverage coverage/lcov.info 24 | - bash <(curl -s https://codecov.io/bash) -t "${CODECOV_TOKEN}" 25 | artifacts: 26 | paths: 27 | - coverage/ 28 | coverage: '/^lines\.+: |\d+\.?\d+\%/' 29 | except: 30 | - /^release-.*$/ 31 | 32 | pages: 33 | image: alpine 34 | stage: deploy_coverage 35 | dependencies: 36 | - unit_test 37 | script: 38 | - mkdir public 39 | - mv coverage/ public/coverage/ 40 | artifacts: 41 | paths: 42 | - public 43 | # only: 44 | # - master 45 | -------------------------------------------------------------------------------- /lib/src/services/app_service.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter_movie_deep_dive_test/src/models/models.dart'; 4 | import 'package:http/http.dart' show Client; 5 | 6 | class LoadMoviesException implements Exception { 7 | final message; 8 | 9 | LoadMoviesException(this.message); 10 | } 11 | 12 | class AppService { 13 | final Client client; 14 | 15 | AppService(this.client); 16 | 17 | Future loadMovies() async { 18 | final apiKey = '4205ec1d93b1e3465f636f0956a98c64'; 19 | final api = 'https://api.themoviedb.org/3'; 20 | final urlPath = 'movie/now_playing'; 21 | final path = '$api/$urlPath?api_key=$apiKey&language=en-US'; 22 | 23 | // appel asynchrone 24 | final response = await client.get(Uri.parse(path)); 25 | 26 | if (response.statusCode != 200) { 27 | throw LoadMoviesException('LoadMovies - Request Error: ${response.statusCode}'); 28 | } 29 | 30 | // Décoder le contenu de la response ici 31 | final data = json.decode(response.body); 32 | 33 | return MoviesResponse.fromJson(data); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /test/src/widgets/movies_list_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_movie_deep_dive_test/src/models/models.dart'; 3 | import 'package:flutter_movie_deep_dive_test/src/widgets/widgets.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | import 'package:network_image_mock/network_image_mock.dart'; 6 | 7 | import '../common.dart'; 8 | 9 | void main() { 10 | late MoviesResponse exampleResponse; 11 | 12 | setUp(() { 13 | exampleResponse = MoviesResponse.fromJson(exampleJsonResponse2); 14 | }); 15 | 16 | testWidgets('Display Movies List', (WidgetTester tester) async { 17 | mockNetworkImagesFor(() async { 18 | await tester.pumpWidget( 19 | MaterialApp( 20 | home: Scaffold( 21 | body: MoviesList( 22 | response: exampleResponse, 23 | ), 24 | ), 25 | ), 26 | ); 27 | 28 | Finder movieFinder = find.byType(MovieCard); 29 | expect(movieFinder, findsNWidgets(2)); 30 | 31 | // Expect movie card from exampleJson 32 | movieFinder = find.byKey(Key("1")); 33 | expect(movieFinder, findsOneWidget); 34 | 35 | movieFinder = find.byKey(Key("2")); 36 | expect(movieFinder, findsOneWidget); 37 | }); 38 | }); 39 | } -------------------------------------------------------------------------------- /test/src/services/app_service_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter_movie_deep_dive_test/src/models/models.dart'; 4 | import 'package:flutter_movie_deep_dive_test/src/services/services.dart'; 5 | import 'package:flutter_test/flutter_test.dart'; 6 | import 'package:http/http.dart'; 7 | import 'package:http/testing.dart'; 8 | 9 | import '../common.dart'; 10 | 11 | main() { 12 | group('loadMovies', () { 13 | test('status == 200', () async { 14 | final mockClient = MockClient((request) async { 15 | return Response(json.encode(exampleJsonResponse), 200); 16 | }); 17 | final service = AppService(mockClient); 18 | final expectedResponse = MoviesResponse.fromJson(exampleJsonResponse); 19 | final actualResponse = await service.loadMovies(); 20 | expect(actualResponse, equals(expectedResponse)); 21 | }); 22 | 23 | test('status != 200', () async { 24 | final mockClient = MockClient((request) async { 25 | return Response(json.encode(exampleJsonResponse), 500); 26 | }); 27 | final service = AppService(mockClient); 28 | expect( 29 | () async => await service.loadMovies(), 30 | throwsA(predicate((e) => 31 | e is LoadMoviesException && 32 | e.message == 'LoadMovies - Request Error: 500')), 33 | ); 34 | }); 35 | }); 36 | } -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_movie_deep_dive_test 2 | description: A movie flutter project. 3 | 4 | version: 1.0.0+1 5 | 6 | environment: 7 | sdk: ">=2.12.0 <3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | 13 | # Helps to implement equality without needing to explicitly override == and hashCode. 14 | equatable: ^2.0.3 15 | 16 | # A composable, multi-platform, Future-based API for HTTP requests. 17 | http: ^0.13.3 18 | 19 | # Functions that support JSON code generation via the `json_serializable` package. 20 | json_annotation: ^4.1.0 21 | 22 | # Widgets that make it easy to integrate blocs and cubits into Flutter. Built to work with package:bloc. 23 | flutter_bloc: ^7.3.0 24 | 25 | dev_dependencies: 26 | integration_test: 27 | sdk: flutter 28 | flutter_test: 29 | sdk: flutter 30 | 31 | bloc_test: ^8.5.0 32 | 33 | # Tools to write binaries that run builders. 34 | build_runner: ^2.1.2 35 | 36 | # Automatically generate code for converting to and from JSON by annotating Dart classes. 37 | json_serializable: ^5.0.2 38 | 39 | # Mock library for Dart inspired by Mockito. 40 | mockito: ^5.0.16 41 | 42 | # A utility for providing mocked response to Image.network in Flutter widget tests. 43 | network_image_mock: ^2.0.1 44 | 45 | flutter_lints: ^1.0.0 46 | 47 | flutter: 48 | uses-material-design: true 49 | assets: 50 | - assets/devfest.jpeg -------------------------------------------------------------------------------- /test/src/widgets/movie_card_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_movie_deep_dive_test/src/models/models.dart'; 3 | import 'package:flutter_movie_deep_dive_test/src/widgets/widgets.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | import 'package:network_image_mock/network_image_mock.dart'; 6 | 7 | import '../common.dart'; 8 | 9 | void main() { 10 | MoviesResponse exampleResponse; 11 | late Movie movie; 12 | 13 | setUp(() { 14 | exampleResponse = MoviesResponse.fromJson(exampleJsonResponse); 15 | movie = exampleResponse.movies.first; 16 | }); 17 | 18 | testWidgets('Display Movie Card', (WidgetTester tester) async { 19 | mockNetworkImagesFor(() async { 20 | await tester.pumpWidget( 21 | MaterialApp( 22 | home: Scaffold( 23 | body: MovieCard( 24 | key: Key("${movie.id}"), 25 | data: movie, 26 | ), 27 | ), 28 | ), 29 | ); 30 | 31 | final movieFinder = find.byType(MovieCard); 32 | expect(movieFinder, findsOneWidget); 33 | 34 | Finder textFinder = find.text(movie.title ?? ""); 35 | expect(textFinder, findsOneWidget); 36 | 37 | textFinder = find.text(movie.overview ?? ""); 38 | expect(textFinder, findsOneWidget); 39 | 40 | textFinder = find.text(movie.releaseDate ?? ""); 41 | expect(textFinder, findsOneWidget); 42 | }); 43 | }); 44 | } 45 | -------------------------------------------------------------------------------- /cloudbuild.yaml: -------------------------------------------------------------------------------- 1 | # Basic flutter build 2 | 3 | # In this directory, run the following command to build this builder. 4 | # $ gcloud builds submit . --config=cloudbuild.yaml 5 | 6 | steps: 7 | 8 | # clone the latest source codes 9 | - name: 'gcr.io/cloud-builders/git' 10 | args: ['clone', 'https://github.com/bwnyasse/flutter-testing-tutorial.git'] 11 | dir: '/workspace' 12 | 13 | # INTEGRATION : To run flutter build apk, one must need to be at the root of the project, 14 | # the script simply cd to the root before running the build command 15 | #------------------------------------------------------------------------------------------- 16 | - name: 'gcr.io/$PROJECT_ID/flutter' 17 | entrypoint: '/bin/bash' 18 | args: ['cloudbuild.sh', 'flutter-testing-tutorial'] 19 | 20 | # DEPLOYMENT: apk artifacts can be pushed to a GCS bucket like this 21 | #------------------------------------------------------------------ 22 | #- name: 'gcr.io/cloud-builders/gsutil' 23 | # args: ['cp', '/workspace/flutter/examples/hello_world/build/app/outputs/apk/release/app-release.apk', 'gs://$MY_BUCKET/hello_world.apk'] 24 | 25 | # DELIVERY : upload apk to google play store with Fastlane 26 | #----------------------------------------------------------- 27 | #- name: 'gcr.io/$PROJECT_ID/fastlane' 28 | # args: ['supply', '--package_name','${_ANDROID_PACKAGE_NAME}', '--track', '${_ANDROID_RELEASE_CHANNEL}', '--json_key_data', '${_GOOGLE_PLAY_UPLOAD_KEY_JSON}', '--apk', '/workspace/${_REPO_NAME}/build/app/outputs/apk/release/app-release.apk'] 29 | #timeout: 1200s 30 | 31 | tags: ['cloud-builders-community'] -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_movie_deep_dive_test 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 | -------------------------------------------------------------------------------- /test/src/blocs/app_bloc_test.mocks.dart: -------------------------------------------------------------------------------- 1 | // Mocks generated by Mockito 5.0.16 from annotations 2 | // in flutter_movie_deep_dive_test/test/src/blocs/app_bloc_test.dart. 3 | // Do not manually edit this file. 4 | 5 | import 'dart:async' as _i5; 6 | 7 | import 'package:flutter_movie_deep_dive_test/src/models/models.dart' as _i3; 8 | import 'package:flutter_movie_deep_dive_test/src/services/app_service.dart' 9 | as _i4; 10 | import 'package:http/http.dart' as _i2; 11 | import 'package:mockito/mockito.dart' as _i1; 12 | 13 | // ignore_for_file: avoid_redundant_argument_values 14 | // ignore_for_file: avoid_setters_without_getters 15 | // ignore_for_file: comment_references 16 | // ignore_for_file: implementation_imports 17 | // ignore_for_file: invalid_use_of_visible_for_testing_member 18 | // ignore_for_file: prefer_const_constructors 19 | // ignore_for_file: unnecessary_parenthesis 20 | // ignore_for_file: camel_case_types 21 | 22 | class _FakeClient_0 extends _i1.Fake implements _i2.Client {} 23 | 24 | class _FakeMoviesResponse_1 extends _i1.Fake implements _i3.MoviesResponse {} 25 | 26 | /// A class which mocks [AppService]. 27 | /// 28 | /// See the documentation for Mockito's code generation for more information. 29 | class MockAppService extends _i1.Mock implements _i4.AppService { 30 | MockAppService() { 31 | _i1.throwOnMissingStub(this); 32 | } 33 | 34 | @override 35 | _i2.Client get client => (super.noSuchMethod(Invocation.getter(#client), 36 | returnValue: _FakeClient_0()) as _i2.Client); 37 | @override 38 | _i5.Future<_i3.MoviesResponse> loadMovies() => 39 | (super.noSuchMethod(Invocation.method(#loadMovies, []), 40 | returnValue: 41 | Future<_i3.MoviesResponse>.value(_FakeMoviesResponse_1())) 42 | as _i5.Future<_i3.MoviesResponse>); 43 | @override 44 | String toString() => super.toString(); 45 | } 46 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /integration_test/app_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:integration_test/integration_test.dart'; 4 | import 'main.dart' as app; 5 | 6 | void main() { 7 | group('Testing App Performance Tests', () { 8 | final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized() as IntegrationTestWidgetsFlutterBinding; 9 | 10 | binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive; 11 | 12 | testWidgets('starts with topRated', (tester) async { 13 | app.main(); 14 | await tester.pumpAndSettle(); 15 | 16 | // Movie 1 17 | final titleTextFinder1 = find.byKey(Key('1-title')); 18 | final overviewTextFinder1 = find.byKey(Key('1-overview')); 19 | final releaseTextFinder1 = find.byKey(Key('1-releaseDate')); 20 | // checking widget present or not 21 | expect(titleTextFinder1, findsOneWidget); 22 | expect(overviewTextFinder1, findsOneWidget); 23 | expect(releaseTextFinder1, findsOneWidget); 24 | 25 | // checking values 26 | expect((titleTextFinder1.evaluate().single.widget as Text).data, 'Fight Club'); 27 | expect((overviewTextFinder1.evaluate().single.widget as Text).data, 'Overview 1'); 28 | expect((releaseTextFinder1.evaluate().single.widget as Text).data, '1999-10-12'); 29 | 30 | // Movie 2 31 | final titleTextFinder2 = find.byKey(Key('2-title')); 32 | final overviewTextFinder2 = find.byKey(Key('2-overview')); 33 | final releaseTextFinder2 = find.byKey(Key('2-releaseDate')); 34 | // checking widget present or not 35 | expect(titleTextFinder2, findsOneWidget); 36 | expect(overviewTextFinder2, findsOneWidget); 37 | expect(releaseTextFinder2, findsOneWidget); 38 | 39 | // checking values 40 | expect((titleTextFinder2.evaluate().single.widget as Text).data, 'Fight Club 2'); 41 | expect((overviewTextFinder2.evaluate().single.widget as Text).data, 'Overview 2'); 42 | expect((releaseTextFinder2.evaluate().single.widget as Text).data, '1999-10-20'); 43 | }); 44 | }); 45 | } 46 | -------------------------------------------------------------------------------- /test/src/blocs/app_bloc_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:bloc_test/bloc_test.dart'; 2 | import 'package:flutter_movie_deep_dive_test/src/blocs/blocs.dart'; 3 | import 'package:flutter_movie_deep_dive_test/src/models/models.dart'; 4 | import 'package:flutter_movie_deep_dive_test/src/services/services.dart'; 5 | import 'package:flutter_test/flutter_test.dart'; 6 | import 'package:mockito/mockito.dart'; 7 | import 'package:mockito/annotations.dart'; 8 | 9 | import '../common.dart'; 10 | import 'app_bloc_test.mocks.dart'; 11 | 12 | const loading = TypeMatcher(); 13 | const error = TypeMatcher(); 14 | const empty = TypeMatcher(); 15 | 16 | @GenerateMocks([AppService]) 17 | main() { 18 | MockAppService serviceMock = MockAppService(); 19 | AppBloc appBloc = AppBloc(service: serviceMock, initWithState: AppEmpty()); 20 | late MoviesResponse response; 21 | 22 | setUp(() { 23 | response = MoviesResponse.fromJson(exampleJsonResponse); 24 | }); 25 | 26 | tearDown(() { 27 | appBloc.close(); 28 | }); 29 | 30 | test('App close does not emit new app state', () async { 31 | appBloc.close(); 32 | await expectLater( 33 | appBloc.stream, 34 | emitsInOrder([emitsDone]), 35 | ); 36 | }); 37 | 38 | test('AppEmpty is initialState', () { 39 | expect(appBloc.initWithState, empty); 40 | }); 41 | 42 | group('Bloc AppState', () { 43 | blocTest( 44 | 'emits [AppError] state', 45 | build: () { 46 | when(serviceMock.loadMovies()).thenThrow(Error); 47 | return AppBloc(service: serviceMock, initWithState: AppEmpty()); 48 | }, 49 | act: (bloc) => bloc.add(FetchEvent()), 50 | expect: () => [empty, loading, error], 51 | ); 52 | 53 | blocTest( 54 | 'emits [AppLoaded] state', 55 | build: () { 56 | when(serviceMock.loadMovies()).thenAnswer((_) => Future.value(response)); 57 | return AppBloc(service: serviceMock, initWithState: AppEmpty()); 58 | }, 59 | act: (bloc) => bloc.add(FetchEvent()), 60 | expect: () => [empty, loading, AppLoaded(response: response)], 61 | ); 62 | }); 63 | } 64 | -------------------------------------------------------------------------------- /lib/src/widgets/movie_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_movie_deep_dive_test/src/models/models.dart'; 3 | 4 | class MovieCard extends StatelessWidget { 5 | final Movie data; 6 | 7 | const MovieCard({ 8 | Key? key, 9 | required this.data, 10 | }) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Padding( 15 | padding: const EdgeInsets.all(8.0), 16 | child: Card( 17 | child: Padding( 18 | padding: const EdgeInsets.all(8.0), 19 | child: Column( 20 | children: [ 21 | SizedBox( 22 | height: 284, 23 | child: Image.network( 24 | data.posterPathResolved, 25 | ), 26 | ), 27 | Padding( 28 | padding: const EdgeInsets.all(8.0), 29 | child: Text( 30 | data.title ?? "", 31 | key: Key('${data.id}-title'), 32 | textAlign: TextAlign.left, 33 | style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18), 34 | ), 35 | ), 36 | Text( 37 | data.overview ?? "", 38 | key: Key("${data.id}-overview"), 39 | style: TextStyle(color: Colors.black54), 40 | ), 41 | Padding( 42 | padding: const EdgeInsets.symmetric(vertical: 16), 43 | child: Row( 44 | children: [ 45 | Icon(Icons.movie), 46 | Text('release-date:'), 47 | Expanded( 48 | child: Padding( 49 | padding: const EdgeInsets.only(left: 8), 50 | child: Text( 51 | data.releaseDate ?? "", 52 | key: Key("${data.id}-releaseDate"), 53 | ), 54 | ), 55 | ), 56 | ], 57 | ), 58 | ), 59 | ], 60 | ), 61 | ), 62 | ), 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/src/widgets/home.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_movie_deep_dive_test/src/blocs/app_event.dart'; 4 | import 'package:flutter_movie_deep_dive_test/src/blocs/blocs.dart'; 5 | import 'package:flutter_movie_deep_dive_test/src/widgets/widgets.dart'; 6 | 7 | class MyHomePage extends StatefulWidget { 8 | final String title; 9 | 10 | MyHomePage({ 11 | Key? key, 12 | required this.title, 13 | }) : super(key: key); 14 | 15 | @override 16 | _MyHomePageState createState() => _MyHomePageState(); 17 | } 18 | 19 | class _MyHomePageState extends State { 20 | @override 21 | void initState() { 22 | super.initState(); 23 | BlocProvider.of(context).add(FetchEvent()); 24 | } 25 | 26 | Drawer _buildDrawer() => Drawer( 27 | child: ListView( 28 | children: [ 29 | DrawerHeader( 30 | child: Container( 31 | child: Image.asset( 32 | "assets/devfest.jpeg", 33 | ), 34 | ), 35 | ), 36 | ], 37 | ), 38 | ); 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | return Scaffold( 43 | appBar: AppBar( 44 | title: Text(widget.title), 45 | ), 46 | drawer: _buildDrawer(), 47 | body: BlocListener( 48 | listener: (context, state) { 49 | if (state is AppLoaded) { 50 | // Nothing to do 51 | } 52 | }, 53 | child: BlocBuilder(builder: (context, state) { 54 | // Is Loading 55 | if (state is AppLoading) { 56 | return Center(child: CircularProgressIndicator()); 57 | } 58 | 59 | // Is Loaded 60 | if (state is AppLoaded) { 61 | return MoviesList(response: state.response); 62 | } 63 | 64 | // State error 65 | if (state is AppError) { 66 | return Text( 67 | 'Something went wrong!', 68 | style: TextStyle(color: Colors.red), 69 | ); 70 | } 71 | return Center(child: Text('Wait ...')); 72 | }), 73 | ), 74 | ); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /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.flutter_movie_deep_dive_test" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | testImplementation 'junit:junit:4.12' 65 | androidTestImplementation 'androidx.test:runner:1.1.1' 66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 67 | } 68 | -------------------------------------------------------------------------------- /lib/src/models/movies.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'movies.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | MoviesResponse _$MoviesResponseFromJson(Map json) => 10 | MoviesResponse( 11 | page: json['page'] as int, 12 | totalPages: json['total_pages'] as int, 13 | totalResults: json['total_results'] as int, 14 | movies: (json['results'] as List) 15 | .map((e) => Movie.fromJson(e as Map)) 16 | .toList(), 17 | ); 18 | 19 | Map _$MoviesResponseToJson(MoviesResponse instance) => 20 | { 21 | 'page': instance.page, 22 | 'total_results': instance.totalResults, 23 | 'total_pages': instance.totalPages, 24 | 'results': instance.movies, 25 | }; 26 | 27 | Movie _$MovieFromJson(Map json) => Movie( 28 | id: json['id'] as int?, 29 | video: json['video'] as bool?, 30 | voteCount: json['vote_count'] as int?, 31 | voteAverage: (json['vote_average'] as num?)?.toDouble(), 32 | title: json['title'] as String?, 33 | posterPath: json['poster_path'] as String?, 34 | originalLanguage: json['original_language'] as String?, 35 | originalTitle: json['original_title'] as String?, 36 | adult: json['adult'] as bool?, 37 | overview: json['overview'] as String?, 38 | backdropPath: json['backdrop_path'] as String?, 39 | popularity: (json['popularity'] as num?)?.toDouble(), 40 | releaseDate: json['release_date'] as String?, 41 | favorite: json['favorite'] as bool? ?? false, 42 | ); 43 | 44 | Map _$MovieToJson(Movie instance) => { 45 | 'id': instance.id, 46 | 'video': instance.video, 47 | 'vote_count': instance.voteCount, 48 | 'vote_average': instance.voteAverage, 49 | 'title': instance.title, 50 | 'poster_path': instance.posterPath, 51 | 'original_language': instance.originalLanguage, 52 | 'original_title': instance.originalTitle, 53 | 'adult': instance.adult, 54 | 'overview': instance.overview, 55 | 'backdrop_path': instance.backdropPath, 56 | 'popularity': instance.popularity, 57 | 'release_date': instance.releaseDate, 58 | 'favorite': instance.favorite, 59 | }; 60 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/src/models/movies.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | 4 | part 'movies.g.dart'; 5 | 6 | @JsonSerializable() 7 | class MoviesResponse extends Equatable { 8 | final int page; 9 | 10 | @JsonKey(name: 'total_results') 11 | final int totalResults; 12 | 13 | @JsonKey(name: 'total_pages') 14 | final int totalPages; 15 | 16 | @JsonKey(name: 'results') 17 | final List movies; 18 | 19 | MoviesResponse({ 20 | required this.page, 21 | required this.totalPages, 22 | required this.totalResults, 23 | required this.movies, 24 | }); 25 | 26 | factory MoviesResponse.fromJson(Map json) => _$MoviesResponseFromJson(json); 27 | 28 | @override 29 | List get props => [ 30 | this.page, 31 | this.totalPages, 32 | this.totalResults, 33 | this.movies, 34 | ]; 35 | } 36 | 37 | @JsonSerializable() 38 | class Movie extends Equatable { 39 | final int? id; 40 | 41 | final bool? video; 42 | 43 | @JsonKey(name: 'vote_count') 44 | final int? voteCount; 45 | 46 | @JsonKey(name: 'vote_average') 47 | final double? voteAverage; 48 | 49 | final String? title; 50 | 51 | @JsonKey(name: 'poster_path') 52 | final String? posterPath; 53 | 54 | @JsonKey(name: 'original_language') 55 | final String? originalLanguage; 56 | 57 | @JsonKey(name: 'original_title') 58 | final String? originalTitle; 59 | 60 | final bool? adult; 61 | 62 | final String? overview; 63 | 64 | @JsonKey(name: 'gender_ids') 65 | final List? genreIds = []; 66 | 67 | @JsonKey(name: 'backdrop_path') 68 | final String? backdropPath; 69 | 70 | final double? popularity; 71 | 72 | @JsonKey(name: 'release_date') 73 | final String? releaseDate; 74 | 75 | @JsonKey(defaultValue: false) 76 | final bool? favorite; 77 | 78 | Movie({ 79 | this.id, 80 | this.video, 81 | this.voteCount, 82 | this.voteAverage, 83 | this.title, 84 | this.posterPath, 85 | this.originalLanguage, 86 | this.originalTitle, 87 | this.adult, 88 | this.overview, 89 | this.backdropPath, 90 | this.popularity, 91 | this.releaseDate, 92 | this.favorite, 93 | }); 94 | 95 | factory Movie.fromJson(Map json) => _$MovieFromJson(json); 96 | 97 | @override 98 | List get props => [ 99 | this.id, 100 | this.video, 101 | this.voteCount, 102 | this.voteAverage, 103 | this.title, 104 | this.posterPath, 105 | this.originalLanguage, 106 | this.originalTitle, 107 | this.adult, 108 | this.overview, 109 | this.backdropPath, 110 | this.popularity, 111 | this.releaseDate, 112 | this.favorite, 113 | ]; 114 | 115 | String get posterPathResolved => 116 | posterPath == null ? 'https://via.placeholder.com/300' : 'http://image.tmdb.org/t/p/w185/$posterPath'; 117 | } 118 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 18 | 23 | 28 | 33 | 34 |
LicenseGitlab CIGithub ActionGCP Cloud BuildCodeMagic Build
11 | 12 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 | 29 | 30 | 31 | 32 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 51 | 56 | 57 |
PlatformCode CoverageCoverage with codecov.io
44 | 45 | 47 | 48 | 49 | 50 | 52 | 53 | 54 | 55 |
58 | 59 | # flutter_movie_deep_dive_test 60 | 61 | Testing Flutter Applications 62 | 63 | ## Don't forget to test your Dart Code 64 | 65 | Testing is one of the most important things during the software development. 66 | 67 | One of the beauty of the Dart Ecosystem, is the way developers can easily test their code. 68 | 69 | Flutter has 3 types of tests. 70 | 71 | - Unit tests are the one used for testing a method, or class. 72 | - Widget tests are the tests for controlling single widget. 73 | - Integration tests are tests the large scale or all of the application. 74 | 75 | ## Purpose 76 | 77 | Through a flutter movie application, this repository is the code source of my [codelab](https://codelabs-bwnyasse-net.web.app/flutter_testing_tutorial.html#0) that provides a step by step approach for testing your flutter application. 78 | 79 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /test/src/common.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_movie_deep_dive_test/src/services/services.dart'; 2 | import 'package:mockito/mockito.dart'; 3 | 4 | //class AppServiceMock extends Mock implements AppService {} 5 | 6 | /// 7 | /// Example JSON Response from the API : https://developers.themoviedb.org/3 8 | /// 9 | final exampleJsonResponse = { 10 | "page": 1, 11 | "total_pages": 1, 12 | "total_results": 1, 13 | "results": [ 14 | { 15 | "adult": false, 16 | "backdrop_path": "/fCayJrkfRaCRCTh8GqN30f8oyQF.jpg", 17 | "belongs_to_collection": null, 18 | "budget": 63000000, 19 | "genres": [ 20 | {"id": 18, "name": "Drama"} 21 | ], 22 | "homepage": "", 23 | "id": 550, 24 | "imdb_id": "tt0137523", 25 | "original_language": "en", 26 | "original_title": "Fight Club", 27 | "overview": 28 | "A ticking-time-bomb insomniac and a slippery soap salesman channel primal male aggression into a shocking new form of therapy. Their concept catches on, with underground \"fight clubs\" forming in every town, until an eccentric gets in the way and ignites an out-of-control spiral toward oblivion.", 29 | "popularity": 0.5, 30 | "poster_path": null, 31 | "production_companies": [ 32 | { 33 | "id": 508, 34 | "logo_path": "/7PzJdsLGlR7oW4J0J5Xcd0pHGRg.png", 35 | "name": "Regency Enterprises", 36 | "origin_country": "US" 37 | }, 38 | {"id": 711, "logo_path": null, "name": "Fox 2000 Pictures", "origin_country": ""}, 39 | {"id": 20555, "logo_path": null, "name": "Taurus Film", "origin_country": ""}, 40 | {"id": 54050, "logo_path": null, "name": "Linson Films", "origin_country": ""}, 41 | {"id": 54051, "logo_path": null, "name": "Atman Entertainment", "origin_country": ""}, 42 | {"id": 54052, "logo_path": null, "name": "Knickerbocker Films", "origin_country": ""}, 43 | {"id": 25, "logo_path": "/qZCc1lty5FzX30aOCVRBLzaVmcp.png", "name": "20th Century Fox", "origin_country": "US"} 44 | ], 45 | "production_countries": [ 46 | {"iso_3166_1": "US", "name": "United States of America"} 47 | ], 48 | "release_date": "1999-10-12", 49 | "revenue": 100853753, 50 | "runtime": 139, 51 | "spoken_languages": [ 52 | {"iso_639_1": "en", "name": "English"} 53 | ], 54 | "status": "Released", 55 | "tagline": "How much can you know about yourself if you've never been in a fight?", 56 | "title": "Fight Club", 57 | "video": false, 58 | "vote_average": 7.8, 59 | "vote_count": 3439 60 | } 61 | ], 62 | }; 63 | 64 | /// 65 | /// Another Example JSON Response from the API : https://developers.themoviedb.org/3 66 | /// 67 | final exampleJsonResponse2 = { 68 | "page": 1, 69 | "total_pages": 1, 70 | "total_results": 2, 71 | "results": [ 72 | { 73 | "adult": false, 74 | "backdrop_path": "/fCayJrkfRaCRCTh8GqN30f8oyQF.jpg", 75 | "homepage": "", 76 | "id": 1, 77 | "original_language": "en", 78 | "original_title": "Fight Club", 79 | "poster_path": null, 80 | "release_date": "1999-10-12", 81 | "title": "Fight Club", 82 | "overview": "Overview 1", 83 | "video": false, 84 | "vote_average": 7.8, 85 | "vote_count": 3439 86 | }, 87 | { 88 | "adult": false, 89 | "backdrop_path": "/fCayJrkfRaCECTh8GqN30f8oyQF.jpg", 90 | "homepage": "", 91 | "id": 2, 92 | "original_language": "en", 93 | "original_title": "London the best", 94 | "poster_path": null, 95 | "release_date": "1999-10-20", 96 | "title": "Fight Club 2", 97 | "overview": "Overview 2", 98 | "video": false, 99 | "vote_average": 8.8, 100 | "vote_count": 3440 101 | } 102 | ], 103 | }; 104 | -------------------------------------------------------------------------------- /test/src/widgets/home_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_bloc/flutter_bloc.dart'; 3 | import 'package:flutter_movie_deep_dive_test/src/blocs/blocs.dart'; 4 | import 'package:flutter_movie_deep_dive_test/src/models/models.dart'; 5 | import 'package:flutter_movie_deep_dive_test/src/providers/providers.dart'; 6 | import 'package:flutter_movie_deep_dive_test/src/services/services.dart'; 7 | import 'package:flutter_movie_deep_dive_test/src/widgets/widgets.dart'; 8 | import 'package:flutter_test/flutter_test.dart'; 9 | import 'package:http/http.dart'; 10 | import 'package:mockito/annotations.dart'; 11 | import 'package:network_image_mock/network_image_mock.dart'; 12 | import 'package:mockito/mockito.dart'; 13 | 14 | import '../blocs/app_bloc_test.mocks.dart'; 15 | import '../common.dart'; 16 | 17 | class UnknowState extends AppState {} 18 | 19 | @GenerateMocks([AppService]) 20 | void main() { 21 | MockAppService serviceMock = MockAppService(); 22 | late MoviesResponse response; 23 | setUp(() { 24 | response = MoviesResponse.fromJson(exampleJsonResponse2); 25 | when(serviceMock.loadMovies()).thenAnswer((_) => Future.value(response)); 26 | }); 27 | 28 | group('Display Home', () { 29 | testWidgets('state: AppLoading', (WidgetTester tester) async { 30 | await tester.pumpWidget( 31 | MaterialApp( 32 | home: Scaffold( 33 | body: AppProvider( 34 | httpClient: Client(), 35 | child: BlocProvider( 36 | create: (context) => AppBloc(service: serviceMock, initWithState: AppLoading()), 37 | child: MyHomePage(title: 'Test Widget'), 38 | ), 39 | ), 40 | ), 41 | ), 42 | ); 43 | 44 | Finder textFinder = find.byType(CircularProgressIndicator); 45 | expect(textFinder, findsOneWidget); 46 | }); 47 | 48 | testWidgets('state: AppLoaded', (WidgetTester tester) async { 49 | mockNetworkImagesFor(() async { 50 | await tester.pumpWidget( 51 | MaterialApp( 52 | home: Scaffold( 53 | body: AppProvider( 54 | httpClient: Client(), 55 | child: BlocProvider( 56 | create: (context) => AppBloc(service: serviceMock, initWithState: AppLoaded(response: response)), 57 | child: MyHomePage(title: 'Test Widget'), 58 | ), 59 | ), 60 | ), 61 | ), 62 | ); 63 | 64 | Finder textFinder = find.byType(MoviesList); 65 | expect(textFinder, findsOneWidget); 66 | }); 67 | }); 68 | 69 | testWidgets('state: AppError', (WidgetTester tester) async { 70 | await tester.pumpWidget( 71 | MaterialApp( 72 | home: Scaffold( 73 | body: AppProvider( 74 | httpClient: Client(), 75 | child: BlocProvider( 76 | create: (context) => AppBloc(service: serviceMock, initWithState: AppError()), 77 | child: MyHomePage(title: 'Test Widget'), 78 | ), 79 | ), 80 | ), 81 | ), 82 | ); 83 | 84 | Finder textFinder = find.text('Something went wrong!'); 85 | expect(textFinder, findsOneWidget); 86 | }); 87 | 88 | testWidgets('state: unknow', (WidgetTester tester) async { 89 | await tester.pumpWidget( 90 | MaterialApp( 91 | home: Scaffold( 92 | body: AppProvider( 93 | httpClient: Client(), 94 | child: BlocProvider( 95 | create: (context) => AppBloc(service: serviceMock, initWithState: UnknowState()), 96 | child: MyHomePage(title: 'Test Widget'), 97 | ), 98 | ), 99 | ), 100 | ), 101 | ); 102 | 103 | Finder textFinder = find.text('Wait ...'); 104 | expect(textFinder, findsOneWidget); 105 | }); 106 | }); 107 | } 108 | -------------------------------------------------------------------------------- /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: "30.0.0" 11 | analyzer: 12 | dependency: transitive 13 | description: 14 | name: analyzer 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.7.0" 18 | archive: 19 | dependency: transitive 20 | description: 21 | name: archive 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "3.1.2" 25 | args: 26 | dependency: transitive 27 | description: 28 | name: args 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "2.3.0" 32 | async: 33 | dependency: transitive 34 | description: 35 | name: async 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.8.1" 39 | bloc: 40 | dependency: transitive 41 | description: 42 | name: bloc 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "7.2.1" 46 | bloc_test: 47 | dependency: "direct dev" 48 | description: 49 | name: bloc_test 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "8.5.0" 53 | boolean_selector: 54 | dependency: transitive 55 | description: 56 | name: boolean_selector 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.1.0" 60 | build: 61 | dependency: transitive 62 | description: 63 | name: build 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "2.1.1" 67 | build_config: 68 | dependency: transitive 69 | description: 70 | name: build_config 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.0.0" 74 | build_daemon: 75 | dependency: transitive 76 | description: 77 | name: build_daemon 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "3.0.1" 81 | build_resolvers: 82 | dependency: transitive 83 | description: 84 | name: build_resolvers 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "2.0.4" 88 | build_runner: 89 | dependency: "direct dev" 90 | description: 91 | name: build_runner 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "2.1.4" 95 | build_runner_core: 96 | dependency: transitive 97 | description: 98 | name: build_runner_core 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "7.2.2" 102 | built_collection: 103 | dependency: transitive 104 | description: 105 | name: built_collection 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "5.1.1" 109 | built_value: 110 | dependency: transitive 111 | description: 112 | name: built_value 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "8.1.3" 116 | characters: 117 | dependency: transitive 118 | description: 119 | name: characters 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "1.1.0" 123 | charcode: 124 | dependency: transitive 125 | description: 126 | name: charcode 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "1.3.1" 130 | checked_yaml: 131 | dependency: transitive 132 | description: 133 | name: checked_yaml 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "2.0.1" 137 | cli_util: 138 | dependency: transitive 139 | description: 140 | name: cli_util 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "0.3.5" 144 | clock: 145 | dependency: transitive 146 | description: 147 | name: clock 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "1.1.0" 151 | code_builder: 152 | dependency: transitive 153 | description: 154 | name: code_builder 155 | url: "https://pub.dartlang.org" 156 | source: hosted 157 | version: "4.1.0" 158 | collection: 159 | dependency: transitive 160 | description: 161 | name: collection 162 | url: "https://pub.dartlang.org" 163 | source: hosted 164 | version: "1.15.0" 165 | convert: 166 | dependency: transitive 167 | description: 168 | name: convert 169 | url: "https://pub.dartlang.org" 170 | source: hosted 171 | version: "3.0.1" 172 | coverage: 173 | dependency: transitive 174 | description: 175 | name: coverage 176 | url: "https://pub.dartlang.org" 177 | source: hosted 178 | version: "1.0.3" 179 | crypto: 180 | dependency: transitive 181 | description: 182 | name: crypto 183 | url: "https://pub.dartlang.org" 184 | source: hosted 185 | version: "3.0.1" 186 | dart_style: 187 | dependency: transitive 188 | description: 189 | name: dart_style 190 | url: "https://pub.dartlang.org" 191 | source: hosted 192 | version: "2.2.0" 193 | diff_match_patch: 194 | dependency: transitive 195 | description: 196 | name: diff_match_patch 197 | url: "https://pub.dartlang.org" 198 | source: hosted 199 | version: "0.4.1" 200 | equatable: 201 | dependency: "direct main" 202 | description: 203 | name: equatable 204 | url: "https://pub.dartlang.org" 205 | source: hosted 206 | version: "2.0.3" 207 | fake_async: 208 | dependency: transitive 209 | description: 210 | name: fake_async 211 | url: "https://pub.dartlang.org" 212 | source: hosted 213 | version: "1.2.0" 214 | file: 215 | dependency: transitive 216 | description: 217 | name: file 218 | url: "https://pub.dartlang.org" 219 | source: hosted 220 | version: "6.1.2" 221 | fixnum: 222 | dependency: transitive 223 | description: 224 | name: fixnum 225 | url: "https://pub.dartlang.org" 226 | source: hosted 227 | version: "1.0.0" 228 | flutter: 229 | dependency: "direct main" 230 | description: flutter 231 | source: sdk 232 | version: "0.0.0" 233 | flutter_bloc: 234 | dependency: "direct main" 235 | description: 236 | name: flutter_bloc 237 | url: "https://pub.dartlang.org" 238 | source: hosted 239 | version: "7.3.2" 240 | flutter_driver: 241 | dependency: transitive 242 | description: flutter 243 | source: sdk 244 | version: "0.0.0" 245 | flutter_lints: 246 | dependency: "direct dev" 247 | description: 248 | name: flutter_lints 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "1.0.4" 252 | flutter_test: 253 | dependency: "direct dev" 254 | description: flutter 255 | source: sdk 256 | version: "0.0.0" 257 | frontend_server_client: 258 | dependency: transitive 259 | description: 260 | name: frontend_server_client 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "2.1.2" 264 | fuchsia_remote_debug_protocol: 265 | dependency: transitive 266 | description: flutter 267 | source: sdk 268 | version: "0.0.0" 269 | glob: 270 | dependency: transitive 271 | description: 272 | name: glob 273 | url: "https://pub.dartlang.org" 274 | source: hosted 275 | version: "2.0.2" 276 | graphs: 277 | dependency: transitive 278 | description: 279 | name: graphs 280 | url: "https://pub.dartlang.org" 281 | source: hosted 282 | version: "2.1.0" 283 | http: 284 | dependency: "direct main" 285 | description: 286 | name: http 287 | url: "https://pub.dartlang.org" 288 | source: hosted 289 | version: "0.13.4" 290 | http_multi_server: 291 | dependency: transitive 292 | description: 293 | name: http_multi_server 294 | url: "https://pub.dartlang.org" 295 | source: hosted 296 | version: "3.0.1" 297 | http_parser: 298 | dependency: transitive 299 | description: 300 | name: http_parser 301 | url: "https://pub.dartlang.org" 302 | source: hosted 303 | version: "4.0.0" 304 | integration_test: 305 | dependency: "direct dev" 306 | description: flutter 307 | source: sdk 308 | version: "0.0.0" 309 | io: 310 | dependency: transitive 311 | description: 312 | name: io 313 | url: "https://pub.dartlang.org" 314 | source: hosted 315 | version: "1.0.3" 316 | js: 317 | dependency: transitive 318 | description: 319 | name: js 320 | url: "https://pub.dartlang.org" 321 | source: hosted 322 | version: "0.6.3" 323 | json_annotation: 324 | dependency: "direct main" 325 | description: 326 | name: json_annotation 327 | url: "https://pub.dartlang.org" 328 | source: hosted 329 | version: "4.1.0" 330 | json_serializable: 331 | dependency: "direct dev" 332 | description: 333 | name: json_serializable 334 | url: "https://pub.dartlang.org" 335 | source: hosted 336 | version: "5.0.2" 337 | lints: 338 | dependency: transitive 339 | description: 340 | name: lints 341 | url: "https://pub.dartlang.org" 342 | source: hosted 343 | version: "1.0.1" 344 | logging: 345 | dependency: transitive 346 | description: 347 | name: logging 348 | url: "https://pub.dartlang.org" 349 | source: hosted 350 | version: "1.0.2" 351 | matcher: 352 | dependency: transitive 353 | description: 354 | name: matcher 355 | url: "https://pub.dartlang.org" 356 | source: hosted 357 | version: "0.12.10" 358 | meta: 359 | dependency: transitive 360 | description: 361 | name: meta 362 | url: "https://pub.dartlang.org" 363 | source: hosted 364 | version: "1.7.0" 365 | mime: 366 | dependency: transitive 367 | description: 368 | name: mime 369 | url: "https://pub.dartlang.org" 370 | source: hosted 371 | version: "1.0.1" 372 | mockito: 373 | dependency: "direct dev" 374 | description: 375 | name: mockito 376 | url: "https://pub.dartlang.org" 377 | source: hosted 378 | version: "5.0.16" 379 | mocktail: 380 | dependency: transitive 381 | description: 382 | name: mocktail 383 | url: "https://pub.dartlang.org" 384 | source: hosted 385 | version: "0.2.0" 386 | nested: 387 | dependency: transitive 388 | description: 389 | name: nested 390 | url: "https://pub.dartlang.org" 391 | source: hosted 392 | version: "1.0.0" 393 | network_image_mock: 394 | dependency: "direct dev" 395 | description: 396 | name: network_image_mock 397 | url: "https://pub.dartlang.org" 398 | source: hosted 399 | version: "2.0.1" 400 | node_preamble: 401 | dependency: transitive 402 | description: 403 | name: node_preamble 404 | url: "https://pub.dartlang.org" 405 | source: hosted 406 | version: "2.0.1" 407 | package_config: 408 | dependency: transitive 409 | description: 410 | name: package_config 411 | url: "https://pub.dartlang.org" 412 | source: hosted 413 | version: "2.0.2" 414 | path: 415 | dependency: transitive 416 | description: 417 | name: path 418 | url: "https://pub.dartlang.org" 419 | source: hosted 420 | version: "1.8.0" 421 | pedantic: 422 | dependency: transitive 423 | description: 424 | name: pedantic 425 | url: "https://pub.dartlang.org" 426 | source: hosted 427 | version: "1.11.1" 428 | platform: 429 | dependency: transitive 430 | description: 431 | name: platform 432 | url: "https://pub.dartlang.org" 433 | source: hosted 434 | version: "3.0.0" 435 | pool: 436 | dependency: transitive 437 | description: 438 | name: pool 439 | url: "https://pub.dartlang.org" 440 | source: hosted 441 | version: "1.5.0" 442 | process: 443 | dependency: transitive 444 | description: 445 | name: process 446 | url: "https://pub.dartlang.org" 447 | source: hosted 448 | version: "4.2.3" 449 | provider: 450 | dependency: transitive 451 | description: 452 | name: provider 453 | url: "https://pub.dartlang.org" 454 | source: hosted 455 | version: "6.0.1" 456 | pub_semver: 457 | dependency: transitive 458 | description: 459 | name: pub_semver 460 | url: "https://pub.dartlang.org" 461 | source: hosted 462 | version: "2.1.0" 463 | pubspec_parse: 464 | dependency: transitive 465 | description: 466 | name: pubspec_parse 467 | url: "https://pub.dartlang.org" 468 | source: hosted 469 | version: "1.1.0" 470 | shelf: 471 | dependency: transitive 472 | description: 473 | name: shelf 474 | url: "https://pub.dartlang.org" 475 | source: hosted 476 | version: "1.2.0" 477 | shelf_packages_handler: 478 | dependency: transitive 479 | description: 480 | name: shelf_packages_handler 481 | url: "https://pub.dartlang.org" 482 | source: hosted 483 | version: "3.0.0" 484 | shelf_static: 485 | dependency: transitive 486 | description: 487 | name: shelf_static 488 | url: "https://pub.dartlang.org" 489 | source: hosted 490 | version: "1.1.0" 491 | shelf_web_socket: 492 | dependency: transitive 493 | description: 494 | name: shelf_web_socket 495 | url: "https://pub.dartlang.org" 496 | source: hosted 497 | version: "1.0.1" 498 | sky_engine: 499 | dependency: transitive 500 | description: flutter 501 | source: sdk 502 | version: "0.0.99" 503 | source_gen: 504 | dependency: transitive 505 | description: 506 | name: source_gen 507 | url: "https://pub.dartlang.org" 508 | source: hosted 509 | version: "1.1.1" 510 | source_helper: 511 | dependency: transitive 512 | description: 513 | name: source_helper 514 | url: "https://pub.dartlang.org" 515 | source: hosted 516 | version: "1.3.0" 517 | source_map_stack_trace: 518 | dependency: transitive 519 | description: 520 | name: source_map_stack_trace 521 | url: "https://pub.dartlang.org" 522 | source: hosted 523 | version: "2.1.0" 524 | source_maps: 525 | dependency: transitive 526 | description: 527 | name: source_maps 528 | url: "https://pub.dartlang.org" 529 | source: hosted 530 | version: "0.10.10" 531 | source_span: 532 | dependency: transitive 533 | description: 534 | name: source_span 535 | url: "https://pub.dartlang.org" 536 | source: hosted 537 | version: "1.8.1" 538 | stack_trace: 539 | dependency: transitive 540 | description: 541 | name: stack_trace 542 | url: "https://pub.dartlang.org" 543 | source: hosted 544 | version: "1.10.0" 545 | stream_channel: 546 | dependency: transitive 547 | description: 548 | name: stream_channel 549 | url: "https://pub.dartlang.org" 550 | source: hosted 551 | version: "2.1.0" 552 | stream_transform: 553 | dependency: transitive 554 | description: 555 | name: stream_transform 556 | url: "https://pub.dartlang.org" 557 | source: hosted 558 | version: "2.0.0" 559 | string_scanner: 560 | dependency: transitive 561 | description: 562 | name: string_scanner 563 | url: "https://pub.dartlang.org" 564 | source: hosted 565 | version: "1.1.0" 566 | sync_http: 567 | dependency: transitive 568 | description: 569 | name: sync_http 570 | url: "https://pub.dartlang.org" 571 | source: hosted 572 | version: "0.3.0" 573 | term_glyph: 574 | dependency: transitive 575 | description: 576 | name: term_glyph 577 | url: "https://pub.dartlang.org" 578 | source: hosted 579 | version: "1.2.0" 580 | test: 581 | dependency: transitive 582 | description: 583 | name: test 584 | url: "https://pub.dartlang.org" 585 | source: hosted 586 | version: "1.17.10" 587 | test_api: 588 | dependency: transitive 589 | description: 590 | name: test_api 591 | url: "https://pub.dartlang.org" 592 | source: hosted 593 | version: "0.4.2" 594 | test_core: 595 | dependency: transitive 596 | description: 597 | name: test_core 598 | url: "https://pub.dartlang.org" 599 | source: hosted 600 | version: "0.4.0" 601 | timing: 602 | dependency: transitive 603 | description: 604 | name: timing 605 | url: "https://pub.dartlang.org" 606 | source: hosted 607 | version: "1.0.0" 608 | typed_data: 609 | dependency: transitive 610 | description: 611 | name: typed_data 612 | url: "https://pub.dartlang.org" 613 | source: hosted 614 | version: "1.3.0" 615 | vector_math: 616 | dependency: transitive 617 | description: 618 | name: vector_math 619 | url: "https://pub.dartlang.org" 620 | source: hosted 621 | version: "2.1.0" 622 | vm_service: 623 | dependency: transitive 624 | description: 625 | name: vm_service 626 | url: "https://pub.dartlang.org" 627 | source: hosted 628 | version: "7.1.1" 629 | watcher: 630 | dependency: transitive 631 | description: 632 | name: watcher 633 | url: "https://pub.dartlang.org" 634 | source: hosted 635 | version: "1.0.1" 636 | web_socket_channel: 637 | dependency: transitive 638 | description: 639 | name: web_socket_channel 640 | url: "https://pub.dartlang.org" 641 | source: hosted 642 | version: "2.1.0" 643 | webdriver: 644 | dependency: transitive 645 | description: 646 | name: webdriver 647 | url: "https://pub.dartlang.org" 648 | source: hosted 649 | version: "3.0.0" 650 | webkit_inspection_protocol: 651 | dependency: transitive 652 | description: 653 | name: webkit_inspection_protocol 654 | url: "https://pub.dartlang.org" 655 | source: hosted 656 | version: "1.0.0" 657 | yaml: 658 | dependency: transitive 659 | description: 660 | name: yaml 661 | url: "https://pub.dartlang.org" 662 | source: hosted 663 | version: "3.1.0" 664 | sdks: 665 | dart: ">=2.14.0 <3.0.0" 666 | flutter: ">=1.16.0" 667 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 5C4E4A9529FB495628BE0A52 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A0BAD2471F7AF3D972CCF011 /* Pods_Runner.framework */; }; 13 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 14 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 15 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 16 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXCopyFilesBuildPhase section */ 20 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 21 | isa = PBXCopyFilesBuildPhase; 22 | buildActionMask = 2147483647; 23 | dstPath = ""; 24 | dstSubfolderSpec = 10; 25 | files = ( 26 | ); 27 | name = "Embed Frameworks"; 28 | runOnlyForDeploymentPostprocessing = 0; 29 | }; 30 | /* End PBXCopyFilesBuildPhase section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 34 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 35 | 27949AAD2E3A6380BC558800 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 36 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 37 | 4988A1024EE7D9A2BEDA6B48 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 38 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 39 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 41 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 42 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 43 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 45 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 46 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 47 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | A0BAD2471F7AF3D972CCF011 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | A688FEF12B6E7D1C0A9D77C7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 50 | /* End PBXFileReference section */ 51 | 52 | /* Begin PBXFrameworksBuildPhase section */ 53 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | 5C4E4A9529FB495628BE0A52 /* Pods_Runner.framework in Frameworks */, 58 | ); 59 | runOnlyForDeploymentPostprocessing = 0; 60 | }; 61 | /* End PBXFrameworksBuildPhase section */ 62 | 63 | /* Begin PBXGroup section */ 64 | 87A09D3CC200B8B1F5C7DBA4 /* Frameworks */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | A0BAD2471F7AF3D972CCF011 /* Pods_Runner.framework */, 68 | ); 69 | name = Frameworks; 70 | sourceTree = ""; 71 | }; 72 | 9740EEB11CF90186004384FC /* Flutter */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 76 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 77 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 78 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 79 | ); 80 | name = Flutter; 81 | sourceTree = ""; 82 | }; 83 | 97C146E51CF9000F007C117D = { 84 | isa = PBXGroup; 85 | children = ( 86 | 9740EEB11CF90186004384FC /* Flutter */, 87 | 97C146F01CF9000F007C117D /* Runner */, 88 | 97C146EF1CF9000F007C117D /* Products */, 89 | CA5D4F72E797B7877C3D8BC8 /* Pods */, 90 | 87A09D3CC200B8B1F5C7DBA4 /* Frameworks */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 97C146EF1CF9000F007C117D /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 97C146EE1CF9000F007C117D /* Runner.app */, 98 | ); 99 | name = Products; 100 | sourceTree = ""; 101 | }; 102 | 97C146F01CF9000F007C117D /* Runner */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 106 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 107 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 108 | 97C147021CF9000F007C117D /* Info.plist */, 109 | 97C146F11CF9000F007C117D /* Supporting Files */, 110 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 111 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 112 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 113 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 114 | ); 115 | path = Runner; 116 | sourceTree = ""; 117 | }; 118 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | ); 122 | name = "Supporting Files"; 123 | sourceTree = ""; 124 | }; 125 | CA5D4F72E797B7877C3D8BC8 /* Pods */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | A688FEF12B6E7D1C0A9D77C7 /* Pods-Runner.debug.xcconfig */, 129 | 4988A1024EE7D9A2BEDA6B48 /* Pods-Runner.release.xcconfig */, 130 | 27949AAD2E3A6380BC558800 /* Pods-Runner.profile.xcconfig */, 131 | ); 132 | name = Pods; 133 | path = Pods; 134 | sourceTree = ""; 135 | }; 136 | /* End PBXGroup section */ 137 | 138 | /* Begin PBXNativeTarget section */ 139 | 97C146ED1CF9000F007C117D /* Runner */ = { 140 | isa = PBXNativeTarget; 141 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 142 | buildPhases = ( 143 | F121F1FBDC83888888124946 /* [CP] Check Pods Manifest.lock */, 144 | 9740EEB61CF901F6004384FC /* Run Script */, 145 | 97C146EA1CF9000F007C117D /* Sources */, 146 | 97C146EB1CF9000F007C117D /* Frameworks */, 147 | 97C146EC1CF9000F007C117D /* Resources */, 148 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 149 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 150 | 19C664C09B692F9E83446F14 /* [CP] Embed Pods Frameworks */, 151 | ); 152 | buildRules = ( 153 | ); 154 | dependencies = ( 155 | ); 156 | name = Runner; 157 | productName = Runner; 158 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 159 | productType = "com.apple.product-type.application"; 160 | }; 161 | /* End PBXNativeTarget section */ 162 | 163 | /* Begin PBXProject section */ 164 | 97C146E61CF9000F007C117D /* Project object */ = { 165 | isa = PBXProject; 166 | attributes = { 167 | LastUpgradeCheck = 1020; 168 | ORGANIZATIONNAME = "The Chromium Authors"; 169 | TargetAttributes = { 170 | 97C146ED1CF9000F007C117D = { 171 | CreatedOnToolsVersion = 7.3.1; 172 | LastSwiftMigration = 1100; 173 | }; 174 | }; 175 | }; 176 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 177 | compatibilityVersion = "Xcode 3.2"; 178 | developmentRegion = en; 179 | hasScannedForEncodings = 0; 180 | knownRegions = ( 181 | en, 182 | Base, 183 | ); 184 | mainGroup = 97C146E51CF9000F007C117D; 185 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 186 | projectDirPath = ""; 187 | projectRoot = ""; 188 | targets = ( 189 | 97C146ED1CF9000F007C117D /* Runner */, 190 | ); 191 | }; 192 | /* End PBXProject section */ 193 | 194 | /* Begin PBXResourcesBuildPhase section */ 195 | 97C146EC1CF9000F007C117D /* Resources */ = { 196 | isa = PBXResourcesBuildPhase; 197 | buildActionMask = 2147483647; 198 | files = ( 199 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 200 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 201 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 202 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | }; 206 | /* End PBXResourcesBuildPhase section */ 207 | 208 | /* Begin PBXShellScriptBuildPhase section */ 209 | 19C664C09B692F9E83446F14 /* [CP] Embed Pods Frameworks */ = { 210 | isa = PBXShellScriptBuildPhase; 211 | buildActionMask = 2147483647; 212 | files = ( 213 | ); 214 | inputPaths = ( 215 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 216 | "${BUILT_PRODUCTS_DIR}/integration_test/integration_test.framework", 217 | ); 218 | name = "[CP] Embed Pods Frameworks"; 219 | outputPaths = ( 220 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/integration_test.framework", 221 | ); 222 | runOnlyForDeploymentPostprocessing = 0; 223 | shellPath = /bin/sh; 224 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 225 | showEnvVarsInLog = 0; 226 | }; 227 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 228 | isa = PBXShellScriptBuildPhase; 229 | buildActionMask = 2147483647; 230 | files = ( 231 | ); 232 | inputPaths = ( 233 | ); 234 | name = "Thin Binary"; 235 | outputPaths = ( 236 | ); 237 | runOnlyForDeploymentPostprocessing = 0; 238 | shellPath = /bin/sh; 239 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 240 | }; 241 | 9740EEB61CF901F6004384FC /* Run Script */ = { 242 | isa = PBXShellScriptBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | ); 246 | inputPaths = ( 247 | ); 248 | name = "Run Script"; 249 | outputPaths = ( 250 | ); 251 | runOnlyForDeploymentPostprocessing = 0; 252 | shellPath = /bin/sh; 253 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 254 | }; 255 | F121F1FBDC83888888124946 /* [CP] Check Pods Manifest.lock */ = { 256 | isa = PBXShellScriptBuildPhase; 257 | buildActionMask = 2147483647; 258 | files = ( 259 | ); 260 | inputFileListPaths = ( 261 | ); 262 | inputPaths = ( 263 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 264 | "${PODS_ROOT}/Manifest.lock", 265 | ); 266 | name = "[CP] Check Pods Manifest.lock"; 267 | outputFileListPaths = ( 268 | ); 269 | outputPaths = ( 270 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | shellPath = /bin/sh; 274 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 275 | showEnvVarsInLog = 0; 276 | }; 277 | /* End PBXShellScriptBuildPhase section */ 278 | 279 | /* Begin PBXSourcesBuildPhase section */ 280 | 97C146EA1CF9000F007C117D /* Sources */ = { 281 | isa = PBXSourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 285 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 286 | ); 287 | runOnlyForDeploymentPostprocessing = 0; 288 | }; 289 | /* End PBXSourcesBuildPhase section */ 290 | 291 | /* Begin PBXVariantGroup section */ 292 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 293 | isa = PBXVariantGroup; 294 | children = ( 295 | 97C146FB1CF9000F007C117D /* Base */, 296 | ); 297 | name = Main.storyboard; 298 | sourceTree = ""; 299 | }; 300 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 301 | isa = PBXVariantGroup; 302 | children = ( 303 | 97C147001CF9000F007C117D /* Base */, 304 | ); 305 | name = LaunchScreen.storyboard; 306 | sourceTree = ""; 307 | }; 308 | /* End PBXVariantGroup section */ 309 | 310 | /* Begin XCBuildConfiguration section */ 311 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 312 | isa = XCBuildConfiguration; 313 | buildSettings = { 314 | ALWAYS_SEARCH_USER_PATHS = NO; 315 | CLANG_ANALYZER_NONNULL = YES; 316 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 317 | CLANG_CXX_LIBRARY = "libc++"; 318 | CLANG_ENABLE_MODULES = YES; 319 | CLANG_ENABLE_OBJC_ARC = YES; 320 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 321 | CLANG_WARN_BOOL_CONVERSION = YES; 322 | CLANG_WARN_COMMA = YES; 323 | CLANG_WARN_CONSTANT_CONVERSION = YES; 324 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 325 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 326 | CLANG_WARN_EMPTY_BODY = YES; 327 | CLANG_WARN_ENUM_CONVERSION = YES; 328 | CLANG_WARN_INFINITE_RECURSION = YES; 329 | CLANG_WARN_INT_CONVERSION = YES; 330 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 331 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 332 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 333 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 334 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 335 | CLANG_WARN_STRICT_PROTOTYPES = YES; 336 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 337 | CLANG_WARN_UNREACHABLE_CODE = YES; 338 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 339 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 340 | COPY_PHASE_STRIP = NO; 341 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 342 | ENABLE_NS_ASSERTIONS = NO; 343 | ENABLE_STRICT_OBJC_MSGSEND = YES; 344 | GCC_C_LANGUAGE_STANDARD = gnu99; 345 | GCC_NO_COMMON_BLOCKS = YES; 346 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 347 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 348 | GCC_WARN_UNDECLARED_SELECTOR = YES; 349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 350 | GCC_WARN_UNUSED_FUNCTION = YES; 351 | GCC_WARN_UNUSED_VARIABLE = YES; 352 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 353 | MTL_ENABLE_DEBUG_INFO = NO; 354 | SDKROOT = iphoneos; 355 | SUPPORTED_PLATFORMS = iphoneos; 356 | TARGETED_DEVICE_FAMILY = "1,2"; 357 | VALIDATE_PRODUCT = YES; 358 | }; 359 | name = Profile; 360 | }; 361 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 362 | isa = XCBuildConfiguration; 363 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 364 | buildSettings = { 365 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 366 | CLANG_ENABLE_MODULES = YES; 367 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 368 | ENABLE_BITCODE = NO; 369 | FRAMEWORK_SEARCH_PATHS = ( 370 | "$(inherited)", 371 | "$(PROJECT_DIR)/Flutter", 372 | ); 373 | INFOPLIST_FILE = Runner/Info.plist; 374 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 375 | LIBRARY_SEARCH_PATHS = ( 376 | "$(inherited)", 377 | "$(PROJECT_DIR)/Flutter", 378 | ); 379 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterMovieDeepDiveTest; 380 | PRODUCT_NAME = "$(TARGET_NAME)"; 381 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 382 | SWIFT_VERSION = 5.0; 383 | VERSIONING_SYSTEM = "apple-generic"; 384 | }; 385 | name = Profile; 386 | }; 387 | 97C147031CF9000F007C117D /* Debug */ = { 388 | isa = XCBuildConfiguration; 389 | buildSettings = { 390 | ALWAYS_SEARCH_USER_PATHS = NO; 391 | CLANG_ANALYZER_NONNULL = YES; 392 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 393 | CLANG_CXX_LIBRARY = "libc++"; 394 | CLANG_ENABLE_MODULES = YES; 395 | CLANG_ENABLE_OBJC_ARC = YES; 396 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 397 | CLANG_WARN_BOOL_CONVERSION = YES; 398 | CLANG_WARN_COMMA = YES; 399 | CLANG_WARN_CONSTANT_CONVERSION = YES; 400 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 401 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 402 | CLANG_WARN_EMPTY_BODY = YES; 403 | CLANG_WARN_ENUM_CONVERSION = YES; 404 | CLANG_WARN_INFINITE_RECURSION = YES; 405 | CLANG_WARN_INT_CONVERSION = YES; 406 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 407 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 408 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 409 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 410 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 411 | CLANG_WARN_STRICT_PROTOTYPES = YES; 412 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 413 | CLANG_WARN_UNREACHABLE_CODE = YES; 414 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 415 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 416 | COPY_PHASE_STRIP = NO; 417 | DEBUG_INFORMATION_FORMAT = dwarf; 418 | ENABLE_STRICT_OBJC_MSGSEND = YES; 419 | ENABLE_TESTABILITY = YES; 420 | GCC_C_LANGUAGE_STANDARD = gnu99; 421 | GCC_DYNAMIC_NO_PIC = NO; 422 | GCC_NO_COMMON_BLOCKS = YES; 423 | GCC_OPTIMIZATION_LEVEL = 0; 424 | GCC_PREPROCESSOR_DEFINITIONS = ( 425 | "DEBUG=1", 426 | "$(inherited)", 427 | ); 428 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 429 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 430 | GCC_WARN_UNDECLARED_SELECTOR = YES; 431 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 432 | GCC_WARN_UNUSED_FUNCTION = YES; 433 | GCC_WARN_UNUSED_VARIABLE = YES; 434 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 435 | MTL_ENABLE_DEBUG_INFO = YES; 436 | ONLY_ACTIVE_ARCH = YES; 437 | SDKROOT = iphoneos; 438 | TARGETED_DEVICE_FAMILY = "1,2"; 439 | }; 440 | name = Debug; 441 | }; 442 | 97C147041CF9000F007C117D /* Release */ = { 443 | isa = XCBuildConfiguration; 444 | buildSettings = { 445 | ALWAYS_SEARCH_USER_PATHS = NO; 446 | CLANG_ANALYZER_NONNULL = YES; 447 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 448 | CLANG_CXX_LIBRARY = "libc++"; 449 | CLANG_ENABLE_MODULES = YES; 450 | CLANG_ENABLE_OBJC_ARC = YES; 451 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 452 | CLANG_WARN_BOOL_CONVERSION = YES; 453 | CLANG_WARN_COMMA = YES; 454 | CLANG_WARN_CONSTANT_CONVERSION = YES; 455 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 456 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 457 | CLANG_WARN_EMPTY_BODY = YES; 458 | CLANG_WARN_ENUM_CONVERSION = YES; 459 | CLANG_WARN_INFINITE_RECURSION = YES; 460 | CLANG_WARN_INT_CONVERSION = YES; 461 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 462 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 463 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 464 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 465 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 466 | CLANG_WARN_STRICT_PROTOTYPES = YES; 467 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 468 | CLANG_WARN_UNREACHABLE_CODE = YES; 469 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 470 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 471 | COPY_PHASE_STRIP = NO; 472 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 473 | ENABLE_NS_ASSERTIONS = NO; 474 | ENABLE_STRICT_OBJC_MSGSEND = YES; 475 | GCC_C_LANGUAGE_STANDARD = gnu99; 476 | GCC_NO_COMMON_BLOCKS = YES; 477 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 478 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 479 | GCC_WARN_UNDECLARED_SELECTOR = YES; 480 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 481 | GCC_WARN_UNUSED_FUNCTION = YES; 482 | GCC_WARN_UNUSED_VARIABLE = YES; 483 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 484 | MTL_ENABLE_DEBUG_INFO = NO; 485 | SDKROOT = iphoneos; 486 | SUPPORTED_PLATFORMS = iphoneos; 487 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 488 | TARGETED_DEVICE_FAMILY = "1,2"; 489 | VALIDATE_PRODUCT = YES; 490 | }; 491 | name = Release; 492 | }; 493 | 97C147061CF9000F007C117D /* Debug */ = { 494 | isa = XCBuildConfiguration; 495 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 496 | buildSettings = { 497 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 498 | CLANG_ENABLE_MODULES = YES; 499 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 500 | ENABLE_BITCODE = NO; 501 | FRAMEWORK_SEARCH_PATHS = ( 502 | "$(inherited)", 503 | "$(PROJECT_DIR)/Flutter", 504 | ); 505 | INFOPLIST_FILE = Runner/Info.plist; 506 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 507 | LIBRARY_SEARCH_PATHS = ( 508 | "$(inherited)", 509 | "$(PROJECT_DIR)/Flutter", 510 | ); 511 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterMovieDeepDiveTest; 512 | PRODUCT_NAME = "$(TARGET_NAME)"; 513 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 514 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 515 | SWIFT_VERSION = 5.0; 516 | VERSIONING_SYSTEM = "apple-generic"; 517 | }; 518 | name = Debug; 519 | }; 520 | 97C147071CF9000F007C117D /* Release */ = { 521 | isa = XCBuildConfiguration; 522 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 523 | buildSettings = { 524 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 525 | CLANG_ENABLE_MODULES = YES; 526 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 527 | ENABLE_BITCODE = NO; 528 | FRAMEWORK_SEARCH_PATHS = ( 529 | "$(inherited)", 530 | "$(PROJECT_DIR)/Flutter", 531 | ); 532 | INFOPLIST_FILE = Runner/Info.plist; 533 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 534 | LIBRARY_SEARCH_PATHS = ( 535 | "$(inherited)", 536 | "$(PROJECT_DIR)/Flutter", 537 | ); 538 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterMovieDeepDiveTest; 539 | PRODUCT_NAME = "$(TARGET_NAME)"; 540 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 541 | SWIFT_VERSION = 5.0; 542 | VERSIONING_SYSTEM = "apple-generic"; 543 | }; 544 | name = Release; 545 | }; 546 | /* End XCBuildConfiguration section */ 547 | 548 | /* Begin XCConfigurationList section */ 549 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 550 | isa = XCConfigurationList; 551 | buildConfigurations = ( 552 | 97C147031CF9000F007C117D /* Debug */, 553 | 97C147041CF9000F007C117D /* Release */, 554 | 249021D3217E4FDB00AE95B9 /* Profile */, 555 | ); 556 | defaultConfigurationIsVisible = 0; 557 | defaultConfigurationName = Release; 558 | }; 559 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 560 | isa = XCConfigurationList; 561 | buildConfigurations = ( 562 | 97C147061CF9000F007C117D /* Debug */, 563 | 97C147071CF9000F007C117D /* Release */, 564 | 249021D4217E4FDB00AE95B9 /* Profile */, 565 | ); 566 | defaultConfigurationIsVisible = 0; 567 | defaultConfigurationName = Release; 568 | }; 569 | /* End XCConfigurationList section */ 570 | }; 571 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 572 | } 573 | --------------------------------------------------------------------------------