subx 1.0.2 copy "subx: ^1.0.2" to clipboard
subx: ^1.0.2 copied to clipboard

outdated

RxDart Subscriptions management. Provide Apis to store and manage RxDart subscriptions and provide methods to unsubscribe them all.

example/example.dart

import 'package:subx/subx.dart';

void main() async {
  final subxList = SubxList();
  final source = Stream.periodic(Duration(milliseconds: 500), (counter) {
    return ++counter;
  });

  final source2 = Stream.periodic(Duration(seconds: 1), (counter) {
    return ++counter;
  });

  final subscription = source.listen(
    (data) => print('Subscription1: $data'),
  );

  final subscription2 = source2.listen(
    (data) => print('Subscription2: $data'),
  );

  subxList.add(subscription);
  subxList.add(subscription2);

  await Future.delayed(Duration(seconds: 2), () {
    return subxList.cancelAll();
  });
}
0
likes
0
pub points
4%
popularity

Publisher

unverified uploader

RxDart Subscriptions management. Provide Apis to store and manage RxDart subscriptions and provide methods to unsubscribe them all.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

async

More

Packages that depend on subx