ZMoviesFlutter
is an example app that built with Flutter.
It uses TheMovieDB Api as data source to show Movie List and Detail.
The main purpose is to show how to make a real world app using Flutter,start with design the data flow and architecture.
- iOS
13.0 - Android
minSdkVersion:24.0
targetSdkVersion: 30.0 - Flutter
2.8.1
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-arm, locale ja)
[!] Android toolchain - develop for Android devices (Android SDK version 32.0.0-rc1)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.63.2)
It is a MVVM-like architecture.
Here are some basic principles for editing each layer:
- UI
- draw ui
- control ui data & business logic
- GLobal Service
- handle global event. eg.local settings update.
- handle data converting (JSON<->Model).
- store global data.
- Data Source and Native Function
- do specific job. eg.networking,local storage.
- communicate with native source
No. | Folder | Sub Folder | Detail |
---|---|---|---|
1 | lib | ui/screen | draw UI for each screen |
2 | ui/widget | draw UI widgets(for reusing) | |
3 | ui/controller | control data & business logic for each screen | |
4 | data | datasource/remote | network api |
5 | datasource/local | local storage | |
6 | service | global service | |
7 | exception | customized exception | |
8 | extension | extensions | |
9 | getx | customized subclass of GetX. | |
10 | util | tool classes/functions |
No. | Package | Version | Licence | Detail | Link |
---|---|---|---|---|---|
1 | get | 4.6.1 | MIT | for UI statement managing and dependencies managing | |
2 | freezed_annotation | 1.1.0 | MIT | for model defination | |
3 | dio | 4.0.4 | MIT | for networking | |
4 | retrofit | 3.0.1 | MIT | for networking(generate IF) | |
5 | shared_preferences | 2.0.12 | BSD-3-Clause | for local storage | |
6 | cached_network_image | 3.2.0 | MIT | UI widget |
No. | Package | Version | Licence | Detail | Link |
---|---|---|---|---|---|
1 | mockito | 5.0.17 | Apache2.0 | for unit testing | -- |
2 | flutter_lints | 1.0.0 | BSD-3-Clause | code style | -- |
3 | lints | 1.0.1 | BSD-3-Clause | code style | -- |
4 | freezed | 1.1.1 | MIT | for generating model class | -- |
5 | build_runner | 2.1.7 | BSD-3-Clause | for source generating | -- |
6 | retrofit_generator | 4.0.1 | MIT | for api IF generating | -- |
7 | json_serializable | 6.1.4 | BSD-3-Clause | for Json<->Model mapping | -- |
8 | flutter_launcher_icons | 0.9.2 | MIT | for launcher icon generating | -- |
9 | flutter_gen_runner | 4.1.5 | MIT | for assets generating | -- |
- Built more screens
- Add some native functions
- Add some 3rd party services
These repos are referenced when building this app.