diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d1b2ce2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,47 @@ +# Slidy History Files +.slidy/ + +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ +**/*.g.dart + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Exceptions to above rules. +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages \ No newline at end of file diff --git a/omdb_vitta/.gitignore b/omdb_vitta/.gitignore new file mode 100644 index 0000000..d2a9572 --- /dev/null +++ b/omdb_vitta/.gitignore @@ -0,0 +1,46 @@ +# Slidy History Files +.slidy/ + +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Exceptions to above rules. +!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages \ No newline at end of file diff --git a/omdb_vitta/.metadata b/omdb_vitta/.metadata new file mode 100644 index 0000000..ade6bc9 --- /dev/null +++ b/omdb_vitta/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: 8af6b2f038c1172e61d418869363a28dffec3cb4 + channel: stable + +project_type: app diff --git a/omdb_vitta/README.md b/omdb_vitta/README.md new file mode 100644 index 0000000..a0cc310 --- /dev/null +++ b/omdb_vitta/README.md @@ -0,0 +1,17 @@ +# omdb_vitta + +Aplicativo criado para processo seletivo da empresa Vitta + +## Começando + +Para iniciar o app é necessário: +- Executar um dos comandos: + ``` + flutter pub run build_runner build + ``` + ou + ``` + slidy run mobx_build + ``` +- Ser Feliz (: + diff --git a/omdb_vitta/analysis_options.yaml b/omdb_vitta/analysis_options.yaml new file mode 100644 index 0000000..2f449d0 --- /dev/null +++ b/omdb_vitta/analysis_options.yaml @@ -0,0 +1,17 @@ +include: package:effective_dart/analysis_options.yaml + +linter: + rules: + lines_longer_than_80_chars: false + public_member_api_docs: false + prefer_collection_literals: false + omit_local_variable_types: false + use_setters_to_change_properties: false + prefer_final_fields: false + type_annotate_public_apis: false + avoid_function_literals_in_foreach_calls: false + constant_identifier_names: false + avoid_equals_and_hash_code_on_mutable_classes: false + avoid_positional_boolean_parameters: false + prefer_mixin: false + unnecessary_brace_in_string_interps: false \ No newline at end of file diff --git a/omdb_vitta/android/.gitignore b/omdb_vitta/android/.gitignore new file mode 100644 index 0000000..bc2100d --- /dev/null +++ b/omdb_vitta/android/.gitignore @@ -0,0 +1,7 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java diff --git a/omdb_vitta/android/app/build.gradle b/omdb_vitta/android/app/build.gradle new file mode 100644 index 0000000..b19372a --- /dev/null +++ b/omdb_vitta/android/app/build.gradle @@ -0,0 +1,63 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion 28 + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + lintOptions { + disable 'InvalidPackage' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.fogaiht.omdb_vitta" + minSdkVersion 16 + targetSdkVersion 28 + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/omdb_vitta/android/app/src/debug/AndroidManifest.xml b/omdb_vitta/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..6a5345a --- /dev/null +++ b/omdb_vitta/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/omdb_vitta/android/app/src/main/AndroidManifest.xml b/omdb_vitta/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..2095568 --- /dev/null +++ b/omdb_vitta/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + diff --git a/omdb_vitta/android/app/src/main/kotlin/com/fogaiht/omdb_vitta/MainActivity.kt b/omdb_vitta/android/app/src/main/kotlin/com/fogaiht/omdb_vitta/MainActivity.kt new file mode 100644 index 0000000..9ec2320 --- /dev/null +++ b/omdb_vitta/android/app/src/main/kotlin/com/fogaiht/omdb_vitta/MainActivity.kt @@ -0,0 +1,6 @@ +package com.fogaiht.omdb_vitta + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/omdb_vitta/android/app/src/main/res/drawable/launch_background.xml b/omdb_vitta/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/omdb_vitta/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/omdb_vitta/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/omdb_vitta/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/omdb_vitta/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/omdb_vitta/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/omdb_vitta/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/omdb_vitta/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/omdb_vitta/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/omdb_vitta/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/omdb_vitta/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/omdb_vitta/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/omdb_vitta/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/omdb_vitta/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/omdb_vitta/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/omdb_vitta/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/omdb_vitta/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/omdb_vitta/android/app/src/main/res/values/styles.xml b/omdb_vitta/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..1f83a33 --- /dev/null +++ b/omdb_vitta/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/omdb_vitta/android/app/src/profile/AndroidManifest.xml b/omdb_vitta/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..6a5345a --- /dev/null +++ b/omdb_vitta/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/omdb_vitta/android/build.gradle b/omdb_vitta/android/build.gradle new file mode 100644 index 0000000..3100ad2 --- /dev/null +++ b/omdb_vitta/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.3.50' + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:3.5.0' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + jcenter() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/omdb_vitta/android/gradle.properties b/omdb_vitta/android/gradle.properties new file mode 100644 index 0000000..38c8d45 --- /dev/null +++ b/omdb_vitta/android/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx1536M +android.enableR8=true +android.useAndroidX=true +android.enableJetifier=true diff --git a/omdb_vitta/android/gradle/wrapper/gradle-wrapper.properties b/omdb_vitta/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..296b146 --- /dev/null +++ b/omdb_vitta/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Fri Jun 23 08:50:38 CEST 2017 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip diff --git a/omdb_vitta/android/settings.gradle b/omdb_vitta/android/settings.gradle new file mode 100644 index 0000000..d3b6a40 --- /dev/null +++ b/omdb_vitta/android/settings.gradle @@ -0,0 +1,15 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/omdb_vitta/assets/background.png b/omdb_vitta/assets/background.png new file mode 100644 index 0000000..1ea88fe Binary files /dev/null and b/omdb_vitta/assets/background.png differ diff --git a/omdb_vitta/assets/empty_movie.png b/omdb_vitta/assets/empty_movie.png new file mode 100644 index 0000000..1accb44 Binary files /dev/null and b/omdb_vitta/assets/empty_movie.png differ diff --git a/omdb_vitta/ios/.gitignore b/omdb_vitta/ios/.gitignore new file mode 100644 index 0000000..e96ef60 --- /dev/null +++ b/omdb_vitta/ios/.gitignore @@ -0,0 +1,32 @@ +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/omdb_vitta/ios/Flutter/AppFrameworkInfo.plist b/omdb_vitta/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..6b4c0f7 --- /dev/null +++ b/omdb_vitta/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 8.0 + + diff --git a/omdb_vitta/ios/Flutter/Debug.xcconfig b/omdb_vitta/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/omdb_vitta/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/omdb_vitta/ios/Flutter/Release.xcconfig b/omdb_vitta/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/omdb_vitta/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/omdb_vitta/ios/Runner.xcodeproj/project.pbxproj b/omdb_vitta/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..9875d4f --- /dev/null +++ b/omdb_vitta/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,506 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 97C146F11CF9000F007C117D /* Supporting Files */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; + 97C146F11CF9000F007C117D /* Supporting Files */ = { + isa = PBXGroup; + children = ( + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1020; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.fogaiht.omdbVitta; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.fogaiht.omdbVitta; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "$(PROJECT_DIR)/Flutter", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.fogaiht.omdbVitta; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/omdb_vitta/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/omdb_vitta/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/omdb_vitta/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/omdb_vitta/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/omdb_vitta/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/omdb_vitta/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/omdb_vitta/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/omdb_vitta/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/omdb_vitta/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/omdb_vitta/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/omdb_vitta/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..a28140c --- /dev/null +++ b/omdb_vitta/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/omdb_vitta/ios/Runner.xcworkspace/contents.xcworkspacedata b/omdb_vitta/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/omdb_vitta/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/omdb_vitta/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/omdb_vitta/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/omdb_vitta/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/omdb_vitta/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/omdb_vitta/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/omdb_vitta/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/omdb_vitta/ios/Runner/AppDelegate.swift b/omdb_vitta/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/omdb_vitta/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..28c6bf0 Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..f091b6b Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cde121 Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..d0ef06e Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..dcdc230 Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..c8f9ed8 Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..75b2d16 Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..c4df70d Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..6a84f41 Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..d0e1f58 Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/omdb_vitta/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +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. \ No newline at end of file diff --git a/omdb_vitta/ios/Runner/Base.lproj/LaunchScreen.storyboard b/omdb_vitta/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/omdb_vitta/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/omdb_vitta/ios/Runner/Base.lproj/Main.storyboard b/omdb_vitta/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/omdb_vitta/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/omdb_vitta/ios/Runner/Info.plist b/omdb_vitta/ios/Runner/Info.plist new file mode 100644 index 0000000..d869d13 --- /dev/null +++ b/omdb_vitta/ios/Runner/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + omdb_vitta + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/omdb_vitta/ios/Runner/Runner-Bridging-Header.h b/omdb_vitta/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/omdb_vitta/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/omdb_vitta/lib/app/app_controller.dart b/omdb_vitta/lib/app/app_controller.dart new file mode 100644 index 0000000..4ed348d --- /dev/null +++ b/omdb_vitta/lib/app/app_controller.dart @@ -0,0 +1,7 @@ +import 'package:mobx/mobx.dart'; + +part 'app_controller.g.dart'; + +class AppController = _AppControllerBase with _$AppController; + +abstract class _AppControllerBase with Store {} diff --git a/omdb_vitta/lib/app/app_module.dart b/omdb_vitta/lib/app/app_module.dart new file mode 100644 index 0000000..79ebb66 --- /dev/null +++ b/omdb_vitta/lib/app/app_module.dart @@ -0,0 +1,23 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_modular/flutter_modular.dart'; + +import 'app_controller.dart'; +import 'app_widget.dart'; +import 'modules/home/home_module.dart'; + +class AppModule extends MainModule { + @override + List get binds => [ + Bind((i) => AppController()), + ]; + + @override + List get routers => [ + Router(Modular.initialRoute, module: HomeModule()), + ]; + + @override + Widget get bootstrap => AppWidget(); + + static Inject get to => Inject.of(); +} diff --git a/omdb_vitta/lib/app/app_widget.dart b/omdb_vitta/lib/app/app_widget.dart new file mode 100644 index 0000000..62204c3 --- /dev/null +++ b/omdb_vitta/lib/app/app_widget.dart @@ -0,0 +1,19 @@ +import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_modular/flutter_modular.dart'; + +class AppWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return MaterialApp( + navigatorKey: Modular.navigatorKey, + builder: BotToastInit(), + title: 'Depois dos Créditos', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + initialRoute: '/', + onGenerateRoute: Modular.generateRoute, + ); + } +} diff --git a/omdb_vitta/lib/app/modules/home/components/home_header.dart b/omdb_vitta/lib/app/modules/home/components/home_header.dart new file mode 100644 index 0000000..6439e9e --- /dev/null +++ b/omdb_vitta/lib/app/modules/home/components/home_header.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; + +class HomeHeader extends StatelessWidget { + @override + Widget build(BuildContext context) { + double _widthSize = MediaQuery.of(context).size.width; + return Column( + mainAxisSize: MainAxisSize.min, + children: [ + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), + child: Text( + "Depois dos Créditos", + style: TextStyle(color: Colors.white, fontSize: 20), + ), + ), + Container(width: _widthSize * 0.5, height: 2, color: Colors.white), + Padding( + padding: EdgeInsets.fromLTRB(16, 32, 16, 8), + child: Text( + "O app que te ajuda a descobrir todas as informações de seus filmes e séries favoritos!", + style: TextStyle( + color: Colors.white, + ), + textAlign: TextAlign.center, + ), + ), + ], + ); + } +} diff --git a/omdb_vitta/lib/app/modules/home/components/type_buttons.dart b/omdb_vitta/lib/app/modules/home/components/type_buttons.dart new file mode 100644 index 0000000..55eb740 --- /dev/null +++ b/omdb_vitta/lib/app/modules/home/components/type_buttons.dart @@ -0,0 +1,71 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_mobx/flutter_mobx.dart'; + +import '../home_store.dart'; + +class TypeButtons extends StatefulWidget { + final HomeStore store; + + const TypeButtons({ + Key key, + this.store, + }) : super(key: key); + @override + _TypeButtonsState createState() => _TypeButtonsState(); +} + +class _TypeButtonsState extends State { + @override + Widget build(BuildContext context) { + return Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Spacer(flex: 3), + Observer(builder: (_) { + return InkWell( + onTap: widget.store.selectMovie, + borderRadius: BorderRadius.circular(50), + child: Container( + width: 100, + height: 45, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(50), + border: widget.store.isMovieSelected ? Border.all(color: Colors.white, width: 1.5) : null, + color: Color(0xff5f0380), + ), + child: Center( + child: Text( + "Filmes", + style: TextStyle(color: Colors.white), + ), + ), + ), + ); + }), + Spacer(flex: 1), + Observer(builder: (_) { + return InkWell( + borderRadius: BorderRadius.circular(50), + onTap: widget.store.selectSeries, + child: Container( + width: 100, + height: 45, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(50), + border: widget.store.isSeriesSelected ? Border.all(color: Colors.white, width: 1.5) : null, + color: Color(0xff5f0380), + ), + child: Center( + child: Text( + "Séries", + style: TextStyle(color: Colors.white), + ), + ), + ), + ); + }), + Spacer(flex: 3), + ], + ); + } +} diff --git a/omdb_vitta/lib/app/modules/home/home_controller.dart b/omdb_vitta/lib/app/modules/home/home_controller.dart new file mode 100644 index 0000000..1e5df01 --- /dev/null +++ b/omdb_vitta/lib/app/modules/home/home_controller.dart @@ -0,0 +1,16 @@ +import 'package:mobx/mobx.dart'; + +import '../../shared/models/movie_model.dart'; +import 'home_store.dart'; + +part 'home_controller.g.dart'; + +class HomeController = _HomeControllerBase with _$HomeController; + +abstract class _HomeControllerBase with Store { + final HomeStore store; + _HomeControllerBase(this.store); + + @observable + ObservableFuture> moviesListResponse = ObservableFuture.value(null); +} diff --git a/omdb_vitta/lib/app/modules/home/home_module.dart b/omdb_vitta/lib/app/modules/home/home_module.dart new file mode 100644 index 0000000..89a273f --- /dev/null +++ b/omdb_vitta/lib/app/modules/home/home_module.dart @@ -0,0 +1,26 @@ +import 'package:flutter_modular/flutter_modular.dart'; + +import '../../shared/services/custom_dio.dart'; +import '../../shared/stores/search_store.dart'; +import '../movie_search/movie_search_module.dart'; +import 'home_controller.dart'; +import 'home_page.dart'; +import 'home_store.dart'; + +class HomeModule extends ChildModule { + @override + List get binds => [ + Bind((i) => HomeController(i.get())), + Bind((i) => HomeStore(i.get())), + Bind((i) => SearchStore()), + Bind((i) => CustomDio()), + ]; + + @override + List get routers => [ + Router(Modular.initialRoute, child: (_, args) => HomePage()), + Router("/detail", module: MovieSearchModule()), + ]; + + static Inject get to => Inject.of(); +} diff --git a/omdb_vitta/lib/app/modules/home/home_page.dart b/omdb_vitta/lib/app/modules/home/home_page.dart new file mode 100644 index 0000000..1fe413a --- /dev/null +++ b/omdb_vitta/lib/app/modules/home/home_page.dart @@ -0,0 +1,46 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_modular/flutter_modular.dart'; + +import '../../shared/components/ac_text_form_field.dart'; +import 'components/home_header.dart'; +import 'components/type_buttons.dart'; +import 'home_controller.dart'; + +class HomePage extends StatefulWidget { + final String title; + const HomePage({Key key, this.title = "Home"}) : super(key: key); + + @override + _HomePageState createState() => _HomePageState(); +} + +class _HomePageState extends ModularState { + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.black, + body: SafeArea( + child: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + HomeHeader(), + Image.asset("assets/background.png"), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16.0), + child: ACTextFormField( + enableFormField: false, + searchStore: controller.store.searchStore, + onTap: () => Modular.link.pushNamed("/detail"), + onChanged: (_) {}, + autoFocus: false, + ), + ), + TypeButtons(store: controller.store), + ], + ), + ), + ), + ); + } +} diff --git a/omdb_vitta/lib/app/modules/home/home_store.dart b/omdb_vitta/lib/app/modules/home/home_store.dart new file mode 100644 index 0000000..83a2592 --- /dev/null +++ b/omdb_vitta/lib/app/modules/home/home_store.dart @@ -0,0 +1,44 @@ +import 'package:mobx/mobx.dart'; + +import '../../shared/stores/search_store.dart'; + +part 'home_store.g.dart'; + +class HomeStore = _HomeStoreBase with _$HomeStore; + +abstract class _HomeStoreBase with Store { + final SearchStore searchStore; + _HomeStoreBase(this.searchStore); + + @observable + bool _movieSelected = true; + + @computed + bool get isMovieSelected => _movieSelected; + @action + selectMovie() => toggleSelection(movieType: true); + + @observable + bool _seriesSelected = false; + @computed + bool get isSeriesSelected => _seriesSelected; + @action + selectSeries() => toggleSelection(seriesType: true); + + @computed + String get selectedType => + isSeriesSelected ? searchStore.setSearchType("series") : searchStore.setSearchType("movie"); + + @action + toggleSelection({bool movieType = false, bool seriesType = false}) { + if (isSeriesSelected && movieType && !seriesType) { + _movieSelected = true; + _seriesSelected = false; + searchStore.setSearchType("movie"); + } else if (isMovieSelected && seriesType && !movieType) { + _movieSelected = false; + _seriesSelected = true; + searchStore.setSearchType("series"); + } + } +} diff --git a/omdb_vitta/lib/app/modules/movie_search/components/caroussel_components/caroussel_item.dart b/omdb_vitta/lib/app/modules/movie_search/components/caroussel_components/caroussel_item.dart new file mode 100644 index 0000000..89ce599 --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/components/caroussel_components/caroussel_item.dart @@ -0,0 +1,62 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; + +import '../../../../shared/components/after_credits_dialog/after_credits_dialog.dart'; +import '../../../../shared/models/movie_model.dart'; +import '../../movie_search_controller.dart'; +import '../movie_info_dialog.dart'; + +class CarousselItem extends StatelessWidget { + final MovieSearchController controller; + final MovieModel item; + final double itemHeight; + + const CarousselItem({ + Key key, + @required this.controller, + @required this.item, + @required this.itemHeight, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return CachedNetworkImage( + imageUrl: item.poster, + imageBuilder: (context, provider) { + return InkWell( + onTap: () async { + await controller.doSearchMovieById(id: controller.store.movieOnScreen.imdbId); + return AfterCreditsDialog.showMovieInfo( + child: MovieInfoDialog( + selectedMovie: controller.store.selectedMovie, + ), + ); + }, + child: Container( + height: itemHeight, + decoration: BoxDecoration( + border: Border.all(width: 4, color: Colors.white), + ), + child: Image(image: provider, fit: BoxFit.fitHeight), + ), + ); + }, + errorWidget: (context, url, error) { + return InkWell( + onTap: () async { + await controller.doSearchMovieById(id: controller.store.movieOnScreen.imdbId); + return AfterCreditsDialog.showMovieInfo( + child: MovieInfoDialog(selectedMovie: controller.store.selectedMovie), + ); + }, + child: Container( + height: itemHeight, + decoration: BoxDecoration( + border: Border.all(width: 4, color: Colors.white), + ), + child: Image.asset("assets/empty_movie.png")), + ); + }, + ); + } +} diff --git a/omdb_vitta/lib/app/modules/movie_search/components/caroussel_components/caroussel_item_title.dart b/omdb_vitta/lib/app/modules/movie_search/components/caroussel_components/caroussel_item_title.dart new file mode 100644 index 0000000..b3451af --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/components/caroussel_components/caroussel_item_title.dart @@ -0,0 +1,37 @@ +import 'package:flutter/material.dart'; +import 'package:google_fonts/google_fonts.dart'; + +import '../../../../shared/models/movie_model.dart'; + +class CarousselItemTitle extends StatelessWidget { + final MovieModel item; + final double widthTitleText; + + const CarousselItemTitle({ + Key key, + @required this.item, + @required this.widthTitleText, + }) : super(key: key); + @override + Widget build(BuildContext context) { + return Container( + width: widthTitleText, + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: Colors.white, width: 2), + borderRadius: BorderRadius.circular(5)), + child: Center( + child: Text( + item.title, + style: GoogleFonts.pangolin( + color: Color(0xff5f0380), + fontSize: 20, + ), + maxLines: 2, + textAlign: TextAlign.center, + overflow: TextOverflow.ellipsis, + ), + ), + ); + } +} diff --git a/omdb_vitta/lib/app/modules/movie_search/components/caroussel_components/page_controllers/next_page_arrow.dart b/omdb_vitta/lib/app/modules/movie_search/components/caroussel_components/page_controllers/next_page_arrow.dart new file mode 100644 index 0000000..2614b9d --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/components/caroussel_components/page_controllers/next_page_arrow.dart @@ -0,0 +1,31 @@ +import 'package:flutter/material.dart'; + +class NextPageArrowWidget extends StatelessWidget { + final Function onTap; + + const NextPageArrowWidget({Key key, @required this.onTap}) : super(key: key); + @override + Widget build(BuildContext context) { + return Align( + alignment: Alignment.centerRight, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: InkResponse( + onTap: onTap, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Color(0xcc5f0380), + ), + child: Icon(Icons.arrow_right, size: 40), + ), + ], + ), + ), + ), + ); + } +} diff --git a/omdb_vitta/lib/app/modules/movie_search/components/caroussel_components/page_controllers/previous_page_arrow.dart b/omdb_vitta/lib/app/modules/movie_search/components/caroussel_components/page_controllers/previous_page_arrow.dart new file mode 100644 index 0000000..8fe9994 --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/components/caroussel_components/page_controllers/previous_page_arrow.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; + +class PreviousPageArrowWidget extends StatelessWidget { + final Function onTap; + + const PreviousPageArrowWidget({Key key, @required this.onTap}) : super(key: key); + + @override + Widget build(BuildContext context) { + return Align( + alignment: Alignment.centerLeft, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: InkResponse( + onTap: onTap, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Container( + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Color(0xcc5f0380), + ), + child: Icon(Icons.arrow_left, size: 40), + ), + ], + ), + ), + ), + ); + } +} diff --git a/omdb_vitta/lib/app/modules/movie_search/components/image_background_widget.dart b/omdb_vitta/lib/app/modules/movie_search/components/image_background_widget.dart new file mode 100644 index 0000000..a27145c --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/components/image_background_widget.dart @@ -0,0 +1,24 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; + +class ImageBackgroundWidget extends StatelessWidget { + final String urlImage; + + const ImageBackgroundWidget({Key key, @required this.urlImage}) : super(key: key); + @override + Widget build(BuildContext context) { + return Stack( + children: [ + Container( + decoration: BoxDecoration( + image: DecorationImage( + image: urlImage == "" ? AssetImage("assets/empty_movie.png") : CachedNetworkImageProvider(urlImage), + fit: BoxFit.cover, + ), + ), + ), + Container(color: Color(0xaa000000)), + ], + ); + } +} diff --git a/omdb_vitta/lib/app/modules/movie_search/components/movie_info_dialog.dart b/omdb_vitta/lib/app/modules/movie_search/components/movie_info_dialog.dart new file mode 100644 index 0000000..c57eea2 --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/components/movie_info_dialog.dart @@ -0,0 +1,95 @@ +import 'package:cached_network_image/cached_network_image.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_rating_bar/flutter_rating_bar.dart'; + +import '../../../shared/models/movie_model.dart'; + +class MovieInfoDialog extends StatefulWidget { + final MovieModel selectedMovie; + + const MovieInfoDialog({Key key, this.selectedMovie}) : super(key: key); + @override + _MovieInfoDialogState createState() => _MovieInfoDialogState(); +} + +class _MovieInfoDialogState extends State { + @override + Widget build(BuildContext context) { + double _widthSize = MediaQuery.of(context).size.width; + var movie = widget.selectedMovie; + return Padding( + padding: const EdgeInsets.all(8.0), + child: Container( + child: SingleChildScrollView( + child: Card( + color: Colors.grey, + child: Column( + children: [ + Padding( + padding: EdgeInsets.symmetric(vertical: 8.0), + child: ListTile( + title: Text(movie.title), + subtitle: Text(movie.year), + leading: CachedNetworkImage( + imageUrl: movie.poster, + imageBuilder: (context, provider) { + return Container( + height: _widthSize * 1.0, + decoration: BoxDecoration(border: Border.all(width: 1, color: Colors.white)), + child: Image(image: provider, fit: BoxFit.fitHeight), + ); + }, + errorWidget: (context, url, error) { + return Container( + height: _widthSize * 1.0, + decoration: BoxDecoration(border: Border.all(width: 1, color: Colors.white)), + child: Image.asset("assets/empty_movie.png")); + }, + ), + ), + ), + Padding( + padding: EdgeInsets.fromLTRB(16, 0, 16, 8), + child: Row(children: [Expanded(child: Text("${movie.plot}"))]), + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), + child: Row(children: [Expanded(child: Text("Diretor: ${movie.director}"))]), + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), + child: Row(children: [Expanded(child: Text("Tempo: ${movie.runtime}"))]), + ), + Padding( + padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), + child: Row(children: [Expanded(child: Text("Gênero: ${movie.genre}"))]), + ), + Padding( + padding: EdgeInsets.only(bottom: 8.0), + child: Column( + children: [ + Transform.scale( + scale: 0.75, + child: RatingBarIndicator( + rating: movie.imdbRating == 0.00001 ? 0.0 : movie.imdbRating / 2, + direction: Axis.horizontal, + itemCount: 5, + itemPadding: EdgeInsets.symmetric(horizontal: 4.0), + itemBuilder: (context, _) => Icon( + Icons.star, + color: Colors.amber, + ), + ), + ), + Text(movie.imdbRating == 0.00001 ? "Sem Classificação" : (movie.imdbRating / 2).toString()), + ], + ), + ) + ], + ), + ), + ), + ), + ); + } +} diff --git a/omdb_vitta/lib/app/modules/movie_search/components/no_title_found_widget.dart b/omdb_vitta/lib/app/modules/movie_search/components/no_title_found_widget.dart new file mode 100644 index 0000000..cd93b34 --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/components/no_title_found_widget.dart @@ -0,0 +1,34 @@ +import 'package:flutter/material.dart'; + +class NoTitleFoundWidget extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Container( + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 16.0), + child: RichText( + textAlign: TextAlign.center, + text: TextSpan( + children: [ + TextSpan( + text: "😭", + style: TextStyle( + fontSize: 40, + fontWeight: FontWeight.w800, + ), + ), + TextSpan( + text: '\n\nNenhum título encontrado, tente outro!', + style: TextStyle( + fontSize: 25, + fontWeight: FontWeight.w400, + color: Colors.white, + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/omdb_vitta/lib/app/modules/movie_search/components/write_text_hint_widget.dart b/omdb_vitta/lib/app/modules/movie_search/components/write_text_hint_widget.dart new file mode 100644 index 0000000..8f8a906 --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/components/write_text_hint_widget.dart @@ -0,0 +1,32 @@ +import 'package:flutter/material.dart'; + +class WriteTextHintWidget extends StatelessWidget { + final String searchType; + + const WriteTextHintWidget({Key key, @required this.searchType}) : super(key: key); + @override + Widget build(BuildContext context) { + return Padding( + padding: EdgeInsets.symmetric(horizontal: 16.0), + child: RichText( + textAlign: TextAlign.center, + text: TextSpan( + children: [ + TextSpan( + text: "👆👆", + style: TextStyle(fontSize: 40, fontWeight: FontWeight.w800), + ), + TextSpan( + text: '\n\nDigite o nome ${searchType == "movie" ? "do filme" : "da série"} ali em cima!', + style: TextStyle( + fontSize: 30, + fontWeight: FontWeight.w400, + color: Colors.white, + ), + ), + ], + ), + ), + ); + } +} diff --git a/omdb_vitta/lib/app/modules/movie_search/models/movie_search_response_model.dart b/omdb_vitta/lib/app/modules/movie_search/models/movie_search_response_model.dart new file mode 100644 index 0000000..ee77c85 --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/models/movie_search_response_model.dart @@ -0,0 +1,38 @@ +import 'package:meta/meta.dart'; + +import '../../../shared/models/movie_model.dart'; + +class MovieSearchResponseModel { + MovieSearchResponseModel({ + @required this.moviesList, + @required this.totalResults, + @required this.response, + }); + + final List moviesList; + final int totalResults; + final String response; + + MovieSearchResponseModel copyWith({ + List moviesList, + int totalResults, + String response, + }) => + MovieSearchResponseModel( + moviesList: moviesList ?? this.moviesList, + totalResults: totalResults ?? this.totalResults, + response: response ?? this.response, + ); + + factory MovieSearchResponseModel.fromJson(Map json) => MovieSearchResponseModel( + moviesList: json["Search"] == null ? null : List.from(json["Search"].map((x) => MovieModel.fromJson(x))), + totalResults: json["totalResults"] == null ? null : int.parse(json["totalResults"]), + response: json["Response"] == null ? null : json["Response"], + ); + + Map toJson() => { + "Search": moviesList == null ? null : List.from(moviesList.map((x) => x.toJson())), + "totalResults": totalResults == null ? null : totalResults, + "Response": response == null ? null : response, + }; +} diff --git a/omdb_vitta/lib/app/modules/movie_search/movie_search_controller.dart b/omdb_vitta/lib/app/modules/movie_search/movie_search_controller.dart new file mode 100644 index 0000000..05f5d7d --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/movie_search_controller.dart @@ -0,0 +1,114 @@ +import 'package:bot_toast/bot_toast.dart'; +import 'package:carousel_slider/carousel_controller.dart'; +import 'package:dio/dio.dart'; +import 'package:flutter_modular/flutter_modular.dart'; +import 'package:mobx/mobx.dart'; + +import '../../shared/models/movie_model.dart'; +import 'models/movie_search_response_model.dart'; +import 'movie_search_repository.dart'; +import 'movie_search_store.dart'; + +part 'movie_search_controller.g.dart'; + +class MovieSearchController = _MovieSearchControllerBase with _$MovieSearchController; + +abstract class _MovieSearchControllerBase extends Disposable with Store { + final MovieSearchRepository repository; + final MovieSearchStore store; + ReactionDisposer _disposer; + + CarouselController carouselController = CarouselController(); + + _MovieSearchControllerBase(this.repository, this.store) { + _disposer = reaction((_) => store.searchStore.searchData, (data) { + if (data.length >= 3) { + doSearchMovie(data); + } + }); + } + + @observable + ObservableFuture moviesListResponse = ObservableFuture.value(null); + + @observable + ObservableFuture movieInfoResponse = ObservableFuture.value(null); + + int page = 1; + int totalPages = 1; + + @action + nextMoviesPage() { + if (page == 1 || page <= totalPages) { + page++; + } + doSearchMovie(store.searchStore.searchData, nextPage: true); + // print("PÁGINA ATUAL: $page"); + } + + @action + doSearchMovie(String movieName, {bool nextPage = false}) async { + var cancel = BotToast.showLoading(); + try { + moviesListResponse = repository + .searchMovie( + movieName: movieName, + type: store.searchStore.searchType, + page: nextPage ? page : 1, + ) + .asObservable(); + + await moviesListResponse; + if (moviesListResponse.value != null) { + var maxPages = store.maxSearchItems ~/ 10; + if ((maxPages * 10) < store.maxSearchItems) { + maxPages = maxPages + 1; + } + totalPages = maxPages; + + // print("TOTAL DE PÁGINAS: ${totalPages}"); + + if (nextPage && page <= totalPages) { + store.moviesList.addAll(moviesListResponse?.value?.moviesList?.asObservable()); + // print("PÁGINA ATUAL: ${page}"); + } else if (!nextPage) { + store.setCurrentPageIndex(0); + if (store.moviesList != null && store.moviesList.isNotEmpty) { + carouselController.animateToPage(0); + } + store.moviesList = moviesListResponse?.value?.moviesList?.asObservable() ?? [].asObservable(); + store.setMaxSearchItems(moviesListResponse?.value?.totalResults ?? 0); + if (store.moviesList.isNotEmpty) { + store.setMovieOnScreen(store.moviesList[0]); + } + } + } + cancel(); + } on DioError catch (e) { + print(e); + cancel(); + } + } + + @action + doSearchMovieById({String id}) async { + var cancel = BotToast.showLoading(); + try { + movieInfoResponse = repository.searchMovieById(id: id).asObservable(); + + await movieInfoResponse; + + store.selectedMovie = movieInfoResponse.value; + cancel(); + } on DioError catch (e) { + print(e); + cancel(); + } + } + + @override + void dispose() { + store.searchStore.inputSearchData(""); + _disposer(); + } +} diff --git a/omdb_vitta/lib/app/modules/movie_search/movie_search_module.dart b/omdb_vitta/lib/app/modules/movie_search/movie_search_module.dart new file mode 100644 index 0000000..cb09073 --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/movie_search_module.dart @@ -0,0 +1,27 @@ +import 'package:flutter_modular/flutter_modular.dart'; + +import '../../shared/services/custom_dio.dart'; +import '../../shared/stores/search_store.dart'; +import 'movie_search_controller.dart'; +import 'movie_search_page.dart'; +import 'movie_search_repository.dart'; +import 'movie_search_store.dart'; + +class MovieSearchModule extends ChildModule { + @override + List get binds => [ + Bind((i) => MovieSearchController( + i.get(), + i.get(), + )), + Bind((i) => MovieSearchRepository(Modular.get())), + Bind((i) => MovieSearchStore(Modular.get())), + ]; + + @override + List get routers => [ + Router(Modular.initialRoute, child: (_, args) => MovieSearchPage()), + ]; + + static Inject get to => Inject.of(); +} diff --git a/omdb_vitta/lib/app/modules/movie_search/movie_search_page.dart b/omdb_vitta/lib/app/modules/movie_search/movie_search_page.dart new file mode 100644 index 0000000..c811c12 --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/movie_search_page.dart @@ -0,0 +1,127 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_mobx/flutter_mobx.dart'; +import 'package:flutter_modular/flutter_modular.dart'; + +import '../../shared/components/ac_text_form_field.dart'; +import '../../shared/components/after_credits_dialog/after_credits_dialog.dart'; +import '../../shared/components/manual_page_control.dart'; +import 'components/caroussel_components/caroussel_item.dart'; +import 'components/caroussel_components/caroussel_item_title.dart'; +import 'components/caroussel_components/page_controllers/next_page_arrow.dart'; +import 'components/caroussel_components/page_controllers/previous_page_arrow.dart'; +import 'components/image_background_widget.dart'; +import 'components/movie_info_dialog.dart'; +import 'components/no_title_found_widget.dart'; +import 'components/write_text_hint_widget.dart'; +import 'movie_search_controller.dart'; + +class MovieSearchPage extends StatefulWidget { + @override + _MovieSearchPageState createState() => _MovieSearchPageState(); +} + +class _MovieSearchPageState extends ModularState { + @override + Widget build(BuildContext context) { + double _widthSize = MediaQuery.of(context).size.width; + var searchType = controller.store.searchStore.searchType; + return Scaffold( + backgroundColor: Colors.black, + appBar: AppBar( + backgroundColor: Colors.black87, + title: Text(searchType == "movie" ? "Filmes" : "Séries"), + bottom: PreferredSize( + child: Padding( + padding: EdgeInsets.symmetric(horizontal: 8.0), + child: ACTextFormField( + enableFormField: true, + onTap: () {}, + searchStore: controller.store.searchStore, + onChanged: controller.store.searchStore.inputSearchData, + autoFocus: true, + ), + ), + preferredSize: Size.fromHeight(50.0), + ), + ), + body: Padding( + padding: const EdgeInsets.only(top: 8.0), + child: SingleChildScrollView( + physics: NeverScrollableScrollPhysics(), + child: Column( + children: [ + Container( + height: _widthSize * 1.5, + child: Center( + child: Observer(builder: (_) { + var moviesList = controller.store.moviesList; + var selectedIndex = controller.store.currentPageIndex; + return controller.store.searchStore.searchData.isEmpty + ? WriteTextHintWidget(searchType: searchType) + : ((moviesList == null || moviesList.isEmpty)) + ? NoTitleFoundWidget() + : Stack( + children: [ + ImageBackgroundWidget(urlImage: moviesList[selectedIndex].poster), + ManualPageControl( + height: _widthSize * 1.5, + controller: controller.carouselController, + hasTitles: true, + onTapMovie: () async { + await controller.doSearchMovieById(id: controller.store.movieOnScreen.imdbId); + return AfterCreditsDialog.showMovieInfo( + child: Center( + child: MovieInfoDialog(selectedMovie: controller.store.selectedMovie), + ), + ); + }, + onPageChanged: (index, _) { + controller.store.setCurrentPageIndex(index); + controller.store.setMovieOnScreen(moviesList[index]); + + if (moviesList.length > 9 && (index == moviesList.length - 3)) { + controller.nextMoviesPage(); + } + }, + titles: moviesList.asMap().entries.map((e) { + return CarousselItemTitle( + item: e.value, + widthTitleText: _widthSize * 0.5, + ); + }).toList(), + items: moviesList.asMap().entries.map((e) { + return CarousselItem( + controller: controller, + item: e.value, + itemHeight: _widthSize, + ); + }).toList(), + ), + controller.store.showRigthArrow + ? NextPageArrowWidget( + onTap: () => controller.carouselController.nextPage( + duration: Duration(milliseconds: 300), + curve: Curves.linear, + ), + ) + : SizedBox(), + controller.store.showLeftArrow + ? PreviousPageArrowWidget( + onTap: () => controller.carouselController.previousPage( + duration: Duration(milliseconds: 300), + curve: Curves.linear, + ), + ) + : SizedBox(), + ], + ); + }), + ), + ), + ], + ), + ), + ), + ); + } +} diff --git a/omdb_vitta/lib/app/modules/movie_search/movie_search_repository.dart b/omdb_vitta/lib/app/modules/movie_search/movie_search_repository.dart new file mode 100644 index 0000000..ef83a83 --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/movie_search_repository.dart @@ -0,0 +1,44 @@ +import 'package:dio/dio.dart'; +import 'package:flutter_modular/flutter_modular.dart'; + +import '../../shared/models/movie_model.dart'; +import '../../shared/services/custom_dio.dart'; +import 'models/movie_search_response_model.dart'; + +class MovieSearchRepository extends Disposable { + final CustomDio _httpProvider; + + MovieSearchRepository(this._httpProvider); + + Future searchMovie({String movieName, String type, int page}) async { + try { + print("Nome do filme pesquisado: ${movieName}"); + var response = await _httpProvider.get( + "", + queryParameters: {"apikey": "d12b4be8", "s": "$movieName", "type": "$type", "page": "$page"}, + ); + + var _finalResponse = MovieSearchResponseModel.fromJson(response.data); + return _finalResponse; + } on DioError catch (e) { + print(e.message); + rethrow; + } + } + + Future searchMovieById({String id}) async { + print(id); + try { + var response = await _httpProvider.get("", queryParameters: {"apikey": "d12b4be8", "i": "$id"}); + + var _finalResponse = MovieModel.fromJson(response.data); + return _finalResponse; + } on DioError catch (e) { + print(e.message); + rethrow; + } + } + + @override + void dispose() {} +} diff --git a/omdb_vitta/lib/app/modules/movie_search/movie_search_store.dart b/omdb_vitta/lib/app/modules/movie_search/movie_search_store.dart new file mode 100644 index 0000000..4d36470 --- /dev/null +++ b/omdb_vitta/lib/app/modules/movie_search/movie_search_store.dart @@ -0,0 +1,48 @@ +import 'package:mobx/mobx.dart'; + +import '../../shared/models/movie_model.dart'; +import '../../shared/stores/search_store.dart'; + +part 'movie_search_store.g.dart'; + +class MovieSearchStore = _MovieSearchStoreBase with _$MovieSearchStore; + +abstract class _MovieSearchStoreBase with Store { + final SearchStore searchStore; + + _MovieSearchStoreBase(this.searchStore); + @observable + bool enableSearch = true; + @action + toggleSearch() => enableSearch = !enableSearch; + + @observable + ObservableList moviesList = ObservableList(); + + @observable + int currentPageIndex = 0; + @action + setCurrentPageIndex(int index) => currentPageIndex = index; + + @observable + int maxSearchItems = 0; + @action + setMaxSearchItems(int newValue) => maxSearchItems = newValue; + + @computed + bool get showRigthArrow => + (moviesList.isNotEmpty && moviesList.length > 1 && currentPageIndex != moviesList.length - 1) ? true : false; + + @computed + bool get showLeftArrow => (moviesList.isNotEmpty && moviesList.length > 1 && currentPageIndex != 0) ? true : false; + + @observable + MovieModel movieOnScreen = MovieModel(); + @action + setMovieOnScreen(MovieModel movie) => movieOnScreen = movie; + + @observable + MovieModel selectedMovie; + @action + setSelectedMovie(MovieModel movie) => selectedMovie = movie; +} diff --git a/omdb_vitta/lib/app/shared/components/ac_text_form_field.dart b/omdb_vitta/lib/app/shared/components/ac_text_form_field.dart new file mode 100644 index 0000000..08224bb --- /dev/null +++ b/omdb_vitta/lib/app/shared/components/ac_text_form_field.dart @@ -0,0 +1,69 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_mobx/flutter_mobx.dart'; + +import '../stores/search_store.dart'; + +class ACTextFormField extends StatefulWidget { + final SearchStore searchStore; + final bool enableFormField; + final Function onTap; + final Function(String) onChanged; + final bool autoFocus; + + const ACTextFormField({ + Key key, + @required this.searchStore, + @required this.enableFormField, + @required this.onTap, + @required this.onChanged, + @required this.autoFocus, + }) : super(key: key); + @override + _ACTextFormFieldState createState() => _ACTextFormFieldState(); +} + +class _ACTextFormFieldState extends State { + @override + Widget build(BuildContext context) { + double _widthSize = MediaQuery.of(context).size.width; + return InkWell( + onTap: widget.onTap, + child: Container( + width: _widthSize, + height: _widthSize * 0.15, + child: Center( + child: Padding( + padding: EdgeInsets.only(right: 8.0, left: 8.0), + child: Observer(builder: (_) { + return TextFormField( + onChanged: widget.onChanged, + enabled: widget.enableFormField, + autofocus: widget.autoFocus, + decoration: InputDecoration( + border: InputBorder.none, + hintText: "Digite o nome ${widget.searchStore.searchType == "movie" ? "do filme" : "da série"}", + hintStyle: TextStyle(fontSize: 15), + filled: true, + fillColor: Colors.grey[300], + enabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(40), + borderSide: BorderSide(color: Colors.transparent), + ), + disabledBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(40), + borderSide: BorderSide(color: Colors.transparent), + ), + focusedBorder: OutlineInputBorder( + borderRadius: BorderRadius.circular(40), + borderSide: BorderSide(color: Colors.transparent), + ), + ), + cursorColor: Colors.grey[500], + ); + }), + ), + ), + ), + ); + } +} diff --git a/omdb_vitta/lib/app/shared/components/after_credits_dialog/after_credits_dialog.dart b/omdb_vitta/lib/app/shared/components/after_credits_dialog/after_credits_dialog.dart new file mode 100644 index 0000000..9b52a9a --- /dev/null +++ b/omdb_vitta/lib/app/shared/components/after_credits_dialog/after_credits_dialog.dart @@ -0,0 +1,95 @@ +import 'package:bot_toast/bot_toast.dart'; +import 'package:flutter/material.dart'; + +class AfterCreditsDialog { + static void showMovieInfo({ + Widget child, + Duration duration, + }) { + BackButtonBehavior backButtonBehavior = BackButtonBehavior.none; + BotToast.showCustomLoading( + clickClose: false, + allowClick: false, + crossPage: true, + backButtonBehavior: backButtonBehavior, + animationDuration: Duration(milliseconds: 300), + duration: duration ?? Duration(days: 1), + toastBuilder: (cancelFunc) => child, + wrapToastAnimation: (controller, cancel, child) { + return Stack( + children: [ + GestureDetector( + onTap: () { + cancel(); + }, + child: AnimatedBuilder( + builder: (_, child) => Opacity( + opacity: controller.value, + child: child, + ), + child: DecoratedBox( + decoration: BoxDecoration(color: Colors.transparent), + child: SizedBox.expand(), + ), + animation: controller, + ), + ), + CustomOffsetAnimation( + controller: controller, + child: GestureDetector(onTap: cancel, child: Center(child: child)), + ) + ], + ); + }, + ); + } +} + +class CustomOffsetAnimation extends StatefulWidget { + final AnimationController controller; + final Widget child; + + const CustomOffsetAnimation({Key key, this.controller, this.child}) : super(key: key); + + @override + _CustomOffsetAnimationState createState() => _CustomOffsetAnimationState(); +} + +class _CustomOffsetAnimationState extends State { + Tween tweenOffset; + Tween tweenScale; + + Animation animation; + + @override + void initState() { + tweenOffset = Tween( + begin: const Offset(0.0, 0.8), + end: Offset.zero, + ); + tweenScale = Tween(begin: 0.3, end: 1.0); + animation = CurvedAnimation(parent: widget.controller, curve: Curves.decelerate); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return AnimatedBuilder( + child: widget.child, + animation: widget.controller, + builder: (context, child) { + return FractionalTranslation( + translation: tweenOffset.evaluate(animation), + child: ClipRect( + child: Transform.scale( + scale: tweenScale.evaluate(animation), + child: Opacity( + child: child, + opacity: animation.value, + ), + ), + )); + }, + ); + } +} diff --git a/omdb_vitta/lib/app/shared/components/manual_page_control.dart b/omdb_vitta/lib/app/shared/components/manual_page_control.dart new file mode 100644 index 0000000..b529feb --- /dev/null +++ b/omdb_vitta/lib/app/shared/components/manual_page_control.dart @@ -0,0 +1,70 @@ +import 'package:carousel_slider/carousel_controller.dart'; +import 'package:carousel_slider/carousel_slider.dart'; +import 'package:flutter/material.dart'; + +class ManualPageControl extends StatefulWidget { + final List items; + final List titles; + final double height; + final CarouselController controller; + final Function(int, CarouselPageChangedReason) onPageChanged; + final bool hasTitles; + final Function onTapMovie; + + const ManualPageControl({ + Key key, + this.items, + this.titles, + this.controller, + this.onPageChanged, + this.height, + @required this.hasTitles, + @required this.onTapMovie, + }) : super(key: key); + + @override + _ManualPageControlState createState() => _ManualPageControlState(); +} + +class _ManualPageControlState extends State { + @override + Widget build(BuildContext context) { + return SingleChildScrollView( + physics: NeverScrollableScrollPhysics(), + child: CarouselSlider( + items: widget.items.asMap().entries.map((e) { + return Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + Spacer(), + widget.hasTitles + ? Container( + margin: EdgeInsets.only(bottom: 20), + child: Padding( + padding: EdgeInsets.symmetric(vertical: 8.0, horizontal: 16.0), + child: widget.titles[e.key], + ), + ) + : SizedBox(), + InkWell( + onTap: widget.onTapMovie, + child: Container(child: e.value), + ), + Spacer(), + ], + ); + }).toList(), + options: CarouselOptions( + aspectRatio: (9 / 16), + initialPage: 0, + enlargeCenterPage: true, + viewportFraction: 0.85, + enableInfiniteScroll: false, + onPageChanged: widget.onPageChanged, + height: widget.height, + ), + carouselController: widget.controller, + ), + ); + } +} diff --git a/omdb_vitta/lib/app/shared/models/movie_model.dart b/omdb_vitta/lib/app/shared/models/movie_model.dart new file mode 100644 index 0000000..be26714 --- /dev/null +++ b/omdb_vitta/lib/app/shared/models/movie_model.dart @@ -0,0 +1,176 @@ +import 'rating_model.dart'; + +class MovieModel { + MovieModel({ + this.title, + this.year, + this.rated, + this.released, + this.runtime, + this.genre, + this.director, + this.writer, + this.actors, + this.plot, + this.language, + this.country, + this.awards, + this.poster, + this.ratings, + this.metascore, + this.imdbRating, + this.imdbVotes, + this.imdbId, + this.type, + this.dvd, + this.boxOffice, + this.production, + this.website, + this.response, + }); + + final String title; + final String year; + final String rated; + final String released; + final String runtime; + final String genre; + final String director; + final String writer; + final String actors; + final String plot; + final String language; + final String country; + final String awards; + final String poster; + final List ratings; + final String metascore; + final double imdbRating; + final String imdbVotes; + final String imdbId; + final String type; + final String dvd; + final String boxOffice; + final String production; + final String website; + final String response; + + MovieModel copyWith({ + String title, + String year, + String rated, + String released, + String runtime, + String genre, + String director, + String writer, + String actors, + String plot, + String language, + String country, + String awards, + String poster, + List ratings, + String metascore, + double imdbRating, + String imdbVotes, + String imdbId, + String type, + String dvd, + String boxOffice, + String production, + String website, + String response, + }) => + MovieModel( + title: title ?? this.title, + year: year ?? this.year, + rated: rated ?? this.rated, + released: released ?? this.released, + runtime: runtime ?? this.runtime, + genre: genre ?? this.genre, + director: director ?? this.director, + writer: writer ?? this.writer, + actors: actors ?? this.actors, + plot: plot ?? this.plot, + language: language ?? this.language, + country: country ?? this.country, + awards: awards ?? this.awards, + poster: poster ?? this.poster, + ratings: ratings ?? this.ratings, + metascore: metascore ?? this.metascore, + imdbRating: imdbRating ?? this.imdbRating, + imdbVotes: imdbVotes ?? this.imdbVotes, + imdbId: imdbId ?? this.imdbId, + type: type ?? this.type, + dvd: dvd ?? this.dvd, + boxOffice: boxOffice ?? this.boxOffice, + production: production ?? this.production, + website: website ?? this.website, + response: response ?? this.response, + ); + + factory MovieModel.fromJson(Map json) => MovieModel( + title: json["Title"] == null || json["Title"] == "N/A" ? "Não Informado": json["Title"], + year: json["Year"] == null || json["Year"] == "N/A" ? "Não Informado" : json["Year"], + rated: json["Rated"] == null || json["Rated"] == "N/A" ? "Não Informado": json["Rated"], + released: json["Released"] == null || json["Released"] == "N/A" ? "Não Informado": json["Released"], + runtime: json["Runtime"] == null || json["Runtime"] == "N/A" ? "Não Informado": json["Runtime"], + genre: json["Genre"] == null || json["Genre"] == "N/A" ? "Não Informado" : json["Genre"], + director: json["Director"] == null || json["Director"] == "N/A" ? "Não Informado" : json["Director"], + writer: json["Writer"] == null || json["Writer"] == "N/A" ? "Não Informado": json["Writer"], + actors: json["Actors"] == null || json["Actors"] == "N/A" ? "Não Informado": json["Actors"], + plot: json["Plot"] == null || json["Plot"] == "N/A" ? "Não Informado": json["Plot"], + language: json["Language"] == null || json["Language"] == "N/A" ? "Não Informado": json["Language"], + country: json["Country"] == null || json["Country"] == "N/A" ? "Não Informado": json["Country"], + awards: json["Awards"] == null || json["Awards"] == "N/A" ? "Não Informado": json["Awards"], + poster: (json["Poster"] == null || json["Poster"] == "N/A") ? "" : json["Poster"], + ratings: json["Ratings"] == null + ? null + : List.from(json["Ratings"].map((x) => RatingModel.fromJson(x))), + metascore: json["Metascore"] == null ? null : json["Metascore"], + imdbRating: + (json["imdbRating"] == null || json["imdbRating"] == "N/A") ? 0.00001 : double.parse(json["imdbRating"]), + imdbVotes: json["imdbVotes"] == null ? null : json["imdbVotes"], + imdbId: json["imdbID"] == null ? null : json["imdbID"], + type: json["Type"] == null ? null : json["Type"], + dvd: json["DVD"] == null ? null : json["DVD"], + boxOffice: json["BoxOffice"] == null ? null : json["BoxOffice"], + production: json["Production"] == null ? null : json["Production"], + website: json["Website"] == null ? null : json["Website"], + response: json["Response"] == null ? null : json["Response"], + ); + + Map toJson() => { + "Title": title == null ? null : title, + "Year": year == null ? null : year, + "Rated": rated == null ? null : rated, + "Released": released == null ? null : released, + "Runtime": runtime == null ? null : runtime, + "Genre": genre == null ? null : genre, + "Director": director == null ? null : director, + "Writer": writer == null ? null : writer, + "Actors": actors == null ? null : actors, + "Plot": plot == null ? null : plot, + "Language": language == null ? null : language, + "Country": country == null ? null : country, + "Awards": awards == null ? null : awards, + "Poster": poster == null ? null : poster, + "Ratings": ratings == null ? null : List.from(ratings.map((x) => x.toJson())), + "Metascore": metascore == null ? null : metascore, + "imdbRating": imdbRating == null ? null : imdbRating, + "imdbVotes": imdbVotes == null ? null : imdbVotes, + "imdbID": imdbId == null ? null : imdbId, + "Type": type == null ? null : type, + "DVD": dvd == null ? null : dvd, + "BoxOffice": boxOffice == null ? null : boxOffice, + "Production": production == null ? null : production, + "Website": website == null ? null : website, + "Response": response == null ? null : response, + }; + + @override + String toString() { + return 'MovieModel(title: $title, year: $year, image: $poster)'; + } +} diff --git a/omdb_vitta/lib/app/shared/models/rating_model.dart b/omdb_vitta/lib/app/shared/models/rating_model.dart new file mode 100644 index 0000000..7dc581b --- /dev/null +++ b/omdb_vitta/lib/app/shared/models/rating_model.dart @@ -0,0 +1,30 @@ +import 'package:meta/meta.dart'; + +class RatingModel { + RatingModel({ + @required this.source, + @required this.value, + }); + + final String source; + final String value; + + RatingModel copyWith({ + String source, + String value, + }) => + RatingModel( + source: source ?? this.source, + value: value ?? this.value, + ); + + factory RatingModel.fromJson(Map json) => RatingModel( + source: json["Source"] == null ? null : json["Source"], + value: json["Value"] == null ? null : json["Value"], + ); + + Map toJson() => { + "Source": source == null ? null : source, + "Value": value == null ? null : value, + }; +} diff --git a/omdb_vitta/lib/app/shared/services/custom_dio.dart b/omdb_vitta/lib/app/shared/services/custom_dio.dart new file mode 100644 index 0000000..36b2b24 --- /dev/null +++ b/omdb_vitta/lib/app/shared/services/custom_dio.dart @@ -0,0 +1,13 @@ +import 'package:dio/native_imp.dart'; + +import 'custom_dio_interceptors.dart'; +// import 'custom_dio_interceptors_log.dart'; + +class CustomDio extends DioForNative { + CustomDio() { + options.baseUrl = "http://www.omdbapi.com"; + interceptors.add(CustomDioInterceptors()); + // interceptors.add(CustomDioInterceptorsLog()); + options.connectTimeout = 5000; + } +} diff --git a/omdb_vitta/lib/app/shared/services/custom_dio_interceptors.dart b/omdb_vitta/lib/app/shared/services/custom_dio_interceptors.dart new file mode 100644 index 0000000..19e6c2d --- /dev/null +++ b/omdb_vitta/lib/app/shared/services/custom_dio_interceptors.dart @@ -0,0 +1,18 @@ +import 'package:dio/dio.dart'; + +class CustomDioInterceptors extends InterceptorsWrapper { + @override + Future onRequest(RequestOptions options) async { + return options; + } + + @override + Future onError(DioError e) async { + return e; + } + + @override + Future onResponse(Response response) async { + return response; + } +} diff --git a/omdb_vitta/lib/app/shared/services/custom_dio_interceptors_log.dart b/omdb_vitta/lib/app/shared/services/custom_dio_interceptors_log.dart new file mode 100644 index 0000000..75201d1 --- /dev/null +++ b/omdb_vitta/lib/app/shared/services/custom_dio_interceptors_log.dart @@ -0,0 +1,26 @@ +import 'package:dio/dio.dart'; + +class CustomDioInterceptorsLog extends InterceptorsWrapper { + @override + Future onRequest(RequestOptions options) async { + print("REQUEST: [${options.method}] -> PATH: ${options.path} Custom"); + print("${options.headers}"); + + return options; + } + + @override + Future onError(DioError e) async { + print("RESPONSE: [${e.response?.statusCode}] -> PATH: ${e.request.path} Custom"); + print(e.message); + + return e; + } + + @override + Future onResponse(Response response) async { + print("RESPONSE: [${response.statusCode}] -> PATH: ${response.request.path} Custom"); + + return response; + } +} diff --git a/omdb_vitta/lib/app/shared/stores/search_store.dart b/omdb_vitta/lib/app/shared/stores/search_store.dart new file mode 100644 index 0000000..eaf8943 --- /dev/null +++ b/omdb_vitta/lib/app/shared/stores/search_store.dart @@ -0,0 +1,21 @@ +import 'package:mobx/mobx.dart'; + +part 'search_store.g.dart'; + +class SearchStore = _SearchStoreBase with _$SearchStore; + +abstract class _SearchStoreBase with Store { + @observable + String _searchType = "movie"; + @action + setSearchType(String type) => _searchType = type; + @computed + String get searchType => _searchType; + + @observable + String _searchData = ""; + @action + inputSearchData(String data) => _searchData = data; + @computed + String get searchData => _searchData; +} diff --git a/omdb_vitta/lib/main.dart b/omdb_vitta/lib/main.dart new file mode 100644 index 0000000..7bd3ee4 --- /dev/null +++ b/omdb_vitta/lib/main.dart @@ -0,0 +1,6 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_modular/flutter_modular.dart'; + +import 'app/app_module.dart'; + +void main() => runApp(ModularApp(module: AppModule())); diff --git a/omdb_vitta/pubspec.lock b/omdb_vitta/pubspec.lock new file mode 100644 index 0000000..6795129 --- /dev/null +++ b/omdb_vitta/pubspec.lock @@ -0,0 +1,681 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "0.39.14" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.0" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.4.2" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + bot_toast: + dependency: "direct main" + description: + name: bot_toast + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.0" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.2" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.10" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.1" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.1" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "4.3.2" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "7.1.0" + cached_network_image: + dependency: "direct main" + description: + name: cached_network_image + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0+1" + carousel_slider: + dependency: "direct main" + description: + name: carousel_slider + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + charcode: + dependency: transitive + description: + name: charcode + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.3" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + cli_util: + dependency: transitive + description: + name: cli_util + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "3.4.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.14.13" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.4" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.dartlang.org" + source: hosted + version: "0.16.2" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.6" + dio: + dependency: "direct main" + description: + name: dio + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.9" + effective_dart: + dependency: "direct dev" + description: + name: effective_dart + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.4" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "5.2.1" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.11" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.1" + flutter_mobx: + dependency: "direct main" + description: + name: flutter_mobx + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0+1" + flutter_modular: + dependency: "direct main" + description: + name: flutter_modular + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.2" + flutter_rating_bar: + dependency: "direct main" + description: + name: flutter_rating_bar + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1+1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + google_fonts: + dependency: "direct main" + description: + name: google_fonts + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.0" + html: + dependency: transitive + description: + name: html + url: "https://pub.dartlang.org" + source: hosted + version: "0.14.0+3" + http: + dependency: transitive + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.2" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.4" + infinity_page_view: + dependency: "direct main" + description: + path: "." + ref: HEAD + resolved-ref: "561271b2fb437e5e0fef3a72aa430c4b4a7d9a42" + url: "https://github.com/fogaiht/infinity_page_view" + source: git + version: "1.0.0" + intl: + dependency: transitive + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.16.1" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "0.3.4" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.2" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "0.11.4" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.8" + material_design_icons_flutter: + dependency: "direct main" + description: + name: material_design_icons_flutter + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.5345" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.8" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6+3" + mobx: + dependency: "direct main" + description: + name: mobx + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1+1" + mobx_codegen: + dependency: "direct dev" + description: + name: mobx_codegen + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0+1" + mockito: + dependency: "direct dev" + description: + name: mockito + url: "https://pub.dartlang.org" + source: hosted + version: "4.1.1" + node_interop: + dependency: transitive + description: + name: node_interop + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + node_io: + dependency: transitive + description: + name: node_io + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.3" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + path_provider: + dependency: transitive + description: + name: path_provider + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.11" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.1+2" + path_provider_macos: + dependency: transitive + description: + name: path_provider_macos + url: "https://pub.dartlang.org" + source: hosted + version: "0.0.4+3" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.0" + platform: + dependency: transitive + description: + name: platform + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + process: + dependency: transitive + description: + name: process + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.13" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" + quiver: + dependency: transitive + description: + name: quiver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + rxdart: + dependency: transitive + description: + name: rxdart + url: "https://pub.dartlang.org" + source: hosted + version: "0.24.1" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "0.7.7" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.3" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.6" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.7.0" + sqflite: + dependency: transitive + description: + name: sqflite + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2+1" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.5" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.5" + synchronized: + dependency: transitive + description: + name: synchronized + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0+2" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.2.17" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1+2" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + uuid: + dependency: transitive + description: + name: uuid + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.8" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.9.7+15" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.0" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.1" +sdks: + dart: ">=2.9.0-14.0.dev <3.0.0" + flutter: ">=1.17.0 <2.0.0" diff --git a/omdb_vitta/pubspec.yaml b/omdb_vitta/pubspec.yaml new file mode 100644 index 0000000..7b6802d --- /dev/null +++ b/omdb_vitta/pubspec.yaml @@ -0,0 +1,101 @@ +name: omdb_vitta +description: Projeto criado para pesquisa de filmes utilizando a OMDB API + +# The following line prevents the package from being accidentally published to +# pub.dev using `pub publish`. This is preferred for private packages. +publish_to: 'none' # Remove this line if you wish to publish to pub.dev + +# The following defines the version and build number for your application. +# A version number is three numbers separated by dots, like 1.2.43 +# followed by an optional build number separated by a +. +# Both the version and the builder number may be overridden in flutter +# build by specifying --build-name and --build-number, respectively. +# In Android, build-name is used as versionName while build-number used as versionCode. +# Read more about Android versioning at https://developer.android.com/studio/publish/versioning +# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# Read more about iOS versioning at +# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +version: 1.0.0+1 + +environment: + sdk: ">=2.8.0 <3.0.0" + +dependencies: + material_design_icons_flutter: ^4.0.5345 + flutter_rating_bar: ^3.0.1+1 + google_fonts: ^1.1.0 + cached_network_image: ^2.2.0+1 + bot_toast: ^3.0.1 + carousel_slider: ^2.2.1 + infinity_page_view: + git: https://github.com/fogaiht/infinity_page_view + dio: ^3.0.9 + flutter_mobx: ^1.1.0+1 + mobx: ^1.2.1+1 + flutter_modular: ^1.3.2 + flutter: + sdk: flutter + + + # The following adds the Cupertino Icons font to your application. + # Use with the CupertinoIcons class for iOS style icons. + +dev_dependencies: + effective_dart: ^1.2.4 + mockito: ^4.1.1 + mobx_codegen: ^1.1.0+1 + build_runner: ^1.8.2 + flutter_test: + sdk: flutter + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter. +flutter: + + # The following line ensures that the Material Icons font is + # included with your application, so that you can use the icons in + # the material Icons class. + uses-material-design: true + assets: + - assets/ +vars: + clean: flutter clean + get: flutter pub get + runner: flutter pub run build_runner +scripts: + mobx_build: $get & $runner build --delete-conflicting-outputs + mobx_watch: $get & $runner watch --delete-conflicting-outputs + mobx_clean: $get & $runner clean + + # To add assets to your application, add an assets section, like this: + + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware. + + # For details regarding adding assets from package dependencies, see + # https://flutter.dev/assets-and-images/#from-packages + + # To add custom fonts to your application, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts from package dependencies, + # see https://flutter.dev/custom-fonts/#from-packages diff --git a/omdb_vitta/test/app/app_controller_test.dart b/omdb_vitta/test/app/app_controller_test.dart new file mode 100644 index 0000000..0488a75 --- /dev/null +++ b/omdb_vitta/test/app/app_controller_test.dart @@ -0,0 +1,25 @@ +import 'package:flutter_modular/flutter_modular_test.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:omdb_vitta/app/app_module.dart'; + + +void main() { + initModule(AppModule()); + // AppController app; + // + setUp(() { + // app = AppModule.to.get(); + }); + + group('AppController Test', () { + // test("First Test", () { + // expect(app, isInstanceOf()); + // }); + + // test("Set Value", () { + // expect(app.value, equals(0)); + // app.increment(); + // expect(app.value, equals(1)); + // }); + }); +} diff --git a/omdb_vitta/test/app/modules/home/home_controller_test.dart b/omdb_vitta/test/app/modules/home/home_controller_test.dart new file mode 100644 index 0000000..4ea09fa --- /dev/null +++ b/omdb_vitta/test/app/modules/home/home_controller_test.dart @@ -0,0 +1,25 @@ +import 'package:flutter_modular/flutter_modular_test.dart'; +import 'package:flutter_test/flutter_test.dart'; +import 'package:omdb_vitta/app/modules/home/home_module.dart'; + + +void main() { + initModule(HomeModule()); + // HomeController home; + // + setUp(() { + // home = HomeModule.to.get(); + }); + + group('HomeController Test', () { + // test("First Test", () { + // expect(home, isInstanceOf()); + // }); + + // test("Set Value", () { + // expect(home.value, equals(0)); + // home.increment(); + // expect(home.value, equals(1)); + // }); + }); +} diff --git a/omdb_vitta/test/app/modules/home/home_page_test.dart b/omdb_vitta/test/app/modules/home/home_page_test.dart new file mode 100644 index 0000000..316520d --- /dev/null +++ b/omdb_vitta/test/app/modules/home/home_page_test.dart @@ -0,0 +1,13 @@ + +import 'package:flutter_test/flutter_test.dart'; +import 'package:flutter_modular/flutter_modular_test.dart'; + +import 'package:omdb_vitta/app/modules/home/home_page.dart'; + +void main() { + testWidgets('HomePage has title', (tester) async { + await tester.pumpWidget(buildTestableWidget(HomePage(title: 'Home'))); + final titleFinder = find.text('Home'); + expect(titleFinder, findsOneWidget); + }); +}