flutter_eyepetizer

  • Google Flutter is an eye-opening video App based on Google Flutter.

background

It has been almost 18 months since Google officially launched the first Flutter Beta at Mobile World Congress in February 2018, and the stable version 1.0 was released at Flutter Live 2018 in December 2018. The number of Stars and forks of Flutter on Github has also soared. It can be said that Flutter, the product of Google, has gained popularity among many developers, not only because of its halo, but also because of its many advantages.

As a small developer who is not lonely, I also decided to enter the pit and began to learn Flutter in July last year. Kotlin + MVP + Flutter, which allows you to integrate Flutter and use it in your own projects. The response was good, but there were a lot of inadequacies.

After a long time, I also shelved my study plan of FLUTTER due to my work change and some personal reasons. During this period, my work and life gradually stabilized, and I continued to study flutter. So there is today’s hero of the video – The Implementation of Flutter. As a matter of fact, the whole App does not have any complicated things at present. Basically, flutter widgets are used. The design style of FLUTTER follows the MD specification, so it is very suitable for beginners to learn.

Scan code to download

  • Scan the qr code below and download it. Installation password: 123456.

Currently implemented functions

  • Home Page Daily Highlights
  • Discovery page – Recommended attention, hot categories
  • Popular – Weekly ranking, monthly ranking, total ranking
  • Mine (currently static page, later to improve)
  • Search page
  • Hot list
  • Hot Category List
  • The video details
  • Author Details Page

instructions

The project is purely personal hobby and write, API are from open eye video, source code for learning communication only.

Project screenshots

  • gif

Operation mode

  • See the branch
If the current branch is not beta, switch to the beta branch, Flutter Channel betaCopy the code
  • Switching branches will automatically update you to the latest version. If the branch is in the beta branch, run the following command to check if additional dependencies need to be installed
flutter doctor
Copy the code
  • Run to start the
Flutter Packages get /// Ensure that devices are connected to flutter RUNCopy the code

What can you learn?

  • Most of the basic controls, such as Text, Image, Icon, Scaffold, ListView, GridView, CustomScrollView, Container, Padding, Expanded, Column, Row…
  • Pull-down refresh and pull-up load.
  • Layout typesetting, the above control will be used, layout typesetting is very simple, the principle: first up after down, first left after right.
  • The introduction of tripartite library, the introduction of pictures.
  • Responses to user interaction events.
  • Page jump, normal jump, with reference jump.
  • Json parsing. FlutterJsonBeanFactory is a plugin for FlutterJsonBeanFactory
  • Use of HTTP requests. For DIO, a little simple encapsulation is done, the code is as follows:
// execute the get request staticdoGet(
    String url, {
    queryParameters,
    options,
    Function success,
    Function fail,
  }) async {
    print('http request url: $url');
    try {
      Response response = await buildDio().get(
        url,
        queryParameters: queryParameters,
        options: _options,
      );
      success(response);
      print('http response: $response');
    } catch (exception) {
      fail(exception);
      print('http request fail: $url --- $exception'); }}Copy the code

Tripartite library used

  • Dio’s powerful Http request library.
  • Cached_network_image a more flexible framework for loading images.
  • Fluttertoast toast.
  • Flustars common utility class.
  • Device_info Flutter plugin.
  • Flutter_ijkplayer Plays the video.
  • Flutter_easyrefresh Pull-down refresh and pull-up load.
  • Shimmer sparkles hahaha.
  • Provider is a very useful state management framework that will make your code much cleaner.

Version update

  • – 2019.09.27 1.0.4
1. Invalid video playback on some pages is resolved. 2. UI display of author details page was optimized, and author information display was added.Copy the code
  • 1.0.3-2019.09.14
1. Change the system search bar style. 2. Optimized the UI rendering effect of some pages. 3. Some bug fixes.Copy the code
  • 1.0.2-2019.09.06
1. Code optimization, Provider application and simple encapsulation. 2. Change the pull-down refresh and pull-up loading style. 3. View state optimization during loading.Copy the code
  • – 2019.08.30 1.0.1
Author details page completeCopy the code
  • 1.0.0-2019.08.23
Basic functions completedCopy the code

The follow-up plan

There will be new features added, more optimizations to address the weaknesses of the current project.

  • Optimize UI experience effect and increase error page display.
  • Provider encapsulation optimization.
  • Screen adaptation, very necessary!
  • Hybrid development with Native is on the agenda.

The last

Attached is flutter_eyepetizer.

If you like technology and Flutter like me, you can follow this project and get a STAR. In my spare time, I update as soon as possible.