rxservice 0.6.0 copy "rxservice: ^0.6.0" to clipboard
rxservice: ^0.6.0 copied to clipboard

discontinuedreplaced by: rxs

A simple reactive service library for Dart and Flutter. Use with StreamBuilder for Flutter apps.

example/rxservice_example.dart

import "package:rxservice/rxservice.dart";

import "src/counter.dart";

void counterApp(CounterService counter) {
  // Implementation details…

  // Print the updated value to stdout.
  Injector.inject(() => CounterService()).$.listen(print);
}

void main() {
  /*
    Assume that the mock function below initializes an actual CLI/TUI program
    that allows you to modify the value of a counter and that the initializer
    accepts a parameter of the type CounterService so that it may be tested with
    a mock counter, otherwise normal operations.
   */
  counterApp(
    Injector.inject(() => CounterService()),
  );
}
1
likes
150
points
36
downloads

Publisher

unverified uploader

Weekly Downloads

A simple reactive service library for Dart and Flutter. Use with StreamBuilder for Flutter apps.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

rxs

More

Packages that depend on rxservice