bloc_dispose_scope

Creator: coderz1093

Last updated:

0 purchases

bloc_dispose_scope Image
bloc_dispose_scope Images

Languages

Categories

Add to Cart

Description:

bloc dispose scope

bloc_dispose_scope #
This package adds support for bloc related types to dispose_scope package.
Usage #
import 'package:bloc_dispose_scope/bloc_dispose_scope.dart';

class MainCubit extends Cubit<String> with BlocBaseDisposeScopeMixin {
MainCubit(this._dependencyCubit) : super('') {
// StreamSubscription will be cancelled when MainCubit is closed
_dependencyCubit.stream
.listen(_onDependencyCubitStateChanged)
.disposedBy(scope);
}

final DependencyCubit _dependencyCubit;

void _onDependencyCubitStateChanged(String dependencyState) {}
}
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.