Browse Source

neon: improve typesafety of AppsBloc.getAppBloc

pull/384/head
Nikolas Rimikis 2 years ago
parent
commit
f6d379ce4e
No known key found for this signature in database
GPG Key ID: 85ED1DE9786A4FF2
  1. 3
      packages/neon/neon/lib/src/blocs/apps.dart

3
packages/neon/neon/lib/src/blocs/apps.dart

@ -138,7 +138,8 @@ class AppsBloc extends InteractiveBloc implements AppsBlocEvents, AppsBlocStates
}
}
T getAppBloc<T extends Bloc>(final AppImplementation appImplementation) => appImplementation.getBloc(_account) as T;
T getAppBloc<T extends Bloc>(final AppImplementation<T, dynamic> appImplementation) =>
appImplementation.getBloc(_account);
List<Provider> get appBlocProviders =>
_allAppImplementations.map((final appImplementation) => appImplementation.blocProvider).toList();

Loading…
Cancel
Save