Line data Source code
1 : import 'package:get/src/typedefs/typedefs.dart'; 2 : import '../get_main.dart'; 3 : import 'get_instance.dart'; 4 : 5 : extension Inst 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, 11 : {String tag, bool permanent = false}) async => 12 2 : GetInstance().putAsync<S>(builder, tag: tag, permanent: permanent); 13 : 14 5 : S find<S>({String tag, FcBuilderFunc<S> instance}) => 15 10 : GetInstance().find<S>(tag: tag, instance: instance); 16 : 17 2 : S put<S>(S dependency, 18 : {String tag, 19 : bool permanent = false, 20 : bool overrideAbstract = false, 21 : FcBuilderFunc<S> builder}) => 22 4 : GetInstance().put<S>(dependency, 23 : tag: tag, 24 : permanent: permanent, 25 : overrideAbstract: overrideAbstract, 26 : builder: builder); 27 : 28 1 : bool reset({bool clearFactory = true, bool clearRouteBindings = true}) => 29 2 : GetInstance().reset( 30 : clearFactory: clearFactory, clearRouteBindings: clearRouteBindings); 31 : 32 : /// Delete class instance on [S] and clean memory 33 0 : Future<bool> delete<S>({String tag, String key}) async => 34 0 : GetInstance().delete<S>(tag: tag, key: key); 35 : 36 0 : bool isRegistred<S>({String tag}) => GetInstance().isRegistred<S>(tag: tag); 37 : }