Showing
3 changed files
with
15 additions
and
1 deletions
@@ -473,6 +473,17 @@ class GetInstance { | @@ -473,6 +473,17 @@ class GetInstance { | ||
473 | return; | 473 | return; |
474 | } | 474 | } |
475 | 475 | ||
476 | + final i = builder.dependency; | ||
477 | + | ||
478 | + if (i is GetxServiceMixin && !force) { | ||
479 | + return; | ||
480 | + } | ||
481 | + | ||
482 | + if (i is GetLifeCycleBase) { | ||
483 | + i.onDelete(); | ||
484 | + Get.log('"$newKey" onDelete() called'); | ||
485 | + } | ||
486 | + | ||
476 | builder.dependency = null; | 487 | builder.dependency = null; |
477 | builder.isInit = false; | 488 | builder.isInit = false; |
478 | Get.log('Instance "$newKey" was restarted.'); | 489 | Get.log('Instance "$newKey" was restarted.'); |
1 | name: get | 1 | name: get |
2 | description: Open screens/snackbars/dialogs without context, manage states and inject dependencies easily with GetX. | 2 | description: Open screens/snackbars/dialogs without context, manage states and inject dependencies easily with GetX. |
3 | -version: 4.2.3 | 3 | +version: 4.2.4 |
4 | homepage: https://github.com/jonataslaw/getx | 4 | homepage: https://github.com/jonataslaw/getx |
5 | 5 | ||
6 | environment: | 6 | environment: |
-
Please register or login to post a comment