├── .github
└── workflows
│ └── flutter-ci.yaml
├── .gitignore
├── .metadata
├── .vscode
└── launch.json
├── LICENSE
├── README.md
├── about
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── lib
│ ├── about.dart
│ └── about_page.dart
└── pubspec.yaml
├── analysis_options.yaml
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── dicoding
│ │ │ │ └── ditonton
│ │ │ │ └── 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
├── art
└── demo.gif
├── assets
└── user.png
├── core
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── coverage
│ └── lcov.info
├── lib
│ ├── core.dart
│ ├── presentation
│ │ ├── pages
│ │ │ ├── home_page.dart
│ │ │ └── watchlist_page.dart
│ │ └── provider
│ │ │ └── home_notifier.dart
│ ├── styles
│ │ ├── colors.dart
│ │ └── text_styles.dart
│ └── utils
│ │ ├── exception.dart
│ │ ├── failure.dart
│ │ ├── routes.dart
│ │ ├── state_enum.dart
│ │ ├── urls.dart
│ │ └── utils.dart
└── pubspec.yaml
├── coverage
└── lcov.info
├── integration_test
├── app_test.dart
└── robots
│ ├── home_robot.dart
│ ├── movie_detail_robot.dart
│ ├── popular_movies_robot.dart
│ ├── popular_tvs_robot.dart
│ ├── search_robot.dart
│ ├── top_rated_movies_robot.dart
│ ├── top_rated_tvs_robot.dart
│ ├── tv_detail_robot.dart
│ └── watchlist_robot.dart
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Podfile.lock
├── 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
├── injection.dart
└── main.dart
├── movie
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── analysis_options.yaml
├── lib
│ ├── data
│ │ ├── datasources
│ │ │ ├── db
│ │ │ │ └── movie_database_helper.dart
│ │ │ ├── movie_local_data_source.dart
│ │ │ └── movie_remote_data_source.dart
│ │ ├── models
│ │ │ ├── genre_model.dart
│ │ │ ├── media_image_model.dart
│ │ │ ├── movie_detail_response.dart
│ │ │ ├── movie_model.dart
│ │ │ ├── movie_response.dart
│ │ │ └── movie_table.dart
│ │ └── repositories
│ │ │ └── movie_repository_impl.dart
│ ├── domain
│ │ ├── entities
│ │ │ ├── genre.dart
│ │ │ ├── media_image.dart
│ │ │ ├── movie.dart
│ │ │ └── movie_detail.dart
│ │ ├── repositories
│ │ │ └── movie_repository.dart
│ │ └── usecases
│ │ │ ├── get_movie_detail.dart
│ │ │ ├── get_movie_images.dart
│ │ │ ├── get_movie_recommendations.dart
│ │ │ ├── get_movie_watchlist_status.dart
│ │ │ ├── get_now_playing_movies.dart
│ │ │ ├── get_popular_movies.dart
│ │ │ ├── get_top_rated_movies.dart
│ │ │ ├── get_watchlist_movies.dart
│ │ │ ├── remove_watchlist_movie.dart
│ │ │ └── save_watchlist_movie.dart
│ ├── movie.dart
│ └── presentation
│ │ ├── pages
│ │ ├── main_movie_page.dart
│ │ ├── movie_detail_page.dart
│ │ ├── movie_watchlist_page.dart
│ │ ├── popular_movies_page.dart
│ │ └── top_rated_movies_page.dart
│ │ ├── provider
│ │ ├── movie_detail_notifier.dart
│ │ ├── movie_images_notifier.dart
│ │ ├── movie_list_notifier.dart
│ │ ├── popular_movies_notifier.dart
│ │ ├── top_rated_movies_notifier.dart
│ │ └── watchlist_movie_notifier.dart
│ │ └── widgets
│ │ ├── horizontal_item_list.dart
│ │ ├── item_card_list.dart
│ │ ├── minimal_detail.dart
│ │ └── sub_heading.dart
├── pubspec.yaml
└── test
│ ├── data
│ ├── datasources
│ │ ├── movie_local_data_source_test.dart
│ │ └── movie_remote_data_source_test.dart
│ ├── models
│ │ ├── movie_detail_response_test.dart
│ │ ├── movie_model_test.dart
│ │ ├── movie_response_test.dart
│ │ └── movie_table_test.dart
│ └── repositories
│ │ └── movie_repository_impl_test.dart
│ ├── domain
│ └── usecases
│ │ ├── get_movie_detail_test.dart
│ │ ├── get_movie_images_test.dart
│ │ ├── get_movie_recommendations_test.dart
│ │ ├── get_movie_watchlist_status_test.dart
│ │ ├── get_now_playing_movies_test.dart
│ │ ├── get_popular_movies_test.dart
│ │ ├── get_top_rated_movies_test.dart
│ │ ├── get_watchlist_movies_test.dart
│ │ ├── remove_watchlist_movie_test.dart
│ │ └── save_watchlist_movie_test.dart
│ ├── helpers
│ ├── dummy_objects.dart
│ ├── dummy_responses
│ │ ├── images.json
│ │ ├── movie_detail.json
│ │ ├── movie_recommendations.json
│ │ ├── now_playing_movie.json
│ │ ├── popular_top_rated_movie.json
│ │ └── search_movie.json
│ ├── json_reader.dart
│ ├── test_helper.dart
│ └── test_helper.mocks.dart
│ └── presentation
│ ├── pages
│ ├── movie_detail_page_test.dart
│ ├── movie_detail_page_test.mocks.dart
│ ├── popular_movies_page_test.dart
│ ├── popular_movies_page_test.mocks.dart
│ ├── top_rated_movies_page_test.dart
│ └── top_rated_movies_page_test.mocks.dart
│ └── provider
│ ├── movie_detail_notifier_test.dart
│ ├── movie_detail_notifier_test.mocks.dart
│ ├── movie_images_notifier_test.dart
│ ├── movie_images_notifier_test.mocks.dart
│ ├── movie_list_notifier_test.dart
│ ├── movie_list_notifier_test.mocks.dart
│ ├── popular_movies_notifier_test.dart
│ ├── popular_movies_notifier_test.mocks.dart
│ ├── top_rated_movies_notifier_test.dart
│ ├── top_rated_movies_notifier_test.mocks.dart
│ ├── watchlist_movie_notifier_test.dart
│ └── watchlist_movie_notifier_test.mocks.dart
├── pubspec.lock
├── pubspec.yaml
├── search
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── coverage
│ └── lcov.info
├── lib
│ ├── domain
│ │ └── usecases
│ │ │ ├── search_movies.dart
│ │ │ └── search_tvs.dart
│ ├── presentation
│ │ ├── bloc
│ │ │ ├── search_bloc.dart
│ │ │ ├── search_event.dart
│ │ │ └── search_state.dart
│ │ └── pages
│ │ │ ├── movie_search_page.dart
│ │ │ └── tv_search_page.dart
│ └── search.dart
├── pubspec.yaml
└── test
│ ├── domain
│ └── usecases
│ │ ├── search_movie_test.dart
│ │ └── search_tv_test.dart
│ ├── helpers
│ ├── test_helper.dart
│ └── test_helper.mocks.dart
│ └── presentation
│ └── bloc
│ ├── search_bloc_test.dart
│ └── search_bloc_test.mocks.dart
└── tv
├── .gitignore
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── analysis_options.yaml
├── lib
├── data
│ ├── datasources
│ │ ├── db
│ │ │ └── tv_database_helper.dart
│ │ ├── tv_local_data_source.dart
│ │ └── tv_remote_data_source.dart
│ ├── models
│ │ ├── genre_model.dart
│ │ ├── media_image_model.dart
│ │ ├── tv_detail_response.dart
│ │ ├── tv_model.dart
│ │ ├── tv_response.dart
│ │ ├── tv_season_episode_model.dart
│ │ ├── tv_season_episode_response.dart
│ │ └── tv_table.dart
│ └── repositories
│ │ └── tv_repository_impl.dart
├── domain
│ ├── entities
│ │ ├── genre.dart
│ │ ├── media_image.dart
│ │ ├── tv.dart
│ │ ├── tv_detail.dart
│ │ └── tv_season_episode.dart
│ ├── repositories
│ │ └── tv_repository.dart
│ └── usecases
│ │ ├── get_on_the_air_tvs.dart
│ │ ├── get_popular_tvs.dart
│ │ ├── get_top_rated_tvs.dart
│ │ ├── get_tv_detail.dart
│ │ ├── get_tv_images.dart
│ │ ├── get_tv_recommendations.dart
│ │ ├── get_tv_season_episodes.dart
│ │ ├── get_tv_watchlist_status.dart
│ │ ├── get_watchlist_tvs.dart
│ │ ├── remove_watchlist_tv.dart
│ │ └── save_watchlist_tv.dart
├── presentation
│ ├── pages
│ │ ├── main_tv_page.dart
│ │ ├── popular_tvs_page.dart
│ │ ├── top_rated_tvs_page.dart
│ │ ├── tv_detail_page.dart
│ │ └── tv_watchlist_page.dart
│ ├── provider
│ │ ├── popular_tvs_notifier.dart
│ │ ├── top_rated_tvs_notifier.dart
│ │ ├── tv_detail_notifier.dart
│ │ ├── tv_images_notifier.dart
│ │ ├── tv_list_notifier.dart
│ │ ├── tv_season_episodes_notifier.dart
│ │ └── watchlist_tv_provider.dart
│ └── widgets
│ │ ├── horizontal_item_list.dart
│ │ ├── item_card_list.dart
│ │ ├── minimal_detail.dart
│ │ └── sub_heading.dart
└── tv.dart
├── pubspec.yaml
└── test
├── data
├── datasources
│ ├── tv_local_data_source_test.dart
│ └── tv_remote_data_source_test.dart
├── models
│ ├── tv_detail_response_test.dart
│ ├── tv_model_test.dart
│ ├── tv_response_model_test.dart
│ ├── tv_season_episode_model_test.dart
│ └── tv_season_episodes_model_test.dart
└── repositories
│ └── tv_repository_impl_test.dart
├── domain
└── usecases
│ ├── get_on_the_air_tvs_test.dart
│ ├── get_popular_tvs_test.dart
│ ├── get_top_rated_tvs_test.dart
│ ├── get_tv_detail_test.dart
│ ├── get_tv_episodes_test.dart
│ ├── get_tv_images_test.dart
│ ├── get_tv_recommendations_test.dart
│ ├── get_tv_watchlist_status_test.dart
│ ├── get_watchlist_tvs_test.dart
│ ├── remove_watchlist_tv_test.dart
│ └── save_watchlist_tv_test.dart
├── helpers
├── dummy_objects.dart
├── dummy_responses
│ ├── images.json
│ ├── search_tv.json
│ ├── tv.json
│ ├── tv_detail.json
│ ├── tv_recommendations.json
│ └── tv_season.json
├── json_reader.dart
├── test_helper.dart
└── test_helper.mocks.dart
└── presentation
├── pages
├── popular_tvs_page_test.dart
├── popular_tvs_page_test.mocks.dart
├── top_rated_tvs_page_test.dart
├── top_rated_tvs_page_test.mocks.dart
├── tv_detail_page_test.dart
└── tv_detail_page_test.mocks.dart
└── provider
├── popular_tvs_notifier_test.dart
├── popular_tvs_notifier_test.mocks.dart
├── top_rated_tvs_notifier_test.dart
├── top_rated_tvs_notifier_test.mocks.dart
├── tv_detail_notifier_test.dart
├── tv_detail_notifier_test.mocks.dart
├── tv_images_notifier_test.dart
├── tv_images_notifier_test.mocks.dart
├── tv_list_notifier_test.dart
├── tv_list_notifier_test.mocks.dart
├── tv_season_episodes_notifier_test.dart
├── tv_season_episodes_notifier_test.mocks.dart
├── watchlist_tv_notifier_test.dart
└── watchlist_tv_notifier_test.mocks.dart
/.github/workflows/flutter-ci.yaml:
--------------------------------------------------------------------------------
1 | name: Flutter CI
2 |
3 | # This workflow is triggered on pushes or pull requests to the repository
4 |
5 | on:
6 | push:
7 | branches:
8 | - main
9 |
10 | pull_request:
11 | branches:
12 | - main
13 |
14 | # Allows you to run this workflow manually from the Actions tab
15 | workflow_dispatch:
16 |
17 | jobs:
18 | build:
19 | # This job will run on ubuntu virtual machine
20 | runs-on: ubuntu-latest
21 |
22 | steps:
23 | - uses: actions/checkout@v2
24 |
25 | # Setup the flutter environtment
26 | - name: Install and set Flutter version
27 | uses: subosito/flutter-action@v2
28 | with:
29 | channel: 'stable'
30 |
31 | # Get flutter dependencies
32 | - name: Restore packages
33 | run: flutter pub get
34 |
35 | # Check for any formatting issue in the code
36 | - name: Check formatting issue
37 | run: flutter format --set-exit-if-changed .
38 |
39 | # Statically analyze the Dart code for any errors.
40 | - name: Analyze
41 | run: flutter analyze .
42 |
43 | # Run widget tests on movie module.
44 | - name: Run tests on movie module
45 | working-directory: ./movie
46 | run: flutter test --coverage
47 |
48 | # Run widget tests on tv module.
49 | - name: Run tests on tv module
50 | working-directory: ./tv
51 | run: flutter test --coverage
52 |
53 | # Run widget tests on search module.
54 | - name: Run tests on search module
55 | working-directory: ./search
56 | run: flutter test --coverage
57 |
58 | # Upload coverage to codecov
59 | - name: Upload coverage to codecov
60 | uses: codecov/codecov-action@v2.1.0
61 | with:
62 | token: ${{secrets.CODECOV_TOKEN}}
63 | file: ./coverage/lcov.info
64 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | # Android Studio will place build artifacts here
44 | /android/app/debug
45 | /android/app/profile
46 | /android/app/release
47 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: b22742018b3edf16c6cadd7b76d9db5e7f9064b5
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to learn about possible attributes.
3 | // Hover to view descriptions of existing attributes.
4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "flutter-movie-database-app",
9 | "request": "launch",
10 | "type": "dart"
11 | },
12 | {
13 | "name": "flutter-movie-database-app (profile mode)",
14 | "request": "launch",
15 | "type": "dart",
16 | "flutterMode": "profile"
17 | },
18 | {
19 | "name": "about",
20 | "cwd": "about",
21 | "request": "launch",
22 | "type": "dart"
23 | },
24 | {
25 | "name": "about (profile mode)",
26 | "cwd": "about",
27 | "request": "launch",
28 | "type": "dart",
29 | "flutterMode": "profile"
30 | },
31 | {
32 | "name": "core",
33 | "cwd": "core",
34 | "request": "launch",
35 | "type": "dart"
36 | },
37 | {
38 | "name": "core (profile mode)",
39 | "cwd": "core",
40 | "request": "launch",
41 | "type": "dart",
42 | "flutterMode": "profile"
43 | },
44 | {
45 | "name": "search",
46 | "cwd": "search",
47 | "request": "launch",
48 | "type": "dart"
49 | },
50 | {
51 | "name": "search (profile mode)",
52 | "cwd": "search",
53 | "request": "launch",
54 | "type": "dart",
55 | "flutterMode": "profile"
56 | }
57 | ]
58 | }
--------------------------------------------------------------------------------
/about/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
25 | /pubspec.lock
26 | **/doc/api/
27 | .dart_tool/
28 | .packages
29 | build/
30 |
--------------------------------------------------------------------------------
/about/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b
8 | channel: stable
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/about/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | * TODO: Describe initial release.
4 |
--------------------------------------------------------------------------------
/about/LICENSE:
--------------------------------------------------------------------------------
1 | TODO: Add your license here.
2 |
--------------------------------------------------------------------------------
/about/README.md:
--------------------------------------------------------------------------------
1 |
13 |
14 | TODO: Put a short description of the package here that helps potential users
15 | know whether this package might be useful for them.
16 |
17 | ## Features
18 |
19 | TODO: List what your package can do. Maybe include images, gifs, or videos.
20 |
21 | ## Getting started
22 |
23 | TODO: List prerequisites and provide or point to information on how to
24 | start using the package.
25 |
26 | ## Usage
27 |
28 | TODO: Include short and useful examples for package users. Add longer examples
29 | to `/example` folder.
30 |
31 | ```dart
32 | const like = 'sample';
33 | ```
34 |
35 | ## Additional information
36 |
37 | TODO: Tell users more about the package: where to find more information, how to
38 | contribute to the package, how to file issues, what response they can expect
39 | from the package authors, and more.
40 |
--------------------------------------------------------------------------------
/about/lib/about.dart:
--------------------------------------------------------------------------------
1 | library about;
2 |
3 | export 'about_page.dart';
4 |
--------------------------------------------------------------------------------
/about/lib/about_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:core/core.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class AboutPage extends StatelessWidget {
5 | static const routeName = '/about';
6 |
7 | const AboutPage({Key? key}) : super(key: key);
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | return Scaffold(
12 | appBar: AppBar(
13 | title: const Text('About'),
14 | ),
15 | body: Stack(
16 | children: [
17 | Column(
18 | children: [
19 | Expanded(
20 | child: Container(
21 | color: kRichBlack,
22 | child: const Center(
23 | child: Text(
24 | 'MDB',
25 | style: TextStyle(
26 | fontSize: 64.0,
27 | fontWeight: FontWeight.bold,
28 | color: Colors.redAccent,
29 | ),
30 | ),
31 | ),
32 | ),
33 | ),
34 | Expanded(
35 | child: Container(
36 | padding: const EdgeInsets.all(32.0),
37 | color: kRichBlack,
38 | child: const Text(
39 | 'Movie Database (MDB) is a movie and tv series catalog app developed by Aditya Rohman sebagai as a project submission for Flutter Developer Expert course on Dicoding Indonesia.',
40 | style: TextStyle(fontSize: 16.0),
41 | textAlign: TextAlign.justify,
42 | ),
43 | ),
44 | ),
45 | ],
46 | ),
47 | ],
48 | ),
49 | );
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/about/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: about
2 | description: A new Flutter package project.
3 | version: 0.0.1
4 | homepage:
5 |
6 | environment:
7 | sdk: ">=2.15.1 <3.0.0"
8 | flutter: ">=1.17.0"
9 |
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 |
14 | dev_dependencies:
15 | core:
16 | path: ../core
17 | flutter_lints: ^1.0.4
18 | flutter_test:
19 | sdk: flutter
20 |
21 | flutter:
22 |
23 | # To add assets to your package, add an assets section, like this:
24 | # assets:
25 | # - images/a_dot_burr.jpeg
26 | # - images/a_dot_ham.jpeg
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # This file configures the analyzer, which statically analyzes Dart code to
2 | # check for errors, warnings, and lints.
3 | #
4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6 | # invoked from the command line by running `flutter analyze`.
7 |
8 | # The following line activates a set of recommended lints for Flutter apps,
9 | # packages, and plugins designed to encourage good coding practices.
10 | include: package:flutter_lints/flutter.yaml
11 |
12 | linter:
13 | # The lint rules applied to this project can be customized in the
14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml`
15 | # included above or to enable additional rules. A list of all available lints
16 | # and their documentation is published at
17 | # https://dart-lang.github.io/linter/lints/index.html.
18 | #
19 | # Instead of disabling a lint rule for the entire project in the
20 | # section below, it can also be suppressed for a single line of code
21 | # or a specific dart file by using the `// ignore: name_of_lint` and
22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file
23 | # producing the lint.
24 | rules:
25 | avoid_print: false
26 | prefer_relative_imports: true
27 | directives_ordering: true
28 | prefer_single_quotes: true
29 |
30 | # Additional information about this file can be found at
31 | # https://dart.dev/guides/language/analysis-options
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 30
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | defaultConfig {
36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37 | applicationId "com.dicoding.ditonton"
38 | minSdkVersion 16
39 | targetSdkVersion 30
40 | versionCode flutterVersionCode.toInteger()
41 | versionName flutterVersionName
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
59 | }
60 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/dicoding/ditonton/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.dicoding.ditonton
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/codestronautHub/flutter-movie-database-app/9fd42b87e3ccc50e334997f2715d30bfc605c76a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codestronautHub/flutter-movie-database-app/9fd42b87e3ccc50e334997f2715d30bfc605c76a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codestronautHub/flutter-movie-database-app/9fd42b87e3ccc50e334997f2715d30bfc605c76a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codestronautHub/flutter-movie-database-app/9fd42b87e3ccc50e334997f2715d30bfc605c76a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codestronautHub/flutter-movie-database-app/9fd42b87e3ccc50e334997f2715d30bfc605c76a/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 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:4.1.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/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-6.7-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 |
--------------------------------------------------------------------------------
/art/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codestronautHub/flutter-movie-database-app/9fd42b87e3ccc50e334997f2715d30bfc605c76a/art/demo.gif
--------------------------------------------------------------------------------
/assets/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/codestronautHub/flutter-movie-database-app/9fd42b87e3ccc50e334997f2715d30bfc605c76a/assets/user.png
--------------------------------------------------------------------------------
/core/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
25 | /pubspec.lock
26 | **/doc/api/
27 | .dart_tool/
28 | .packages
29 | build/
30 |
--------------------------------------------------------------------------------
/core/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 77d935af4db863f6abd0b9c31c7e6df2a13de57b
8 | channel: stable
9 |
10 | project_type: package
11 |
--------------------------------------------------------------------------------
/core/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 0.0.1
2 |
3 | * TODO: Describe initial release.
4 |
--------------------------------------------------------------------------------
/core/LICENSE:
--------------------------------------------------------------------------------
1 | TODO: Add your license here.
2 |
--------------------------------------------------------------------------------
/core/README.md:
--------------------------------------------------------------------------------
1 |
13 |
14 | TODO: Put a short description of the package here that helps potential users
15 | know whether this package might be useful for them.
16 |
17 | ## Features
18 |
19 | TODO: List what your package can do. Maybe include images, gifs, or videos.
20 |
21 | ## Getting started
22 |
23 | TODO: List prerequisites and provide or point to information on how to
24 | start using the package.
25 |
26 | ## Usage
27 |
28 | TODO: Include short and useful examples for package users. Add longer examples
29 | to `/example` folder.
30 |
31 | ```dart
32 | const like = 'sample';
33 | ```
34 |
35 | ## Additional information
36 |
37 | TODO: Tell users more about the package: where to find more information, how to
38 | contribute to the package, how to file issues, what response they can expect
39 | from the package authors, and more.
40 |
--------------------------------------------------------------------------------
/core/lib/core.dart:
--------------------------------------------------------------------------------
1 | library core;
2 |
3 | export 'styles/colors.dart';
4 | export 'styles/text_styles.dart';
5 | export 'utils/exception.dart';
6 | export 'utils/failure.dart';
7 | export 'utils/state_enum.dart';
8 | export 'utils/urls.dart';
9 | export 'utils/utils.dart';
10 |
--------------------------------------------------------------------------------
/core/lib/presentation/provider/home_notifier.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../../core.dart';
3 |
4 | class HomeNotifier extends ChangeNotifier {
5 | GeneralContentType _state = GeneralContentType.movie;
6 |
7 | GeneralContentType get state => _state;
8 |
9 | void setState(GeneralContentType newState) {
10 | _state = newState;
11 | notifyListeners();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/core/lib/styles/colors.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | const Color kRichBlack = Color(0xFF1E1E29);
4 | const Color kSpaceGrey = Color(0xFF26262F);
5 | const Color kOxfordBlue = Color(0xFF001D3D);
6 |
7 | const kColorScheme = ColorScheme(
8 | primary: Colors.redAccent,
9 | primaryContainer: Colors.redAccent,
10 | secondary: kSpaceGrey,
11 | secondaryContainer: kSpaceGrey,
12 | surface: kRichBlack,
13 | background: kRichBlack,
14 | error: Colors.redAccent,
15 | onPrimary: kRichBlack,
16 | onSecondary: Colors.white,
17 | onSurface: Colors.white,
18 | onBackground: Colors.white,
19 | onError: Colors.white,
20 | brightness: Brightness.dark,
21 | );
22 |
--------------------------------------------------------------------------------
/core/lib/styles/text_styles.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:google_fonts/google_fonts.dart';
3 |
4 | final TextStyle kHeading5 =
5 | GoogleFonts.poppins(fontSize: 23, fontWeight: FontWeight.w400);
6 | final TextStyle kHeading6 = GoogleFonts.poppins(
7 | fontSize: 19, fontWeight: FontWeight.w500, letterSpacing: 0.15);
8 | final TextStyle kSubtitle = GoogleFonts.poppins(
9 | fontSize: 15, fontWeight: FontWeight.w400, letterSpacing: 0.15);
10 | final TextStyle kBodyText = GoogleFonts.poppins(
11 | fontSize: 13, fontWeight: FontWeight.w400, letterSpacing: 0.25);
12 |
13 | final kTextTheme = TextTheme(
14 | headline5: kHeading5,
15 | headline6: kHeading6,
16 | subtitle1: kSubtitle,
17 | bodyText2: kBodyText,
18 | );
19 |
--------------------------------------------------------------------------------
/core/lib/utils/exception.dart:
--------------------------------------------------------------------------------
1 | class ServerException implements Exception {}
2 |
3 | class DatabaseException implements Exception {
4 | final String message;
5 | DatabaseException(this.message);
6 | }
7 |
--------------------------------------------------------------------------------
/core/lib/utils/failure.dart:
--------------------------------------------------------------------------------
1 | import 'package:equatable/equatable.dart';
2 |
3 | abstract class Failure extends Equatable {
4 | final String message;
5 | const Failure(this.message);
6 |
7 | @override
8 | List