easy_dispose_rxdart

Creator: coderz1093

Last updated:

0 purchases

easy_dispose_rxdart Image
easy_dispose_rxdart Images

Languages

Categories

Add to Cart

Description:

easy dispose rxdart

Add disposable feature to rxdart classes.
Read easy_dispose documentation for details.
You can find all available extensions in easy_dispose repository.
Supported features #

SubjectDisposable

Example #
import 'dart:async';

import 'package:easy_dispose/easy_dispose.dart';
import 'package:rxdart/rxdart.dart';

// ignore_for_file: no-empty-block, avoid_print
Future main() async {
final myDisposableOwner = MyDisposableOwner();

// do something

await myDisposableOwner.dispose();
}

class MyDisposableOwner extends DisposableOwner {
final Subject subject = BehaviorSubject();

MyDisposableOwner()
: super(
disposeOrder: DisposeOrder.lifo,
) {
addCustomDisposable(() => print('Final dispose'));
subject.disposeWith(this);

subject.stream
.listen(
(_) {},
)
.disposeWith(this);
addCustomDisposable(() => print('First dispose'));
}
}


copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.