fancy_stream 4.0.0+14 copy "fancy_stream: ^4.0.0+14" to clipboard
fancy_stream: ^4.0.0+14 copied to clipboard

A sophisticated way to use streams, make it even easier to use.

example/example.dart

import 'package:fancy_stream/fancy_stream.dart';
import 'package:fancy_stream/src/fancy_imp.dart';

class Example {
  void main(List<String> args) {
    Fancy fancy = FancyImp();
    //listen something on String, with key = "print"
    fancy.listenOn<String>(printWhenDispatchedValue, key: "print");
    fancy.dispatchOn<String>("Print that!", key: "print");

    fancy.listenOn<String>(printWhenDispatchedValue);
    fancy.dispatchOn<String>("Print that without key!");

    final values = fancy.map;
    printWhenDispatchedValue(values.toString());

    ///Clean all Subjects, Subscrtiption and instances generated
    fancy.dispose();
  }

  void printWhenDispatchedValue(String value) {
    print(value);
  }
}
7
likes
100
pub points
18%
popularity

Publisher

unverified uploader

A sophisticated way to use streams, make it even easier to use.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

get_it, rxdart

More

Packages that depend on fancy_stream