autoSubscribe method
Implementation
Future autoSubscribe(
String name, LifecycleCallback<StreamSubscription> generate) async {
onStartup(() async {
final subscribe = await generate();
onDestroy(name, () async {
await subscribe.cancel();
});
});
}