├── .github
└── workflows
│ └── main.yml
├── .gitignore
├── .metadata
├── README.md
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── movies_app
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable-v21
│ │ │ └── launch_background.xml
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── values-night
│ │ │ └── styles.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── assets
├── fonts
│ ├── Raleway-Bold.ttf
│ ├── Raleway-Light.ttf
│ ├── Raleway-Medium.ttf
│ └── Raleway-Regular.ttf
└── images
│ ├── placeholder-female.png
│ ├── placeholder-male.png
│ └── placeholder-unknown.png
├── coverage
└── lcov.info
├── coverage_badge.svg
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ ├── IDEWorkspaceChecks.plist
│ │ │ └── WorkspaceSettings.xcsettings
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── core
│ ├── configs
│ │ ├── configs.dart
│ │ └── styles
│ │ │ ├── app_colors.dart
│ │ │ ├── app_text_styles.dart
│ │ │ ├── app_themes.dart
│ │ │ └── ui_constants.dart
│ ├── exceptions
│ │ └── http_exception.dart
│ ├── models
│ │ ├── cache_response.dart
│ │ └── paginated_response.dart
│ ├── services
│ │ ├── http
│ │ │ ├── dio-interceptors
│ │ │ │ └── cache_interceptor.dart
│ │ │ ├── dio_http_service.dart
│ │ │ ├── http_service.dart
│ │ │ └── http_service_provider.dart
│ │ ├── media
│ │ │ └── media_service.dart
│ │ └── storage
│ │ │ ├── hive_storage_service.dart
│ │ │ ├── storage_service.dart
│ │ │ └── storage_service_provider.dart
│ └── widgets
│ │ ├── app_bar_leading.dart
│ │ ├── app_cached_network_image.dart
│ │ ├── app_loader.dart
│ │ ├── error_view.dart
│ │ ├── grid_shimmer.dart
│ │ ├── list_item_shimmer.dart
│ │ └── shimmer.dart
├── features
│ ├── media
│ │ ├── enums
│ │ │ └── media_type.dart
│ │ └── models
│ │ │ └── media.dart
│ ├── people
│ │ ├── enums
│ │ │ └── gender.dart
│ │ ├── models
│ │ │ ├── person.dart
│ │ │ └── person_image.dart
│ │ ├── providers
│ │ │ ├── current_popular_person_provider.dart
│ │ │ ├── paginated_popular_people_provider.dart
│ │ │ ├── person_details_provider.dart
│ │ │ ├── person_images_provider.dart
│ │ │ ├── popular_people_count_provider.dart
│ │ │ └── popular_people_list_scroll_controller_provider.dart
│ │ ├── repositories
│ │ │ ├── http_people_repository.dart
│ │ │ └── people_repository.dart
│ │ └── views
│ │ │ ├── pages
│ │ │ ├── person_details_page.dart
│ │ │ ├── person_images_slider_page.dart
│ │ │ └── popular_people_page.dart
│ │ │ └── widgets
│ │ │ ├── person_avatar.dart
│ │ │ ├── person_bio.dart
│ │ │ ├── person_cover.dart
│ │ │ ├── person_details_sliver_app_bar.dart
│ │ │ ├── person_images.dart
│ │ │ ├── person_images_grid.dart
│ │ │ ├── person_images_grid_item.dart
│ │ │ ├── person_info.dart
│ │ │ ├── person_media.dart
│ │ │ ├── person_name.dart
│ │ │ ├── popular_people_app_bar.dart
│ │ │ ├── popular_people_list.dart
│ │ │ ├── popular_person_list_item.dart
│ │ │ ├── save_image_slider_action.dart
│ │ │ └── slider_action.dart
│ └── tmdb-configs
│ │ ├── enums
│ │ └── image_size.dart
│ │ ├── models
│ │ ├── tmdb_configs.dart
│ │ └── tmdb_image_configs.dart
│ │ ├── providers
│ │ └── tmdb_configs_provider.dart
│ │ └── repositories
│ │ ├── http_tmdb_configs_repository.dart
│ │ └── tmdb_configs_repository.dart
├── main.dart
└── movies_app.dart
├── macos
├── Flutter
│ ├── GeneratedPluginRegistrant.swift
│ └── ephemeral
│ │ ├── Flutter-Generated.xcconfig
│ │ └── flutter_export_environment.sh
├── Podfile
├── Pods
│ ├── FMDB
│ │ ├── LICENSE.txt
│ │ ├── README.markdown
│ │ └── src
│ │ │ └── fmdb
│ │ │ ├── FMDB.h
│ │ │ ├── FMDatabase.h
│ │ │ ├── FMDatabase.m
│ │ │ ├── FMDatabaseAdditions.h
│ │ │ ├── FMDatabaseAdditions.m
│ │ │ ├── FMDatabasePool.h
│ │ │ ├── FMDatabasePool.m
│ │ │ ├── FMDatabaseQueue.h
│ │ │ ├── FMDatabaseQueue.m
│ │ │ ├── FMResultSet.h
│ │ │ └── FMResultSet.m
│ ├── Local Podspecs
│ │ ├── FlutterMacOS.podspec.json
│ │ ├── path_provider_macos.podspec.json
│ │ ├── sqflite.podspec.json
│ │ └── url_launcher_macos.podspec.json
│ ├── Pods.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcuserdata
│ │ │ └── roaakhaddam.xcuserdatad
│ │ │ └── xcschemes
│ │ │ ├── FMDB.xcscheme
│ │ │ ├── FlutterMacOS.xcscheme
│ │ │ ├── Pods-Runner.xcscheme
│ │ │ ├── path_provider_macos.xcscheme
│ │ │ ├── sqflite.xcscheme
│ │ │ ├── url_launcher_macos.xcscheme
│ │ │ └── xcschememanagement.plist
│ └── Target Support Files
│ │ ├── FMDB
│ │ ├── FMDB-Info.plist
│ │ ├── FMDB-dummy.m
│ │ ├── FMDB-prefix.pch
│ │ ├── FMDB-umbrella.h
│ │ ├── FMDB.debug.xcconfig
│ │ ├── FMDB.modulemap
│ │ └── FMDB.release.xcconfig
│ │ ├── FlutterMacOS
│ │ ├── FlutterMacOS.debug.xcconfig
│ │ └── FlutterMacOS.release.xcconfig
│ │ ├── Pods-Runner
│ │ ├── Pods-Runner-Info.plist
│ │ ├── Pods-Runner-acknowledgements.markdown
│ │ ├── Pods-Runner-acknowledgements.plist
│ │ ├── Pods-Runner-dummy.m
│ │ ├── Pods-Runner-frameworks-Debug-input-files.xcfilelist
│ │ ├── Pods-Runner-frameworks-Debug-output-files.xcfilelist
│ │ ├── Pods-Runner-frameworks-Profile-input-files.xcfilelist
│ │ ├── Pods-Runner-frameworks-Profile-output-files.xcfilelist
│ │ ├── Pods-Runner-frameworks-Release-input-files.xcfilelist
│ │ ├── Pods-Runner-frameworks-Release-output-files.xcfilelist
│ │ ├── Pods-Runner-frameworks.sh
│ │ ├── Pods-Runner-umbrella.h
│ │ ├── Pods-Runner.debug.xcconfig
│ │ ├── Pods-Runner.modulemap
│ │ ├── Pods-Runner.profile.xcconfig
│ │ └── Pods-Runner.release.xcconfig
│ │ ├── path_provider_macos
│ │ ├── path_provider_macos-Info.plist
│ │ ├── path_provider_macos-dummy.m
│ │ ├── path_provider_macos-prefix.pch
│ │ ├── path_provider_macos-umbrella.h
│ │ ├── path_provider_macos.debug.xcconfig
│ │ ├── path_provider_macos.modulemap
│ │ └── path_provider_macos.release.xcconfig
│ │ ├── sqflite
│ │ ├── sqflite-Info.plist
│ │ ├── sqflite-dummy.m
│ │ ├── sqflite-prefix.pch
│ │ ├── sqflite-umbrella.h
│ │ ├── sqflite.debug.xcconfig
│ │ ├── sqflite.modulemap
│ │ └── sqflite.release.xcconfig
│ │ └── url_launcher_macos
│ │ ├── url_launcher_macos-Info.plist
│ │ ├── url_launcher_macos-dummy.m
│ │ ├── url_launcher_macos-prefix.pch
│ │ ├── url_launcher_macos-umbrella.h
│ │ ├── url_launcher_macos.debug.xcconfig
│ │ ├── url_launcher_macos.modulemap
│ │ └── url_launcher_macos.release.xcconfig
├── Runner.xcodeproj
│ └── xcuserdata
│ │ └── roaakhaddam.xcuserdatad
│ │ └── xcschemes
│ │ └── xcschememanagement.plist
└── Runner.xcworkspace
│ └── xcuserdata
│ └── roaakhaddam.xcuserdatad
│ └── UserInterfaceState.xcuserstate
├── pubspec.yaml
└── test
├── core
├── services
│ ├── http
│ │ ├── dio-intercepters
│ │ │ └── caching_interceptor_test.dart
│ │ ├── dio_http_service_test.dart
│ │ └── http_service_provider_test.dart
│ ├── media
│ │ └── media_service_test.dart
│ └── storage
│ │ ├── hive_storage_service_test.dart
│ │ └── storage_service_provider_test.dart
└── widgets
│ ├── app_bar_leading_test.dart
│ └── app_cached_network_image_test.dart
├── features
├── media
│ └── models
│ │ └── media_test.dart
├── people
│ ├── enums
│ │ └── gender_test.dart
│ ├── models
│ │ ├── person_image_test.dart
│ │ └── person_test.dart
│ ├── providers
│ │ ├── current_popular_person_provider_test.dart
│ │ ├── paginated_popular_people_provider_test.dart
│ │ ├── person_details_provider_test.dart
│ │ ├── person_images_provider_test.dart
│ │ ├── popular_people_count_provider_test.dart
│ │ └── popular_people_scroll_controller_provider.dart
│ ├── repositories
│ │ ├── http_people_repository_test.dart
│ │ └── people_repository_test.dart
│ └── views
│ │ ├── pages
│ │ ├── person_details_page_test.dart
│ │ ├── person_images_slider_page_test.dart
│ │ └── popular_people_page_test.dart
│ │ └── widgets
│ │ ├── person_avatar_test.dart
│ │ ├── person_cover_test.dart
│ │ ├── person_images_grid_item_test.dart
│ │ ├── person_images_grid_test.dart
│ │ ├── person_images_test.dart
│ │ ├── person_media_test.dart
│ │ ├── popular_people_list_test.dart
│ │ ├── popular_person_list_item_test.dart
│ │ └── save_image_slider_action_test.dart
└── tmdb-configs
│ ├── models
│ └── tmdb_image_configs_test.dart
│ ├── providers
│ └── tmdb_configs_provider_test.dart
│ └── repositories
│ ├── http_tmdb_configs_repository_test.dart
│ └── tmdb_configs_repository_test.dart
├── movies_app_test.dart
└── test-utils
├── dummy-data
├── dummy_configs.dart
├── dummy_people.dart
└── json
│ ├── example_configuration_response.json
│ ├── example_person_details_response.json
│ ├── example_person_images_response.json
│ └── example_popular_people_response.json
├── golden_test_utils.dart
├── mocks.dart
└── pump_app.dart
/.github/workflows/main.yml:
--------------------------------------------------------------------------------
1 | # This is a basic workflow to help you get started with Actions
2 |
3 | name: Flutter Test
4 |
5 | # Controls when the workflow will run
6 | on:
7 | # Triggers the workflow on push or pull request events but only for the "main" branch
8 | push:
9 | branches: [ "main" ]
10 | pull_request:
11 | branches: [ "main" ]
12 |
13 | # Allows you to run this workflow manually from the Actions tab
14 | workflow_dispatch:
15 |
16 | jobs:
17 | build:
18 | runs-on: ubuntu-latest
19 |
20 | steps:
21 | - uses: actions/checkout@v2
22 | - uses: actions/setup-java@v1
23 | with:
24 | java-version: '12.x'
25 | - uses: subosito/flutter-action@v1
26 | with:
27 | channel: 'stable'
28 |
29 | - name: Get all Flutter Packages
30 | run: flutter pub get
31 |
32 | - name: Run Flutter Test
33 | run: flutter test --update-goldens
34 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 | migrate_working_dir/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # The .vscode folder contains launch configuration and tasks you configure in
20 | # VS Code which you may wish to be included in version control, so this line
21 | # is commented out by default.
22 | #.vscode/
23 |
24 | # Flutter/Dart/Pub related
25 | **/doc/api/
26 | **/ios/Flutter/.last_build_id
27 | .dart_tool/
28 | .flutter-plugins
29 | .flutter-plugins-dependencies
30 | .packages
31 | .pub-cache/
32 | .pub/
33 | /build/
34 |
35 | # Web related
36 | lib/generated_plugin_registrant.dart
37 |
38 | # Symbolication related
39 | app.*.symbols
40 |
41 | # Obfuscation related
42 | app.*.map.json
43 |
44 | # Android Studio will place build artifacts here
45 | /android/app/debug
46 | /android/app/profile
47 | /android/app/release
48 | pubspec.lock
49 | /coverage/html/
50 |
51 | .fvm
52 | .vscode
53 |
54 | # Goldens
55 | /test/**/goldens/**/*.*
56 | /test/**/failures/**/*.*
57 |
58 | #mason
59 | .mason/
60 | mason-lock.json
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled.
5 |
6 | version:
7 | revision: f1875d570e39de09040c8f79aa13cc56baab8db1
8 | channel: stable
9 |
10 | project_type: app
11 |
12 | # Tracks metadata for the flutter migrate command
13 | migration:
14 | platforms:
15 | - platform: root
16 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
17 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
18 | - platform: android
19 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
20 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
21 | - platform: ios
22 | create_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
23 | base_revision: f1875d570e39de09040c8f79aa13cc56baab8db1
24 |
25 | # User provided section
26 |
27 | # List of Local paths (relative to this file) that should be
28 | # ignored by the migrate tool.
29 | #
30 | # Files that are not part of the templates will be ignored by default.
31 | unmanaged_files:
32 | - 'lib/main.dart'
33 | - 'ios/Runner.xcodeproj/project.pbxproj'
34 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:very_good_analysis/analysis_options.yaml
2 |
3 | linter:
4 | rules:
5 | prefer_single_quotes: true
6 | always_use_package_imports: true
7 | flutter_style_todos: false
8 | avoid_redundant_argument_values: false
9 | sort_pub_dependencies: false
10 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
9 | # Remember to never publicly share your keystore.
10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11 | key.properties
12 | **/*.keystore
13 | **/*.jks
14 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion flutter.compileSdkVersion
30 | ndkVersion flutter.ndkVersion
31 |
32 | compileOptions {
33 | sourceCompatibility JavaVersion.VERSION_1_8
34 | targetCompatibility JavaVersion.VERSION_1_8
35 | }
36 |
37 | kotlinOptions {
38 | jvmTarget = '1.8'
39 | }
40 |
41 | sourceSets {
42 | main.java.srcDirs += 'src/main/kotlin'
43 | }
44 |
45 | defaultConfig {
46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
47 | applicationId "com.example.movies_app"
48 | // You can update the following values to match your application needs.
49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
50 | minSdkVersion 23
51 | targetSdkVersion 33
52 | versionCode flutterVersionCode.toInteger()
53 | versionName flutterVersionName
54 | }
55 |
56 | buildTypes {
57 | release {
58 | // TODO: Add your own signing config for the release build.
59 | // Signing with the debug keys for now, so `flutter run --release` works.
60 | signingConfig signingConfigs.debug
61 | }
62 | }
63 | }
64 |
65 | flutter {
66 | source '../..'
67 | }
68 |
69 | dependencies {
70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
71 | }
72 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
16 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
31 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/movies_app/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.movies_app
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.6.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.1.2'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | mavenCentral()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.useAndroidX=true
3 | android.enableJetifier=true
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/assets/fonts/Raleway-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/assets/fonts/Raleway-Bold.ttf
--------------------------------------------------------------------------------
/assets/fonts/Raleway-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/assets/fonts/Raleway-Light.ttf
--------------------------------------------------------------------------------
/assets/fonts/Raleway-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/assets/fonts/Raleway-Medium.ttf
--------------------------------------------------------------------------------
/assets/fonts/Raleway-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/assets/fonts/Raleway-Regular.ttf
--------------------------------------------------------------------------------
/assets/images/placeholder-female.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/assets/images/placeholder-female.png
--------------------------------------------------------------------------------
/assets/images/placeholder-male.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/assets/images/placeholder-male.png
--------------------------------------------------------------------------------
/assets/images/placeholder-unknown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/assets/images/placeholder-unknown.png
--------------------------------------------------------------------------------
/coverage_badge.svg:
--------------------------------------------------------------------------------
1 |
21 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 | Podfile.lock
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 11.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | platform :ios, '11.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Roaa94/movies_app/3e0ec08f2da5dbc092c7e71ad8a57d4b21dd59ca/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CADisableMinimumFrameDurationOnPhone
6 |
7 | CFBundleDevelopmentRegion
8 | $(DEVELOPMENT_LANGUAGE)
9 | CFBundleDisplayName
10 | Movies App
11 | CFBundleExecutable
12 | $(EXECUTABLE_NAME)
13 | CFBundleIdentifier
14 | $(PRODUCT_BUNDLE_IDENTIFIER)
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | movies_app
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | $(FLUTTER_BUILD_NAME)
23 | CFBundleSignature
24 | ????
25 | CFBundleVersion
26 | $(FLUTTER_BUILD_NUMBER)
27 | LSRequiresIPhoneOS
28 |
29 | UILaunchStoryboardName
30 | LaunchScreen
31 | UIMainStoryboardFile
32 | Main
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 | UIViewControllerBasedStatusBarAppearance
47 |
48 | NSPhotoLibraryUsageDescription
49 | This app requires access to the photo library in order to upload images to your device.
50 |
51 |
52 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/lib/core/configs/configs.dart:
--------------------------------------------------------------------------------
1 | /// App level configuration variables
2 | class Configs {
3 | /// The max allowed age duration for the http cache
4 | static const Duration maxCacheAge = Duration(hours: 1);
5 |
6 | /// Key used in dio options to indicate whether
7 | /// cache should be force refreshed
8 | static const String dioCacheForceRefreshKey = 'dio_cache_force_refresh_key';
9 |
10 | /// Base API URL of The TMDB API
11 | ///
12 | /// See: https://developers.themoviedb.org/3/getting-started/introduction
13 | static const String apiBaseUrl = 'https://api.themoviedb.org/3';
14 |
15 | /// API Key registered with The TMDB API
16 | ///
17 | /// See: https://developers.themoviedb.org/3/getting-started/introduction
18 | static const String tmdbAPIKey = String.fromEnvironment('TMDB_API_KEY');
19 | }
20 |
--------------------------------------------------------------------------------
/lib/core/configs/styles/app_colors.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | /// Styles class holding app color information
4 | /// and helper methods
5 | class AppColors {
6 | /// App primary color
7 | static const Color primary = Color(0xff50C9FF);
8 |
9 | /// App secondary color
10 | static const Color secondary = Color(0xffFC698C);
11 |
12 | /// App black color
13 | static const Color black = Color(0xff141414);
14 |
15 | /// App white color
16 | static const Color white = Color(0xffffffff);
17 |
18 | /// Returns a shade of a [Color] from a double value
19 | ///
20 | /// The 'darker' boolean determines whether the shade
21 | /// should be .1 darker or lighter than the provided color
22 | static Color getShade(Color color, {bool darker = false, double value = .1}) {
23 | assert(value >= 0 && value <= 1, 'shade values must be between 0 and 1');
24 |
25 | final hsl = HSLColor.fromColor(color);
26 | final hslDark = hsl.withLightness(
27 | (darker ? (hsl.lightness - value) : (hsl.lightness + value))
28 | .clamp(0.0, 1.0),
29 | );
30 |
31 | return hslDark.toColor();
32 | }
33 |
34 | /// Returns a [MaterialColor] from a [Color] object
35 | static MaterialColor getMaterialColorFromColor(Color color) {
36 | final colorShades = {
37 | 50: getShade(color, value: 0.5),
38 | 100: getShade(color, value: 0.4),
39 | 200: getShade(color, value: 0.3),
40 | 300: getShade(color, value: 0.2),
41 | 400: getShade(color, value: 0.1),
42 | 500: color, //Primary value
43 | 600: getShade(color, value: 0.1, darker: true),
44 | 700: getShade(color, value: 0.15, darker: true),
45 | 800: getShade(color, value: 0.2, darker: true),
46 | 900: getShade(color, value: 0.25, darker: true),
47 | };
48 | return MaterialColor(color.value, colorShades);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/lib/core/configs/styles/app_text_styles.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | /// Styles class holding app text styles
4 | class AppTextStyles {
5 | /// Font family string
6 | static const String fontFamily = 'Raleway';
7 |
8 | /// Text style for large body text
9 | static const TextStyle bodyLg = TextStyle(
10 | fontSize: 16,
11 | fontWeight: FontWeight.w300,
12 | );
13 |
14 | /// Text style for body text
15 | static const TextStyle body = TextStyle(
16 | fontSize: 14,
17 | fontWeight: FontWeight.w400,
18 | );
19 |
20 | /// Text style for small body text
21 | static const TextStyle bodySm = TextStyle(
22 | fontSize: 12,
23 | fontWeight: FontWeight.w300,
24 | );
25 |
26 | /// Text style for extra small body text
27 | static const TextStyle bodyXs = TextStyle(
28 | fontSize: 10,
29 | fontWeight: FontWeight.w300,
30 | );
31 |
32 | /// Text style for heading 1 text
33 | static const TextStyle h1 = TextStyle(
34 | fontSize: 35,
35 | fontWeight: FontWeight.w700,
36 | );
37 |
38 | /// Text style for heading 2 text
39 | static const TextStyle h2 = TextStyle(
40 | fontSize: 25,
41 | fontWeight: FontWeight.w400,
42 | );
43 |
44 | /// Text style for heading 3 text
45 | static const TextStyle h3 = TextStyle(
46 | fontSize: 20,
47 | fontWeight: FontWeight.w400,
48 | );
49 |
50 | /// Text style for heading 4 text
51 | static const TextStyle h4 = TextStyle(
52 | fontSize: 18,
53 | fontWeight: FontWeight.w400,
54 | );
55 | }
56 |
--------------------------------------------------------------------------------
/lib/core/configs/styles/ui_constants.dart:
--------------------------------------------------------------------------------
1 | /// Class holding constants used in UI code
2 | class UIConstants {
3 | /// Height of a list item in a popular people list
4 | static const double personListItemHeight = 110;
5 | }
6 |
--------------------------------------------------------------------------------
/lib/core/exceptions/http_exception.dart:
--------------------------------------------------------------------------------
1 | /// Custom exception used with Http requests
2 | class HttpException implements Exception {
3 | /// Creates a new instance of [HttpException]
4 | HttpException({
5 | this.title,
6 | this.message,
7 | this.statusCode,
8 | });
9 |
10 | /// Exception title
11 | final String? title;
12 |
13 | /// Exception message
14 | final String? message;
15 |
16 | /// Exception http response code
17 | final int? statusCode;
18 | }
19 |
--------------------------------------------------------------------------------
/lib/core/models/cache_response.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:clock/clock.dart';
4 | import 'package:dio/dio.dart';
5 | import 'package:movies_app/core/configs/configs.dart';
6 |
7 | /// Model for the response returned from HTTP Cache
8 | class CachedResponse {
9 | /// Creates an instance of [CachedResponse]
10 | CachedResponse({
11 | required this.data,
12 | required this.age,
13 | required this.statusCode,
14 | required this.headers,
15 | });
16 |
17 | /// Creates an instance of [CachedResponse] parsed raw data
18 | factory CachedResponse.fromJson(Map data) {
19 | return CachedResponse(
20 | data: data['data'],
21 | age: DateTime.parse(data['age'] as String),
22 | statusCode: data['statusCode'] as int,
23 | headers: Headers.fromMap(
24 | Map>.from(
25 | json.decode(json.encode(data['headers'])) as Map,
26 | ).map(
27 | (k, v) => MapEntry(k, List.from(v)),
28 | ),
29 | ),
30 | );
31 | }
32 |
33 | /// The data inside the cached response
34 | final dynamic data;
35 |
36 | /// The age of the cached response
37 | ///
38 | /// This is used to determine whether the cache has expired or not
39 | /// based on the [Configs.maxCacheAge] value
40 | ///
41 | /// see [isValid]
42 | final DateTime age;
43 |
44 | /// The http status code of the cached http response
45 | final int statusCode;
46 |
47 | /// The cached http response headers
48 | final Headers headers;
49 |
50 | /// Determines if a cached response has expired
51 | ///
52 | /// A cached response is expired when its [age] is older
53 | /// than the [Configs.maxCacheAge]
54 | bool get isValid => clock.now().isBefore(age.add(Configs.maxCacheAge));
55 |
56 | /// Converts data to json Map
57 | Map toJson() {
58 | return {
59 | 'data': data,
60 | 'age': age.toString(),
61 | 'statusCode': statusCode,
62 | 'headers': headers.map,
63 | };
64 | }
65 |
66 | /// Builds a dio response from a [RequestOptions] object
67 | Response buildResponse(RequestOptions options) {
68 | return Response(
69 | data: data,
70 | headers: headers,
71 | requestOptions: options.copyWith(extra: options.extra),
72 | statusCode: statusCode,
73 | );
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/lib/core/models/paginated_response.dart:
--------------------------------------------------------------------------------
1 | /// Model representing a paginated TMDB http response
2 | class PaginatedResponse {
3 | /// Creates new instance of [PaginatedResponse]
4 | PaginatedResponse({
5 | this.page = 1,
6 | this.results = const [],
7 | this.totalPages = 1,
8 | this.totalResults = 1,
9 | });
10 |
11 | /// Creates new instance of [PaginatedResponse] parsed from raw dara
12 | factory PaginatedResponse.fromJson(
13 | Map json, {
14 | required List results,
15 | }) {
16 | return PaginatedResponse(
17 | page: json['page'] as int,
18 | results: results,
19 | totalPages: json['total_pages'] as int,
20 | totalResults: json['total_results'] as int,
21 | );
22 | }
23 |
24 | /// Page number
25 | final int page;
26 |
27 | /// List of results of the current page
28 | final List results;
29 |
30 | /// Total number of pages
31 | final int totalPages;
32 |
33 | /// Total number of results in all pages
34 | final int totalResults;
35 | }
36 |
--------------------------------------------------------------------------------
/lib/core/services/http/http_service.dart:
--------------------------------------------------------------------------------
1 | /// Http Service Interface
2 | abstract class HttpService {
3 | /// Http base url
4 | String get baseUrl;
5 |
6 | /// Http headers
7 | Map get headers;
8 |
9 | /// Http get request
10 | Future