Line data Source code
1 : import 'get_instance.dart'; 2 : import 'get_main.dart'; 3 : import 'typedefs.dart'; 4 : 5 : extension Storage on GetImpl { 6 3 : void lazyPut<S>(FcBuilderFunc builder, {String tag}) { 7 6 : return GetInstance().lazyPut<S>(builder, tag: tag); 8 : } 9 : 10 1 : Future<S> putAsync<S>(FcBuilderFuncAsync<S> builder, {String tag}) async => 11 2 : GetInstance().putAsync<S>(builder, tag: tag); 12 : 13 5 : S find<S>({String tag, FcBuilderFunc<S> instance}) => 14 10 : GetInstance().find<S>(tag: tag, instance: instance); 15 : 16 2 : S put<S>(S dependency, 17 : {String tag, 18 : bool permanent = false, 19 : bool overrideAbstract = false, 20 : FcBuilderFunc<S> builder}) => 21 4 : GetInstance().put<S>(dependency, 22 : tag: tag, 23 : permanent: permanent, 24 : overrideAbstract: overrideAbstract, 25 : builder: builder); 26 : 27 1 : bool reset({bool clearFactory = true, bool clearRouteBindings = true}) => 28 2 : GetInstance().reset( 29 : clearFactory: clearFactory, clearRouteBindings: clearRouteBindings); 30 : }