├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ └── Icon-512.png ├── manifest.json └── index.html ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── dsilvera │ │ │ │ │ └── flutter_architecture │ │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle └── build.gradle ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── AppDelegate.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 │ ├── main.m │ ├── AppDelegate.m │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── .gitignore └── Podfile ├── lib ├── domain │ ├── repository │ │ └── quiz_repository.dart │ ├── entities │ │ └── question.dart │ └── usecase │ │ └── quiz_usecase.dart ├── core │ └── error │ │ └── failure.dart ├── main.dart ├── data │ ├── models │ │ ├── request │ │ │ └── question_request.dart │ │ └── response │ │ │ └── question_response.dart │ ├── repository │ │ └── quiz_repository_impl.dart │ └── api │ │ └── remote_api.dart └── presentation │ ├── common │ └── widgets │ │ ├── circular_icon.dart │ │ ├── error.dart │ │ └── custom_button.dart │ └── quiz │ ├── viewmodel │ ├── quiz_state.dart │ └── quiz_view_model.dart │ ├── widget │ ├── quiz_result.dart │ ├── answer_card.dart │ └── quiz_question.dart │ └── screen │ └── quiz_screen.dart ├── README.md ├── test └── widget_test.dart ├── pubspec.yaml └── pubspec.lock /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsilvera/flutter_architecture/HEAD/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsilvera/flutter_architecture/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsilvera/flutter_architecture/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsilvera/flutter_architecture/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsilvera/flutter_architecture/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsilvera/flutter_architecture/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsilvera/flutter_architecture/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/dsilvera/flutter_architecture/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 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/dsilvera/flutter_architecture/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.dsilvera.flutter_architecture; 2 | 3 | import io.flutter.embedding.android.FlutterActivity; 4 | 5 | public class MainActivity extends FlutterActivity { 6 | } 7 | -------------------------------------------------------------------------------- /lib/domain/repository/quiz_repository.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_architecture/domain/entities/question.dart'; 2 | 3 | abstract class QuizRepository { 4 | Future> getQuestions({required int numQuestions, required int categoryId}); 5 | } 6 | -------------------------------------------------------------------------------- /lib/core/error/failure.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | 3 | class Failure extends Equatable { 4 | final String message; 5 | 6 | const Failure({this.message = ''}); 7 | 8 | @override 9 | List get props => [message]; 10 | } 11 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #import "AppDelegate.h" 2 | #import "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:4.1.0' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:hooks_riverpod/hooks_riverpod.dart'; 3 | 4 | import 'presentation/quiz/screen/quiz_screen.dart'; 5 | 6 | void main() { 7 | runApp(ProviderScope(child:MyApp())); 8 | } 9 | 10 | class MyApp extends StatelessWidget { 11 | @override 12 | Widget build(BuildContext context) { 13 | return MaterialApp( 14 | title: 'Flutter Quiz', 15 | debugShowCheckedModeBanner: false, 16 | theme: ThemeData( 17 | bottomSheetTheme: const BottomSheetThemeData(backgroundColor: Colors.transparent), 18 | ), 19 | home: QuizScreen(), 20 | ); 21 | } 22 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter_architecture 2 | 3 | A new Flutter application. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | # flutter_architecture 18 | -------------------------------------------------------------------------------- /lib/data/models/request/question_request.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:meta/meta.dart'; 3 | 4 | class QuestionRequest extends Equatable { 5 | final String type; 6 | final int amount; 7 | final int category; 8 | 9 | const QuestionRequest({required this.type, required this.amount, required this.category}); 10 | 11 | @override 12 | List get props => [type, amount, category]; 13 | 14 | Map toMap() { 15 | final queryParameters = { 16 | 'type': type, 17 | 'amount': amount, 18 | 'category': category, 19 | }; 20 | return queryParameters; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /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/domain/entities/question.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:meta/meta.dart'; 3 | 4 | class Question extends Equatable { 5 | final String category; 6 | final String difficulty; 7 | final String question; 8 | final String correctAnswer; 9 | final List answers; 10 | 11 | const Question({ 12 | required this.category, 13 | required this.difficulty, 14 | required this.question, 15 | required this.correctAnswer, 16 | required this.answers, 17 | }); 18 | 19 | @override 20 | List get props => [ 21 | category, 22 | difficulty, 23 | question, 24 | correctAnswer, 25 | answers, 26 | ]; 27 | 28 | } -------------------------------------------------------------------------------- /lib/presentation/common/widgets/circular_icon.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CircularIcon extends StatelessWidget { 4 | final IconData icon; 5 | final Color color; 6 | 7 | const CircularIcon({ 8 | required this.icon, 9 | required this.color, 10 | }) : super(); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Container( 15 | width: 24.0, 16 | height: 24.0, 17 | decoration: BoxDecoration( 18 | color: color, 19 | shape: BoxShape.circle 20 | ), 21 | child:Icon( 22 | icon, 23 | color: Colors.white, 24 | size: 16.0, 25 | ), 26 | ); 27 | } 28 | 29 | } -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "flutter_architecture", 3 | "short_name": "flutter_architecture", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter application.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /lib/domain/usecase/quiz_usecase.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter_architecture/data/repository/quiz_repository_impl.dart'; 4 | import 'package:flutter_architecture/domain/entities/question.dart'; 5 | import 'package:flutter_architecture/domain/repository/quiz_repository.dart'; 6 | import 'package:hooks_riverpod/hooks_riverpod.dart'; 7 | 8 | final quizUseCaseProvider = 9 | Provider((ref) => QuizUseCase(ref.read(quizRepositoryProvider))); 10 | 11 | class QuizUseCase { 12 | QuizUseCase(this._repository); 13 | 14 | final QuizRepository _repository; 15 | 16 | Future> getQuestions() { 17 | return _repository.getQuestions(numQuestions: 5, categoryId: Random().nextInt(24) + 9); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/presentation/common/widgets/error.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import 'custom_button.dart'; 5 | 6 | class Error extends StatelessWidget { 7 | final String message; 8 | final VoidCallback callback; 9 | 10 | const Error({ 11 | required this.message, 12 | required this.callback, 13 | }) : super(); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Center( 18 | child: Column( 19 | mainAxisAlignment: MainAxisAlignment.center, 20 | children: [ 21 | Text( 22 | message, 23 | style: const TextStyle( 24 | color: Colors.white, 25 | fontSize: 20.0, 26 | ), 27 | ), 28 | const SizedBox(height: 20.0), 29 | CustomButton( 30 | title: 'Retry', 31 | onTap: () => callback, 32 | ) 33 | ], 34 | ), 35 | ); 36 | } 37 | } -------------------------------------------------------------------------------- /lib/data/repository/quiz_repository_impl.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_architecture/data/api/remote_api.dart'; 2 | import 'package:flutter_architecture/data/models/request/question_request.dart'; 3 | import 'package:flutter_architecture/domain/entities/question.dart'; 4 | import 'package:flutter_architecture/domain/repository/quiz_repository.dart'; 5 | import 'package:hooks_riverpod/hooks_riverpod.dart'; 6 | 7 | final quizRepositoryProvider = 8 | Provider((ref)=> QuizRepositoryImpl(ref.read(remoteApiProvider))); 9 | 10 | class QuizRepositoryImpl extends QuizRepository { 11 | final RemoteApi _remoteApi; 12 | 13 | QuizRepositoryImpl(this._remoteApi); 14 | 15 | @override 16 | Future> getQuestions({required int numQuestions, required int categoryId}) { 17 | return _remoteApi 18 | .getQuestions(QuestionRequest(type: 'multiple', amount: numQuestions, category: categoryId)) 19 | .then((value) => value.map((e) => e.toEntity()).toList()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/presentation/common/widgets/custom_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CustomButton extends StatelessWidget { 4 | final String title; 5 | final VoidCallback onTap; 6 | 7 | const CustomButton({ 8 | required this.title, 9 | required this.onTap, 10 | }) : super(); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return GestureDetector( 15 | onTap: onTap, 16 | child: Container( 17 | margin: const EdgeInsets.all(20.0), 18 | height: 50.0, 19 | width: double.infinity, 20 | decoration: BoxDecoration( 21 | color: Color(0xffE6812F), 22 | borderRadius: BorderRadius.circular(10.0), 23 | ), 24 | alignment: Alignment.center, 25 | child: Text( 26 | title, 27 | style: const TextStyle( 28 | fontSize: 18.0, 29 | color: Colors.white, 30 | fontWeight: FontWeight.w600, 31 | ), 32 | ), 33 | ), 34 | ); 35 | } 36 | } -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /lib/presentation/quiz/viewmodel/quiz_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | 3 | enum QuizStatus { initial, correct, incorrect, complete } 4 | 5 | class QuizState extends Equatable { 6 | final String selectedAnswer; 7 | final int nbCorrect; 8 | final QuizStatus status; 9 | 10 | const QuizState({ 11 | required this.selectedAnswer, 12 | required this.nbCorrect, 13 | required this.status, 14 | }); 15 | 16 | 17 | @override 18 | List get props => [ 19 | selectedAnswer, 20 | nbCorrect, 21 | status, 22 | ]; 23 | 24 | factory QuizState.initial() { 25 | return QuizState( 26 | selectedAnswer: '', 27 | nbCorrect: 0, 28 | status: QuizStatus.initial, 29 | ); 30 | } 31 | 32 | bool get answered => status == QuizStatus.incorrect || status == QuizStatus.correct; 33 | 34 | QuizState copyWith({ 35 | String? selectedAnswer, 36 | int? correct, 37 | QuizStatus? status, 38 | }) { 39 | return QuizState( 40 | selectedAnswer: selectedAnswer ?? this.selectedAnswer, 41 | nbCorrect: correct ?? this.nbCorrect, 42 | status: status ?? this.status, 43 | ); 44 | } 45 | } -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_architecture/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/data/api/remote_api.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:dio/dio.dart'; 4 | import 'package:flutter_architecture/core/error/failure.dart'; 5 | import 'package:flutter_architecture/data/models/request/question_request.dart'; 6 | import 'package:flutter_architecture/data/models/response/question_response.dart'; 7 | import 'package:hooks_riverpod/hooks_riverpod.dart'; 8 | 9 | final remoteApiProvider = Provider((ref) => RemoteApi()); 10 | 11 | class RemoteApi { 12 | static const String url = 'https://opentdb.com/api.php'; 13 | 14 | Future> getQuestions(QuestionRequest request) async { 15 | // Appel WS 16 | try { 17 | final response = await Dio().get(url, queryParameters: request.toMap()); 18 | 19 | // Récupérer réponse 20 | if (response.statusCode == 200) { 21 | final data = Map.from(response.data); 22 | final results = List>.from(data['results']); 23 | if (results.isNotEmpty) { 24 | return results.map((e) => QuestionResponse.fromMap(e)).toList(); 25 | } 26 | } 27 | return []; 28 | } on DioError catch (err) { 29 | print(err); 30 | throw Failure(message: err.response?.statusMessage ?? 'Something went wrong!'); 31 | } on SocketException catch (err) { 32 | print(err); 33 | throw Failure(message: 'Please check your connection.'); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 32 | end 33 | 34 | post_install do |installer| 35 | installer.pods_project.targets.each do |target| 36 | flutter_additional_ios_build_settings(target) 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /lib/data/models/response/question_response.dart: -------------------------------------------------------------------------------- 1 | import 'package:equatable/equatable.dart'; 2 | import 'package:flutter_architecture/domain/entities/question.dart'; 3 | import 'package:meta/meta.dart'; 4 | 5 | class QuestionResponse extends Equatable { 6 | final String category; 7 | final String difficulty; 8 | final String question; 9 | final String correctAnswer; 10 | final List incorrectAnswers; 11 | 12 | const QuestionResponse({ 13 | required this.category, 14 | required this.difficulty, 15 | required this.question, 16 | required this.correctAnswer, 17 | required this.incorrectAnswers, 18 | }); 19 | 20 | @override 21 | List get props => 22 | [ 23 | category, 24 | difficulty, 25 | question, 26 | correctAnswer, 27 | incorrectAnswers, 28 | ]; 29 | 30 | Question toEntity() { 31 | return Question( 32 | category: category, 33 | difficulty: difficulty, 34 | question: question, 35 | correctAnswer: correctAnswer, 36 | answers: incorrectAnswers 37 | ..add(correctAnswer) 38 | ..shuffle()); 39 | } 40 | 41 | factory QuestionResponse.fromMap(Map map) { 42 | return QuestionResponse( 43 | category: map['category'] ?? '', 44 | difficulty: map['difficulty'] ?? '', 45 | question: map['question'] ?? '', 46 | correctAnswer: map['correct_answer'] ?? '', 47 | incorrectAnswers: List.from(map['incorrect_answers'] ?? []), 48 | ); 49 | } 50 | } -------------------------------------------------------------------------------- /lib/presentation/quiz/viewmodel/quiz_view_model.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_architecture/domain/entities/question.dart'; 2 | import 'package:flutter_architecture/domain/usecase/quiz_usecase.dart'; 3 | import 'package:hooks_riverpod/hooks_riverpod.dart'; 4 | 5 | import 'quiz_state.dart'; 6 | 7 | final quizViewModelProvider = StateNotifierProvider.autoDispose( 8 | (ref) => QuizViewModel(ref.read(quizUseCaseProvider))); 9 | 10 | final questionsProvider = FutureProvider.autoDispose>( 11 | (ref) => ref.watch(quizViewModelProvider.notifier).getQuestions()); 12 | 13 | class QuizViewModel extends StateNotifier { 14 | QuizViewModel(this._useCase) : super(QuizState.initial()); 15 | final QuizUseCase _useCase; 16 | 17 | Future> getQuestions() { 18 | return _useCase.getQuestions(); 19 | } 20 | 21 | void submitAnswer(Question currentQuestion, String answer) { 22 | if (state.answered) return; 23 | if (currentQuestion.correctAnswer == answer) { 24 | state = state.copyWith( 25 | selectedAnswer: answer, 26 | correct: state.nbCorrect + 1, 27 | status: QuizStatus.correct, 28 | ); 29 | } else { 30 | state = state.copyWith( 31 | selectedAnswer: answer, 32 | status: QuizStatus.incorrect, 33 | ); 34 | } 35 | } 36 | 37 | void nextQuestion(List questions, int currentIndex) { 38 | state = state.copyWith( 39 | selectedAnswer: '', 40 | status: currentIndex + 1 < questions.length ? QuizStatus.initial : QuizStatus.complete 41 | ); 42 | } 43 | 44 | void reset(){ 45 | state = QuizState.initial(); 46 | } 47 | } -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | flutter_architecture 30 | 31 | 32 | 33 | 36 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /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_architecture 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /lib/presentation/quiz/widget/quiz_result.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/presentation/common/widgets/custom_button.dart'; 3 | import 'package:flutter_architecture/presentation/quiz/viewmodel/quiz_state.dart'; 4 | import 'package:flutter_architecture/presentation/quiz/viewmodel/quiz_view_model.dart'; 5 | import 'package:hooks_riverpod/hooks_riverpod.dart'; 6 | 7 | class QuizResults extends StatelessWidget { 8 | final QuizState state; 9 | final int nbQuestions; 10 | 11 | const QuizResults({ 12 | required this.state, 13 | required this.nbQuestions, 14 | }) : super(); 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Column( 19 | mainAxisAlignment: MainAxisAlignment.center, 20 | crossAxisAlignment: CrossAxisAlignment.stretch, 21 | children: [ 22 | Text( 23 | '${state.nbCorrect} / $nbQuestions', 24 | style: const TextStyle( 25 | color: Colors.white, 26 | fontSize: 60.0, 27 | fontWeight: FontWeight.w600, 28 | ), 29 | textAlign: TextAlign.center, 30 | ), 31 | const Text( 32 | 'CORRECT', 33 | style: TextStyle( 34 | color: Colors.white, 35 | fontSize: 48.0, 36 | fontWeight: FontWeight.bold, 37 | ), 38 | textAlign: TextAlign.center, 39 | ), 40 | const SizedBox(height: 40.0), 41 | CustomButton( 42 | title: 'New Quiz', 43 | onTap: () { 44 | context.refresh(questionsProvider); 45 | context.read(quizViewModelProvider.notifier).reset(); 46 | }, 47 | ), 48 | ], 49 | ); 50 | } 51 | } -------------------------------------------------------------------------------- /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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 30 29 | 30 | defaultConfig { 31 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 32 | applicationId "com.dsilvera.flutter_architecture" 33 | minSdkVersion 16 34 | targetSdkVersion 30 35 | versionCode flutterVersionCode.toInteger() 36 | versionName flutterVersionName 37 | } 38 | 39 | buildTypes { 40 | release { 41 | // TODO: Add your own signing config for the release build. 42 | // Signing with the debug keys for now, so `flutter run --release` works. 43 | signingConfig signingConfigs.debug 44 | } 45 | } 46 | } 47 | 48 | flutter { 49 | source '../..' 50 | } 51 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 13 | 17 | 21 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /lib/presentation/quiz/widget/answer_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_architecture/presentation/common/widgets/circular_icon.dart'; 4 | import 'package:html_character_entities/html_character_entities.dart'; 5 | 6 | class AnswerCard extends StatelessWidget { 7 | final String answer; 8 | final bool isSelected; 9 | final bool isCorrect; 10 | final bool isDisplayingAnswer; 11 | final VoidCallback onTap; 12 | 13 | const AnswerCard({ 14 | required this.answer, 15 | required this.isSelected, 16 | required this.isCorrect, 17 | required this.isDisplayingAnswer, 18 | required this.onTap, 19 | }) : super(); 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return GestureDetector( 24 | onTap: onTap, 25 | child: Container( 26 | margin: const EdgeInsets.all(10.0), 27 | padding: const EdgeInsets.all(10.0), 28 | decoration: BoxDecoration( 29 | color: Color(0xffCCDCE7), 30 | border: Border.all( 31 | color: isDisplayingAnswer 32 | ? isCorrect 33 | ? Colors.green 34 | : isSelected 35 | ? Colors.red 36 | : Color(0xffCCDCE7) 37 | : Color(0xffCCDCE7), 38 | width: 4.0, 39 | ), 40 | borderRadius: BorderRadius.circular(10.0), 41 | ), 42 | child: Row( 43 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 44 | children: [ 45 | Flexible( 46 | child: Text( 47 | HtmlCharacterEntities.decode(answer), 48 | style: TextStyle( 49 | color: Colors.black, 50 | fontSize: 18.0, 51 | fontWeight: isDisplayingAnswer && isCorrect ? FontWeight.bold : FontWeight.normal, 52 | ), 53 | ), 54 | ), 55 | if (isDisplayingAnswer) 56 | isCorrect 57 | ? const CircularIcon(icon: Icons.check, color: Colors.green) 58 | : isSelected 59 | ? const CircularIcon( 60 | icon: Icons.close, 61 | color: Colors.red, 62 | ) 63 | : const SizedBox.shrink() 64 | ], 65 | ), 66 | ), 67 | ); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/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 | -------------------------------------------------------------------------------- /lib/presentation/quiz/screen/quiz_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/domain/entities/question.dart'; 3 | import 'package:flutter_architecture/presentation/common/widgets/custom_button.dart'; 4 | import 'package:flutter_architecture/presentation/common/widgets/error.dart'; 5 | import 'package:flutter_architecture/presentation/quiz/viewmodel/quiz_state.dart'; 6 | import 'package:flutter_architecture/presentation/quiz/viewmodel/quiz_view_model.dart'; 7 | import 'package:flutter_architecture/presentation/quiz/widget/quiz_question.dart'; 8 | import 'package:flutter_architecture/presentation/quiz/widget/quiz_result.dart'; 9 | import 'package:flutter_hooks/flutter_hooks.dart'; 10 | import 'package:hooks_riverpod/hooks_riverpod.dart'; 11 | 12 | class QuizScreen extends HookWidget { 13 | @override 14 | Widget build(BuildContext context) { 15 | final pageController = usePageController(); 16 | final viewModelState = useProvider(quizViewModelProvider); 17 | final questionsFuture = useProvider(questionsProvider); 18 | return Container( 19 | decoration: BoxDecoration( 20 | color: Color(0xFF22293E), 21 | ), 22 | child: Scaffold( 23 | backgroundColor: Colors.transparent, 24 | body: questionsFuture.when( 25 | data: (questions) => _buildBody(context, viewModelState, pageController, questions), 26 | loading: () => const Center(child: CircularProgressIndicator()), 27 | error: (error, _) => Error( 28 | message: error.toString(), 29 | callback: () => refreshAll(context), 30 | )), 31 | bottomSheet: questionsFuture.maybeWhen( 32 | data: (questions) { 33 | if (!viewModelState.answered) return SizedBox.shrink(); 34 | var currentIndex = pageController.page?.toInt() ?? 0; 35 | return CustomButton( 36 | title: currentIndex + 1 < questions.length ? 'Next Question' : 'See results', 37 | onTap: () { 38 | context 39 | .read(quizViewModelProvider.notifier) 40 | .nextQuestion(questions, currentIndex); 41 | if (currentIndex + 1 < questions.length) { 42 | pageController.nextPage( 43 | duration: const Duration(microseconds: 250), curve: Curves.linear); 44 | } 45 | }); 46 | }, 47 | orElse: () => SizedBox.shrink()), 48 | ), 49 | ); 50 | } 51 | 52 | void refreshAll(BuildContext context) { 53 | context.refresh(questionsProvider); 54 | context.read(quizViewModelProvider.notifier).reset(); 55 | } 56 | 57 | Widget _buildBody( 58 | BuildContext context, 59 | QuizState state, 60 | PageController pageController, 61 | List questions, 62 | ) { 63 | if (questions.isEmpty) { 64 | return Error(message: 'No questions found', callback: () => refreshAll(context)); 65 | } 66 | 67 | return state.status == QuizStatus.complete 68 | ? QuizResults(state: state, nbQuestions: questions.length) 69 | : QuizQuestions(pageController: pageController, state: state, questions: questions); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_architecture 2 | description: A new Flutter application. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.12.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | dio: ^4.0.0 27 | equatable: ^2.0.0 28 | html_character_entities: ^1.0.0+1 29 | google_fonts: ^2.0.0 30 | meta: ^1.3.0 31 | flutter_hooks: ^0.16.0 32 | hooks_riverpod: ^0.14.0+3 33 | 34 | 35 | # The following adds the Cupertino Icons font to your application. 36 | # Use with the CupertinoIcons class for iOS style icons. 37 | cupertino_icons: ^1.0.2 38 | 39 | dev_dependencies: 40 | flutter_test: 41 | sdk: flutter 42 | 43 | # For information on the generic Dart part of this file, see the 44 | # following page: https://dart.dev/tools/pub/pubspec 45 | 46 | # The following section is specific to Flutter. 47 | flutter: 48 | 49 | # The following line ensures that the Material Icons font is 50 | # included with your application, so that you can use the icons in 51 | # the material Icons class. 52 | uses-material-design: true 53 | 54 | # To add assets to your application, add an assets section, like this: 55 | # assets: 56 | # - images/a_dot_burr.jpeg 57 | # - images/a_dot_ham.jpeg 58 | 59 | # An image asset can refer to one or more resolution-specific "variants", see 60 | # https://flutter.dev/assets-and-images/#resolution-aware. 61 | 62 | # For details regarding adding assets from package dependencies, see 63 | # https://flutter.dev/assets-and-images/#from-packages 64 | 65 | # To add custom fonts to your application, add a fonts section here, 66 | # in this "flutter" section. Each entry in this list should have a 67 | # "family" key with the font family name, and a "fonts" key with a 68 | # list giving the asset and other descriptors for the font. For 69 | # example: 70 | # fonts: 71 | # - family: Schyler 72 | # fonts: 73 | # - asset: fonts/Schyler-Regular.ttf 74 | # - asset: fonts/Schyler-Italic.ttf 75 | # style: italic 76 | # - family: Trajan Pro 77 | # fonts: 78 | # - asset: fonts/TrajanPro.ttf 79 | # - asset: fonts/TrajanPro_Bold.ttf 80 | # weight: 700 81 | # 82 | # For details regarding fonts from package dependencies, 83 | # see https://flutter.dev/custom-fonts/#from-packages 84 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/presentation/quiz/widget/quiz_question.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_architecture/domain/entities/question.dart'; 3 | import 'package:flutter_architecture/presentation/quiz/viewmodel/quiz_state.dart'; 4 | import 'package:flutter_architecture/presentation/quiz/viewmodel/quiz_view_model.dart'; 5 | import 'package:google_fonts/google_fonts.dart'; 6 | import 'package:html_character_entities/html_character_entities.dart'; 7 | import 'package:hooks_riverpod/hooks_riverpod.dart'; 8 | 9 | import 'answer_card.dart'; 10 | 11 | class QuizQuestions extends StatelessWidget { 12 | final PageController pageController; 13 | final QuizState state; 14 | final List questions; 15 | 16 | const QuizQuestions({ 17 | required this.pageController, 18 | required this.state, 19 | required this.questions, 20 | }) : super(); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return PageView.builder( 25 | controller: pageController, 26 | physics: NeverScrollableScrollPhysics(), 27 | itemCount: questions.length, 28 | itemBuilder: (BuildContext context, int index) { 29 | final question = questions[index]; 30 | return Column( 31 | mainAxisAlignment: MainAxisAlignment.center, 32 | children: [ 33 | Container( 34 | height: 60, 35 | decoration: BoxDecoration( 36 | color: Color(0xff2E415A), 37 | borderRadius: BorderRadius.only( 38 | bottomLeft: Radius.circular(20), bottomRight: Radius.circular(20)) 39 | ), 40 | child: Center( 41 | child: Text(HtmlCharacterEntities.decode(question.category), 42 | style: GoogleFonts.notoSans( 43 | color: Colors.white, 44 | fontSize: 24.0, 45 | fontWeight: FontWeight.w400, 46 | ) 47 | ), 48 | ), 49 | ), 50 | SizedBox(height: 20), 51 | Row( 52 | children: [ 53 | Spacer(), 54 | Padding(padding: const EdgeInsets.only(right: 10.0, bottom: 5.0), 55 | child: Text( 56 | '${index + 1}/${questions.length}', 57 | textAlign: TextAlign.right, 58 | style: const TextStyle( 59 | color: Colors.white, 60 | fontSize: 14.0, 61 | fontWeight: FontWeight.normal, 62 | ) 63 | ) 64 | ), 65 | ], 66 | ), 67 | Padding(padding: const EdgeInsets.only(left: 10.0, right: 10.0, bottom: 10.0), 68 | child: LinearProgressIndicator( 69 | value: index / questions.length, 70 | valueColor: AlwaysStoppedAnimation(Color(0xffE6812F)), 71 | backgroundColor: Colors.white, 72 | ), 73 | ), 74 | Container( 75 | height: 150.0, 76 | padding: const EdgeInsets.only(top: 10.0, left: 10.0, right: 10.0), 77 | child: Center( 78 | child: Text( 79 | HtmlCharacterEntities.decode(question.question), 80 | style: GoogleFonts.lato( 81 | color: Colors.white, 82 | fontSize: 24.0, 83 | fontWeight: FontWeight.w400, 84 | ) 85 | ), 86 | ), 87 | ), 88 | Expanded(child: GridView.builder( 89 | itemCount: question.answers.length, 90 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 91 | crossAxisCount: 2, childAspectRatio: 1.4), 92 | itemBuilder: (BuildContext context, int index) { 93 | final answer = question.answers[index]; 94 | return AnswerCard( 95 | answer:answer, 96 | isSelected: answer == state.selectedAnswer, 97 | isCorrect : answer == question.correctAnswer, 98 | isDisplayingAnswer : state.answered, 99 | onTap : () => context 100 | .read(quizViewModelProvider.notifier) 101 | .submitAnswer(question, answer) 102 | ); 103 | }, 104 | )) 105 | 106 | ], 107 | ); 108 | } 109 | 110 | ); 111 | } 112 | 113 | } -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.5.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.2.0" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.15.0" 46 | crypto: 47 | dependency: transitive 48 | description: 49 | name: crypto 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "3.0.1" 53 | cupertino_icons: 54 | dependency: "direct main" 55 | description: 56 | name: cupertino_icons 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.0.3" 60 | dio: 61 | dependency: "direct main" 62 | description: 63 | name: dio 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "4.0.0" 67 | equatable: 68 | dependency: "direct main" 69 | description: 70 | name: equatable 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "2.0.0" 74 | fake_async: 75 | dependency: transitive 76 | description: 77 | name: fake_async 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.2.0" 81 | ffi: 82 | dependency: transitive 83 | description: 84 | name: ffi 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "1.0.0" 88 | file: 89 | dependency: transitive 90 | description: 91 | name: file 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "6.1.0" 95 | flutter: 96 | dependency: "direct main" 97 | description: flutter 98 | source: sdk 99 | version: "0.0.0" 100 | flutter_hooks: 101 | dependency: "direct main" 102 | description: 103 | name: flutter_hooks 104 | url: "https://pub.dartlang.org" 105 | source: hosted 106 | version: "0.16.0" 107 | flutter_riverpod: 108 | dependency: transitive 109 | description: 110 | name: flutter_riverpod 111 | url: "https://pub.dartlang.org" 112 | source: hosted 113 | version: "0.14.0+3" 114 | flutter_test: 115 | dependency: "direct dev" 116 | description: flutter 117 | source: sdk 118 | version: "0.0.0" 119 | freezed_annotation: 120 | dependency: transitive 121 | description: 122 | name: freezed_annotation 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "0.14.1" 126 | google_fonts: 127 | dependency: "direct main" 128 | description: 129 | name: google_fonts 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "2.0.0" 133 | hooks_riverpod: 134 | dependency: "direct main" 135 | description: 136 | name: hooks_riverpod 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "0.14.0+3" 140 | html_character_entities: 141 | dependency: "direct main" 142 | description: 143 | name: html_character_entities 144 | url: "https://pub.dartlang.org" 145 | source: hosted 146 | version: "1.0.0+1" 147 | http: 148 | dependency: transitive 149 | description: 150 | name: http 151 | url: "https://pub.dartlang.org" 152 | source: hosted 153 | version: "0.13.3" 154 | http_parser: 155 | dependency: transitive 156 | description: 157 | name: http_parser 158 | url: "https://pub.dartlang.org" 159 | source: hosted 160 | version: "4.0.0" 161 | json_annotation: 162 | dependency: transitive 163 | description: 164 | name: json_annotation 165 | url: "https://pub.dartlang.org" 166 | source: hosted 167 | version: "4.0.1" 168 | matcher: 169 | dependency: transitive 170 | description: 171 | name: matcher 172 | url: "https://pub.dartlang.org" 173 | source: hosted 174 | version: "0.12.10" 175 | meta: 176 | dependency: "direct main" 177 | description: 178 | name: meta 179 | url: "https://pub.dartlang.org" 180 | source: hosted 181 | version: "1.3.0" 182 | path: 183 | dependency: transitive 184 | description: 185 | name: path 186 | url: "https://pub.dartlang.org" 187 | source: hosted 188 | version: "1.8.0" 189 | path_provider: 190 | dependency: transitive 191 | description: 192 | name: path_provider 193 | url: "https://pub.dartlang.org" 194 | source: hosted 195 | version: "2.0.1" 196 | path_provider_linux: 197 | dependency: transitive 198 | description: 199 | name: path_provider_linux 200 | url: "https://pub.dartlang.org" 201 | source: hosted 202 | version: "2.0.0" 203 | path_provider_macos: 204 | dependency: transitive 205 | description: 206 | name: path_provider_macos 207 | url: "https://pub.dartlang.org" 208 | source: hosted 209 | version: "2.0.0" 210 | path_provider_platform_interface: 211 | dependency: transitive 212 | description: 213 | name: path_provider_platform_interface 214 | url: "https://pub.dartlang.org" 215 | source: hosted 216 | version: "2.0.1" 217 | path_provider_windows: 218 | dependency: transitive 219 | description: 220 | name: path_provider_windows 221 | url: "https://pub.dartlang.org" 222 | source: hosted 223 | version: "2.0.1" 224 | pedantic: 225 | dependency: transitive 226 | description: 227 | name: pedantic 228 | url: "https://pub.dartlang.org" 229 | source: hosted 230 | version: "1.11.0" 231 | platform: 232 | dependency: transitive 233 | description: 234 | name: platform 235 | url: "https://pub.dartlang.org" 236 | source: hosted 237 | version: "3.0.0" 238 | plugin_platform_interface: 239 | dependency: transitive 240 | description: 241 | name: plugin_platform_interface 242 | url: "https://pub.dartlang.org" 243 | source: hosted 244 | version: "2.0.0" 245 | process: 246 | dependency: transitive 247 | description: 248 | name: process 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "4.2.1" 252 | riverpod: 253 | dependency: transitive 254 | description: 255 | name: riverpod 256 | url: "https://pub.dartlang.org" 257 | source: hosted 258 | version: "0.14.0+3" 259 | sky_engine: 260 | dependency: transitive 261 | description: flutter 262 | source: sdk 263 | version: "0.0.99" 264 | source_span: 265 | dependency: transitive 266 | description: 267 | name: source_span 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "1.8.0" 271 | stack_trace: 272 | dependency: transitive 273 | description: 274 | name: stack_trace 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "1.10.0" 278 | state_notifier: 279 | dependency: transitive 280 | description: 281 | name: state_notifier 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "0.7.0" 285 | stream_channel: 286 | dependency: transitive 287 | description: 288 | name: stream_channel 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "2.1.0" 292 | string_scanner: 293 | dependency: transitive 294 | description: 295 | name: string_scanner 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "1.1.0" 299 | term_glyph: 300 | dependency: transitive 301 | description: 302 | name: term_glyph 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "1.2.0" 306 | test_api: 307 | dependency: transitive 308 | description: 309 | name: test_api 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "0.2.19" 313 | typed_data: 314 | dependency: transitive 315 | description: 316 | name: typed_data 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "1.3.0" 320 | vector_math: 321 | dependency: transitive 322 | description: 323 | name: vector_math 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "2.1.0" 327 | win32: 328 | dependency: transitive 329 | description: 330 | name: win32 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "2.0.5" 334 | xdg_directories: 335 | dependency: transitive 336 | description: 337 | name: xdg_directories 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "0.2.0" 341 | sdks: 342 | dart: ">=2.12.0 <3.0.0" 343 | flutter: ">=1.20.0" 344 | -------------------------------------------------------------------------------- /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 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 13 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 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 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 36 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 37 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 38 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 39 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 40 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 41 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 43 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 44 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 45 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 46 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | /* End PBXFileReference section */ 48 | 49 | /* Begin PBXFrameworksBuildPhase section */ 50 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 51 | isa = PBXFrameworksBuildPhase; 52 | buildActionMask = 2147483647; 53 | files = ( 54 | ); 55 | runOnlyForDeploymentPostprocessing = 0; 56 | }; 57 | /* End PBXFrameworksBuildPhase section */ 58 | 59 | /* Begin PBXGroup section */ 60 | 9740EEB11CF90186004384FC /* Flutter */ = { 61 | isa = PBXGroup; 62 | children = ( 63 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 64 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 65 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 66 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 67 | ); 68 | name = Flutter; 69 | sourceTree = ""; 70 | }; 71 | 97C146E51CF9000F007C117D = { 72 | isa = PBXGroup; 73 | children = ( 74 | 9740EEB11CF90186004384FC /* Flutter */, 75 | 97C146F01CF9000F007C117D /* Runner */, 76 | 97C146EF1CF9000F007C117D /* Products */, 77 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 78 | ); 79 | sourceTree = ""; 80 | }; 81 | 97C146EF1CF9000F007C117D /* Products */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 97C146EE1CF9000F007C117D /* Runner.app */, 85 | ); 86 | name = Products; 87 | sourceTree = ""; 88 | }; 89 | 97C146F01CF9000F007C117D /* Runner */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 93 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 94 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 95 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 96 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 97 | 97C147021CF9000F007C117D /* Info.plist */, 98 | 97C146F11CF9000F007C117D /* Supporting Files */, 99 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 100 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 101 | ); 102 | path = Runner; 103 | sourceTree = ""; 104 | }; 105 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 97C146F21CF9000F007C117D /* main.m */, 109 | ); 110 | name = "Supporting Files"; 111 | sourceTree = ""; 112 | }; 113 | /* End PBXGroup section */ 114 | 115 | /* Begin PBXNativeTarget section */ 116 | 97C146ED1CF9000F007C117D /* Runner */ = { 117 | isa = PBXNativeTarget; 118 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 119 | buildPhases = ( 120 | 9740EEB61CF901F6004384FC /* Run Script */, 121 | 97C146EA1CF9000F007C117D /* Sources */, 122 | 97C146EB1CF9000F007C117D /* Frameworks */, 123 | 97C146EC1CF9000F007C117D /* Resources */, 124 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 125 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 126 | ); 127 | buildRules = ( 128 | ); 129 | dependencies = ( 130 | ); 131 | name = Runner; 132 | productName = Runner; 133 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 134 | productType = "com.apple.product-type.application"; 135 | }; 136 | /* End PBXNativeTarget section */ 137 | 138 | /* Begin PBXProject section */ 139 | 97C146E61CF9000F007C117D /* Project object */ = { 140 | isa = PBXProject; 141 | attributes = { 142 | LastUpgradeCheck = 1020; 143 | ORGANIZATIONNAME = ""; 144 | TargetAttributes = { 145 | 97C146ED1CF9000F007C117D = { 146 | CreatedOnToolsVersion = 7.3.1; 147 | }; 148 | }; 149 | }; 150 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 151 | compatibilityVersion = "Xcode 9.3"; 152 | developmentRegion = en; 153 | hasScannedForEncodings = 0; 154 | knownRegions = ( 155 | en, 156 | Base, 157 | ); 158 | mainGroup = 97C146E51CF9000F007C117D; 159 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 160 | projectDirPath = ""; 161 | projectRoot = ""; 162 | targets = ( 163 | 97C146ED1CF9000F007C117D /* Runner */, 164 | ); 165 | }; 166 | /* End PBXProject section */ 167 | 168 | /* Begin PBXResourcesBuildPhase section */ 169 | 97C146EC1CF9000F007C117D /* Resources */ = { 170 | isa = PBXResourcesBuildPhase; 171 | buildActionMask = 2147483647; 172 | files = ( 173 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 174 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 175 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 176 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 177 | ); 178 | runOnlyForDeploymentPostprocessing = 0; 179 | }; 180 | /* End PBXResourcesBuildPhase section */ 181 | 182 | /* Begin PBXShellScriptBuildPhase section */ 183 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 184 | isa = PBXShellScriptBuildPhase; 185 | buildActionMask = 2147483647; 186 | files = ( 187 | ); 188 | inputPaths = ( 189 | ); 190 | name = "Thin Binary"; 191 | outputPaths = ( 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | shellPath = /bin/sh; 195 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 196 | }; 197 | 9740EEB61CF901F6004384FC /* Run Script */ = { 198 | isa = PBXShellScriptBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | ); 202 | inputPaths = ( 203 | ); 204 | name = "Run Script"; 205 | outputPaths = ( 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | shellPath = /bin/sh; 209 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 210 | }; 211 | /* End PBXShellScriptBuildPhase section */ 212 | 213 | /* Begin PBXSourcesBuildPhase section */ 214 | 97C146EA1CF9000F007C117D /* Sources */ = { 215 | isa = PBXSourcesBuildPhase; 216 | buildActionMask = 2147483647; 217 | files = ( 218 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 219 | 97C146F31CF9000F007C117D /* main.m in Sources */, 220 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 221 | ); 222 | runOnlyForDeploymentPostprocessing = 0; 223 | }; 224 | /* End PBXSourcesBuildPhase section */ 225 | 226 | /* Begin PBXVariantGroup section */ 227 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 228 | isa = PBXVariantGroup; 229 | children = ( 230 | 97C146FB1CF9000F007C117D /* Base */, 231 | ); 232 | name = Main.storyboard; 233 | sourceTree = ""; 234 | }; 235 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 236 | isa = PBXVariantGroup; 237 | children = ( 238 | 97C147001CF9000F007C117D /* Base */, 239 | ); 240 | name = LaunchScreen.storyboard; 241 | sourceTree = ""; 242 | }; 243 | /* End PBXVariantGroup section */ 244 | 245 | /* Begin XCBuildConfiguration section */ 246 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 247 | isa = XCBuildConfiguration; 248 | buildSettings = { 249 | ALWAYS_SEARCH_USER_PATHS = NO; 250 | CLANG_ANALYZER_NONNULL = YES; 251 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 252 | CLANG_CXX_LIBRARY = "libc++"; 253 | CLANG_ENABLE_MODULES = YES; 254 | CLANG_ENABLE_OBJC_ARC = YES; 255 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 256 | CLANG_WARN_BOOL_CONVERSION = YES; 257 | CLANG_WARN_COMMA = YES; 258 | CLANG_WARN_CONSTANT_CONVERSION = YES; 259 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 260 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 261 | CLANG_WARN_EMPTY_BODY = YES; 262 | CLANG_WARN_ENUM_CONVERSION = YES; 263 | CLANG_WARN_INFINITE_RECURSION = YES; 264 | CLANG_WARN_INT_CONVERSION = YES; 265 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 266 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 267 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 268 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 269 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 270 | CLANG_WARN_STRICT_PROTOTYPES = YES; 271 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 272 | CLANG_WARN_UNREACHABLE_CODE = YES; 273 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 274 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 275 | COPY_PHASE_STRIP = NO; 276 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 277 | ENABLE_NS_ASSERTIONS = NO; 278 | ENABLE_STRICT_OBJC_MSGSEND = YES; 279 | GCC_C_LANGUAGE_STANDARD = gnu99; 280 | GCC_NO_COMMON_BLOCKS = YES; 281 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 282 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 283 | GCC_WARN_UNDECLARED_SELECTOR = YES; 284 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 285 | GCC_WARN_UNUSED_FUNCTION = YES; 286 | GCC_WARN_UNUSED_VARIABLE = YES; 287 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 288 | MTL_ENABLE_DEBUG_INFO = NO; 289 | SDKROOT = iphoneos; 290 | SUPPORTED_PLATFORMS = iphoneos; 291 | TARGETED_DEVICE_FAMILY = "1,2"; 292 | VALIDATE_PRODUCT = YES; 293 | }; 294 | name = Profile; 295 | }; 296 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 297 | isa = XCBuildConfiguration; 298 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 299 | buildSettings = { 300 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 301 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 302 | ENABLE_BITCODE = NO; 303 | INFOPLIST_FILE = Runner/Info.plist; 304 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 305 | PRODUCT_BUNDLE_IDENTIFIER = com.dsilvera.flutterArchitecture; 306 | PRODUCT_NAME = "$(TARGET_NAME)"; 307 | VERSIONING_SYSTEM = "apple-generic"; 308 | }; 309 | name = Profile; 310 | }; 311 | 97C147031CF9000F007C117D /* Debug */ = { 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; 342 | ENABLE_STRICT_OBJC_MSGSEND = YES; 343 | ENABLE_TESTABILITY = YES; 344 | GCC_C_LANGUAGE_STANDARD = gnu99; 345 | GCC_DYNAMIC_NO_PIC = NO; 346 | GCC_NO_COMMON_BLOCKS = YES; 347 | GCC_OPTIMIZATION_LEVEL = 0; 348 | GCC_PREPROCESSOR_DEFINITIONS = ( 349 | "DEBUG=1", 350 | "$(inherited)", 351 | ); 352 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 353 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 354 | GCC_WARN_UNDECLARED_SELECTOR = YES; 355 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 356 | GCC_WARN_UNUSED_FUNCTION = YES; 357 | GCC_WARN_UNUSED_VARIABLE = YES; 358 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 359 | MTL_ENABLE_DEBUG_INFO = YES; 360 | ONLY_ACTIVE_ARCH = YES; 361 | SDKROOT = iphoneos; 362 | TARGETED_DEVICE_FAMILY = "1,2"; 363 | }; 364 | name = Debug; 365 | }; 366 | 97C147041CF9000F007C117D /* Release */ = { 367 | isa = XCBuildConfiguration; 368 | buildSettings = { 369 | ALWAYS_SEARCH_USER_PATHS = NO; 370 | CLANG_ANALYZER_NONNULL = YES; 371 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 372 | CLANG_CXX_LIBRARY = "libc++"; 373 | CLANG_ENABLE_MODULES = YES; 374 | CLANG_ENABLE_OBJC_ARC = YES; 375 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 376 | CLANG_WARN_BOOL_CONVERSION = YES; 377 | CLANG_WARN_COMMA = YES; 378 | CLANG_WARN_CONSTANT_CONVERSION = YES; 379 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 380 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 381 | CLANG_WARN_EMPTY_BODY = YES; 382 | CLANG_WARN_ENUM_CONVERSION = YES; 383 | CLANG_WARN_INFINITE_RECURSION = YES; 384 | CLANG_WARN_INT_CONVERSION = YES; 385 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 386 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 387 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 388 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 389 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 390 | CLANG_WARN_STRICT_PROTOTYPES = YES; 391 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 392 | CLANG_WARN_UNREACHABLE_CODE = YES; 393 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 394 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 395 | COPY_PHASE_STRIP = NO; 396 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 397 | ENABLE_NS_ASSERTIONS = NO; 398 | ENABLE_STRICT_OBJC_MSGSEND = YES; 399 | GCC_C_LANGUAGE_STANDARD = gnu99; 400 | GCC_NO_COMMON_BLOCKS = YES; 401 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 402 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 403 | GCC_WARN_UNDECLARED_SELECTOR = YES; 404 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 405 | GCC_WARN_UNUSED_FUNCTION = YES; 406 | GCC_WARN_UNUSED_VARIABLE = YES; 407 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 408 | MTL_ENABLE_DEBUG_INFO = NO; 409 | SDKROOT = iphoneos; 410 | SUPPORTED_PLATFORMS = iphoneos; 411 | TARGETED_DEVICE_FAMILY = "1,2"; 412 | VALIDATE_PRODUCT = YES; 413 | }; 414 | name = Release; 415 | }; 416 | 97C147061CF9000F007C117D /* Debug */ = { 417 | isa = XCBuildConfiguration; 418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 419 | buildSettings = { 420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 421 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 422 | ENABLE_BITCODE = NO; 423 | INFOPLIST_FILE = Runner/Info.plist; 424 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 425 | PRODUCT_BUNDLE_IDENTIFIER = com.dsilvera.flutterArchitecture; 426 | PRODUCT_NAME = "$(TARGET_NAME)"; 427 | VERSIONING_SYSTEM = "apple-generic"; 428 | }; 429 | name = Debug; 430 | }; 431 | 97C147071CF9000F007C117D /* Release */ = { 432 | isa = XCBuildConfiguration; 433 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 434 | buildSettings = { 435 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 436 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 437 | ENABLE_BITCODE = NO; 438 | INFOPLIST_FILE = Runner/Info.plist; 439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 440 | PRODUCT_BUNDLE_IDENTIFIER = com.dsilvera.flutterArchitecture; 441 | PRODUCT_NAME = "$(TARGET_NAME)"; 442 | VERSIONING_SYSTEM = "apple-generic"; 443 | }; 444 | name = Release; 445 | }; 446 | /* End XCBuildConfiguration section */ 447 | 448 | /* Begin XCConfigurationList section */ 449 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 450 | isa = XCConfigurationList; 451 | buildConfigurations = ( 452 | 97C147031CF9000F007C117D /* Debug */, 453 | 97C147041CF9000F007C117D /* Release */, 454 | 249021D3217E4FDB00AE95B9 /* Profile */, 455 | ); 456 | defaultConfigurationIsVisible = 0; 457 | defaultConfigurationName = Release; 458 | }; 459 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 460 | isa = XCConfigurationList; 461 | buildConfigurations = ( 462 | 97C147061CF9000F007C117D /* Debug */, 463 | 97C147071CF9000F007C117D /* Release */, 464 | 249021D4217E4FDB00AE95B9 /* Profile */, 465 | ); 466 | defaultConfigurationIsVisible = 0; 467 | defaultConfigurationName = Release; 468 | }; 469 | /* End XCConfigurationList section */ 470 | }; 471 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 472 | } 473 | --------------------------------------------------------------------------------