Browse Source

Merge pull request #384 from Leptopoda/cleanup/type_inference

neon: improve typesafety of AppsBloc.getAppBloc
pull/386/head
Nikolas Rimikis 2 years ago committed by GitHub
parent
commit
7fce1f8529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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 => List<Provider> get appBlocProviders =>
_allAppImplementations.map((final appImplementation) => appImplementation.blocProvider).toList(); _allAppImplementations.map((final appImplementation) => appImplementation.blocProvider).toList();

Loading…
Cancel
Save