data_binding 0.2.1

data_binding #

This is a library of Flutter for data binding works as similar as what Android does.

类Android的Flutter数据绑定库。

How to use #

  1. Create sub class of BaseViewModel with Observables.

​ 创建BaseViewModel的子类,在其中添加多个Observable

  1. Create sub class of BindingWidgetBuilder, which builds Widget with the data from a Observable.

​ 创建BindingWidgetBuilder的子类,其用某个Observable的数据来生成Widget。

  1. binding() the Observable and the BindingWidgetBuilder.

​ 用binding()绑定ObservableBindingWidgetBuilder

  1. When the property of the Observable in the ViewModel was changed, the Widget would be updated.

​ 当ViewModel中的Observableproperty被改变时,Widget也会更新。

[0.2.0] - 28/03/2019.

  • An Observable can be bound by multi widgets.

[0.1.0] - 21/03/2019.

  • With example app.

example/README.md

Example app for data_binding

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  data_binding: ^0.2.1

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:data_binding/data_binding.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
46
Learn more about scoring.

We analyzed this package on Jul 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.3

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health issues and suggestions

Document public APIs. (-1 points)

36 out of 36 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/data_binding.dart.

Run flutter format to format lib/data_binding.dart.

Maintenance suggestions

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test

Admin