Flutter Study Notes and integration

1.Dart

  Object-oriented language, learning and java analogy

  Ideal for mobile and Web applications

  1.dart official website

  2.Dark2 Chinese Documents

  3.Dart grammar learning

  4. Geeks College Dart learning

  Getting Started with Dart 5.Flutter

2.Flutter

  Tree layout, and all are components

  1.flutter document

  2. Chinese community resources

  2.flutter Chinese Documentation (update lag)

  3.flutter learning portal:

    http://jspang.com/archives/

    https://juejin.im/user/59ed44cf6fb9a0451c398c45/posts

  4.flutter upgrade:

    https://segmentfault.com/u/yuwanhenshu/articles?sort=created

    flutter learning and climb pit: https://www.jianshu.com/nb/26101414

    https://github.com/CarGuo/GSYGithubAppFlutter

 3. Hang climb

  1.listview nested listview

    Listview need to develop sub-height, use shrinkWrap: true content adaptation height;

    Sliding type setting: physics: new NeverScrollableScrollPhysics (), prohibits sub-module drop-down list Sliding refresh

    https://blog.csdn.net/hao_m582/article/details/84112278#ListView_1

  2.SimpleDialog

    Specify the width and height

  3. retransmit countdown codes implemented

    Timer.periodic implemented under use of async packet dart

    https://www.jianshu.com/p/f7a9b8c84d26

  4. The micro-channel sharing widget

    Register APPID

    https://pub.dartlang.org/packages/sy_flutter_wechat

  5. Save the image to the photo library

    https://pub.dartlang.org/packages/image_picker_saver

  6. The screen overflow

    Level overflow:

      For images, dynamic text data, you need to do the calculation constraints on the width of the container vessel, fit different sizes of mobile phone

     constraints: BoxConstraints(maxWidth: _descWidth), 

      Gets the screen width

     MediaQuery.of(context).size.width 

    Vertical Overflow:

      Will not slide to the bottom of the page overflow SingleChildScrollView use package, it slides perpendicular to avoid overflow

  7.Dialogs, alerts

    flutter shot in the window is the equivalent of a page, a new context

  8. page parameter passing

    Method 1: Navigator

    flutter child-parent pages mass participation, in terms of the relative front-end is very simple, because the dart is object-oriented language, you can have a reference mass participation in the navigation structure

    Use Navigatorcomponent, then routing MaterialPageRoutetransmission parameters

    "Father to son, son," the father

   final result = await Navigator.push(
        context,
        MaterialPageRoute(
          builder: (context) => new OtherPage(param: param),
        ));
Navigator.pop (context, '$ result'); // xxx parameter is returned

    Second way: an event listener by value

    使用eventBus,  import 'package:event_bus/event_bus.dart'; 

    1 Create an event

class OnTapEvent {
  Map data;
  OnTapEvent (this.data);
}

    2 issues an event eventBus.fire (new OnTapEvent ()); 

    3 monitor events

eventBus.on<OnTapReportEvent>()
        .listen((OnTapEvent data) {
      //EVERYTHING
    });

  9. The mobile platform launch URL

    Open the default browser, or jump to other pages

    https://pub.dartlang.org/packages/url_launcher#-readme-tab-

  10. The top, bottom TabBar control

    https://juejin.im/post/5b685a2a5188251ac22b71c0

  11.LocalStorage

    Persisted to the phone

    https://pub.dartlang.org/packages/shared_preferences

  12.dio is a strong Dart Http request library that supports Restful API, FormData, interceptors, request cancellation, Cookie management, file upload / download, overtime and other ...

    https://github.com/flutterchina/dio/blob/flutter/README-ZH.md

  13. Upgrade flutter SDK

    https://flutter.io/docs/development/tools/sdk/upgrading

Published 449 original articles · won praise 2 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_37769323/article/details/104706274