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

discontinuedreplaced by: rxs
outdated

A simple reactive service library for Dart and Flutter. Use in conjuction with get_it and StreamBuilder for a complete state management solution.

example/rxservice_example.dart

import "package:get_it/get_it.dart";

import "src/counter.dart";

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

  // Print the updated value to stdout.
  GetIt.I<CounterService>().$.listen(print);
}

void main() {
  GetIt.I.registerSingleton(CounterService());

  /*
    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(GetIt.I<CounterService>());
}
1
likes
0
points
8
downloads

Publisher

unverified uploader

Weekly Downloads

A simple reactive service library for Dart and Flutter. Use in conjuction with get_it and StreamBuilder for a complete state management solution.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

rxdart

More

Packages that depend on rxservice