The React version Mung
The React – Native version Mung
Flutter version Mung
Mung-Flutter
The project address
1. Mung-flutter: this project is based on Flutter and developed using douban open source API.
2. Function Overview
- Startup page: The startup page was added to prevent a blank screen from being displayed at the beginning of entry.
- Data saving: Load cached data when the network is disconnected.
- Theme skin: only theme color can be changed now, there are few pictures in this project.
- View movie details: Supports viewing movie details including comments.
- One click search: Supports tags and statements to find related movies.
- View stills: Zoom in and out.
-
3.1 Dynamic Demo (Android)
3.2 Running result diagram
4. The framework used
- Flutter_swiper: indicates the image rotation effect of the Banner bar.
- Rxdart: Similar to Rxjava, RxJs, and RxSwift, its BehaviorSubject and Bloc mode are mainly used to implement state management.
- Shared_preferences: Simple data storage, more detailed data storage such as lists, or recommended to use the database.
- Dio: Realize network request, a very good tripartite network package, very many functions, if you are just getting started or the project is more urgent recommended use this.
- Flutter _spinkit: the loading component of the flutter is displayed when it is loaded.
- Photo_view: Image zooming component, because Android photoView is just selected, using a simple function, no problem found.
5. Project global status management
Now as far as I know, there are mature state management.
-
- [InheritedWidget] [All the other built-in third parties seem to be built on it, but wrapped around it to make it more convenient]
-
- Scoped_model: Good.
-
- Redux is the same thing as front-end redux, but I’ve written a demo and used it in my personal opinion: far from it.
-
- Bloc :(Business Logic Component) proposed by paolo soares and cong hui in the 2018 Google dartconf, it is actually a pattern InheritedWidget+stream.
Bloc was used in this project.
6. Think about
The first flutter of this development had all the mainstream frameworks that the project should use just right, because the project was too small for getting started and rapid development. Personal feelings about flutter.
-
- Last month I read a message that the Flutter team will not release hot updates this year. It seems that due to security and implementability considerations, the Build mode of Flutter will be the Kernel Snapshot mode in development and AOT mode in production.
-
- Flutter seems to have launched a Web and desktop adaptation last month, which should help flutter a lot.
-
- I have been using the React-Native development project for more than a year. I feel that Flutter has more components than RN, and they are much more compatible and refined. However, the nested mode is really ugly and messy.
-
- Currently, there is no absolutely good state management function. Some projects use Bloc or Bloc + Redux, but I think there will be a good state management function occupying the absolute address in the near future, just like RN’s Redux and MOBx.
-
- There are very few component lifecycle functions, especially when developing large projects. RN is less than the native Android lifecycle, and you have to add global listeners to manage the lifecycle, even less flutter.
-
- There are a lot of comparison articles on the Internet, and I also feel that the performance of FLUTTER is very good when I use it personally. This is a problem with the principle of reality, especially the list, which is much better than fRN, and there are many animations, etc. The custom components have not been seen, so I don’t make comments.
-
- Community, there is no doubt that THE RN community will be more advantageous than Flutter for this time period, and RN supports hot updates for native additions (RN, Flutter). There are already many RNS for triad components, and many open source projects.
7. Suggest
The 2019-5-12 or so douban, turn off the open source API now USES the address of the other developers, project Baser_url pulled out is, later I can change myself now project is using https://douban.uieee.com/v2, can run normally.
8. Download address
- The android version
- Ios version (no enterprise account -😊)