action_box 0.0.50 icon indicating copy to clipboard operation
action_box: ^0.0.50 copied to clipboard

This package isolates business logic so that it can be reused.

A library for Dart developers.

Usage #

A simple usage example:

import 'package:action_box/action_box.dart';
//add generated file
import 'example.a.b.dart';

@ActionBoxConfig(
    //actionBoxType: 'ActionBox',
    //actionRootType: 'ActionRoot',
    generateSourceDir: ['*']
)
final actionBox = ActionBox.shared();

void howToUse() async {
  var bag = DisposeBag();
  //receive result
  actionBox((r) => r.valueConverter.getStringToListValue)
    .map()
    .listen((result) {
    result?.forEach((v) => print(v));
  }).disposedBy(bag);

  //request data
  actionBox((r) => r.valueConverter.getStringToListValue)
    .go(param: 'action box test!');

  await Future.delayed(Duration(seconds: 10));
  //call dispose method when completed
  bag.dispose();
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

2
likes
120
pub points
0%
popularity

Publisher

unverified uploader

This package isolates business logic so that it can be reused.

Repository (GitHub)

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

More

Packages that depend on action_box