Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
android
ios
lib
.gitignore
.metadata
README.md
pubspec.yaml

README.md

Flutter-View Tools Example

Screenshot

This app shows you by example how you may use the Assign, Lifecycle, and ReactiveWidget classes.

It is a simple screen that lets you enter a text, and as you type, updates the same text on the screen.

  • It demonstrates the reactive tag and ReactiveWidget by using it to update the text on the screen by monitoring the model
  • It demonstrates the assign tag and widget by assigning the text controller to the ctl parameter
  • It demonstrates the lifecycle tag and widget by using it to call methods to init and dispose of a listener for the text controller

The most important files to check are:

  • example-model.dart: This contains the state of the app. Since it extends the Model class, it can call notifyListeners() to inform any listeners that it has changed. This allows the ReactiveWidget in the ExamplePage to watch it, and rerender whenever the example model has changed.
  • main.dart: The startpoint of the app. It creates the ExampleApp and its _ExampleAppState. The _ExampleAppState creates and holds the ExampleModel, and for the home it uses the ExamplePage, passing the model for rendering.
  • example-page.pug: The template for the home page of the example app. In this file you see each flutter-view tag being used, with some explanation in the comments.
  • example-page.dart: This is the generated Dart code from example-page.pug, after having been processed by the flutter-view console tool.

See the project page for more information on this project and flutter-view.

You can’t perform that action at this time.