Showing
1 changed file
with
0 additions
and
37 deletions
lib/src/extension_instance.dart
deleted
100644 → 0
1 | -import 'get_instance.dart'; | ||
2 | -import 'get_main.dart'; | ||
3 | -import 'typedefs/typedefs.dart'; | ||
4 | - | ||
5 | -extension Storage on GetImpl { | ||
6 | - void lazyPut<S>(FcBuilderFunc builder, {String tag}) { | ||
7 | - return GetInstance().lazyPut<S>(builder, tag: tag); | ||
8 | - } | ||
9 | - | ||
10 | - Future<S> putAsync<S>(FcBuilderFuncAsync<S> builder, | ||
11 | - {String tag, bool permanent = false}) async => | ||
12 | - GetInstance().putAsync<S>(builder, tag: tag, permanent: permanent); | ||
13 | - | ||
14 | - S find<S>({String tag, FcBuilderFunc<S> instance}) => | ||
15 | - GetInstance().find<S>(tag: tag, instance: instance); | ||
16 | - | ||
17 | - S put<S>(S dependency, | ||
18 | - {String tag, | ||
19 | - bool permanent = false, | ||
20 | - bool overrideAbstract = false, | ||
21 | - FcBuilderFunc<S> builder}) => | ||
22 | - GetInstance().put<S>(dependency, | ||
23 | - tag: tag, | ||
24 | - permanent: permanent, | ||
25 | - overrideAbstract: overrideAbstract, | ||
26 | - builder: builder); | ||
27 | - | ||
28 | - bool reset({bool clearFactory = true, bool clearRouteBindings = true}) => | ||
29 | - GetInstance().reset( | ||
30 | - clearFactory: clearFactory, clearRouteBindings: clearRouteBindings); | ||
31 | - | ||
32 | - /// Delete class instance on [S] and clean memory | ||
33 | - Future<bool> delete<S>({String tag, String key}) async => | ||
34 | - GetInstance().delete<S>(tag: tag, key: key); | ||
35 | - | ||
36 | - bool isRegistred<S>({String tag}) => GetInstance().isRegistred<S>(tag: tag); | ||
37 | -} |
-
Please register or login to post a comment