flow 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 9


Functional listener/observable widgets (FLOWs). Propagate your state changes using stream controller broadcasts.

Getting Started #

import 'package:flutter/material.dart';
import 'package:flow/flow.dart';

final Map flows = {
  'tapCount': FLOW().stream(0),

final FLOW myHomePage = FLOW(
  ctl: flows['tapCount'],
  cnd: (val) => val % 2 == 0,
  builder: ({ctx, val}) => Scaffold(
    appBar: AppBar(
      title: Text(
        val == 0
          ? 'Hello world!'
          : 'The tap count is EVEN ($val)',
    body: Center(
      child: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: <Widget>[
            ctl: flows['tapCount'],
            builder: ({ val, ctx }) => Text(
              val == 0
                ? 'Press the plus button to begin!'
                : 'Total Taps: $val',
    floatingActionButton: FloatingActionButton(
      onPressed: () {
        flows['tapCount'].current(flows['tapCount'].val + 1);
      tooltip: 'Increment',
      child: Icon(Icons.add),

final FLOW myApp = FLOW(
  builder: ({ctx, val}) => MaterialApp(
    title: 'FLOW Demo',
    theme: ThemeData(
      primarySwatch: Colors.blue,
    home: myHomePage,

void main() => runApp(myApp);

[0.1.0] - Initial release.

  • Initial release of FLOW.


test_flow #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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

  flow: ^0.1.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or 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:flow/flow.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

This package is not analyzed, because it is discontinued.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0