Nicolas Lopez

Some extras generics

@@ -104,7 +104,7 @@ extension ExtensionSnackbar on GetInterface { @@ -104,7 +104,7 @@ extension ExtensionSnackbar on GetInterface {
104 return key?.currentState?.push(SnackRoute<T>(snack: snackbar)); 104 return key?.currentState?.push(SnackRoute<T>(snack: snackbar));
105 } 105 }
106 106
107 - void snackbar( 107 + void snackbar<T>(
108 String title, 108 String title,
109 String message, { 109 String message, {
110 Color colorText, 110 Color colorText,
@@ -199,11 +199,11 @@ extension ExtensionSnackbar on GetInterface { @@ -199,11 +199,11 @@ extension ExtensionSnackbar on GetInterface {
199 userInputForm: userInputForm); 199 userInputForm: userInputForm);
200 200
201 if (instantInit) { 201 if (instantInit) {
202 - showSnackbar(getBar); 202 + showSnackbar<T>(getBar);
203 } else { 203 } else {
204 routing.isSnackbar = true; 204 routing.isSnackbar = true;
205 SchedulerBinding.instance.addPostFrameCallback((_) { 205 SchedulerBinding.instance.addPostFrameCallback((_) {
206 - showSnackbar(getBar); 206 + showSnackbar<T>(getBar);
207 }); 207 });
208 } 208 }
209 } 209 }
@@ -484,7 +484,7 @@ extension GetNavigation on GetInterface { @@ -484,7 +484,7 @@ extension GetNavigation on GetInterface {
484 if (preventDuplicates && routeName == currentRoute) { 484 if (preventDuplicates && routeName == currentRoute) {
485 return null; 485 return null;
486 } 486 }
487 - return global(id)?.currentState?.push( 487 + return global(id)?.currentState?.push<T>(
488 GetPageRoute<T>( 488 GetPageRoute<T>(
489 opaque: opaque ?? true, 489 opaque: opaque ?? true,
490 page: () => page, 490 page: () => page,
@@ -690,7 +690,7 @@ extension GetNavigation on GetInterface { @@ -690,7 +690,7 @@ extension GetNavigation on GetInterface {
690 dynamic arguments, 690 dynamic arguments,
691 int id, 691 int id,
692 }) { 692 }) {
693 - return global(id)?.currentState?.pushNamedAndRemoveUntil( 693 + return global(id)?.currentState?.pushNamedAndRemoveUntil<T>(
694 newRouteName, 694 newRouteName,
695 predicate ?? (_) => false, 695 predicate ?? (_) => false,
696 arguments: arguments, 696 arguments: arguments,
@@ -730,7 +730,7 @@ extension GetNavigation on GetInterface { @@ -730,7 +730,7 @@ extension GetNavigation on GetInterface {
730 } 730 }
731 if (canPop) { 731 if (canPop) {
732 if (global(id)?.currentState?.canPop() == true) { 732 if (global(id)?.currentState?.canPop() == true) {
733 - global(id)?.currentState?.pop(result); 733 + global(id)?.currentState?.pop<T>(result);
734 } 734 }
735 } else { 735 } else {
736 global(id)?.currentState?.pop<T>(result); 736 global(id)?.currentState?.pop<T>(result);
@@ -855,7 +855,7 @@ extension GetNavigation on GetInterface { @@ -855,7 +855,7 @@ extension GetNavigation on GetInterface {
855 var routeName = "/${page.runtimeType.toString()}"; 855 var routeName = "/${page.runtimeType.toString()}";
856 856
857 return global(id)?.currentState?.pushAndRemoveUntil<T>( 857 return global(id)?.currentState?.pushAndRemoveUntil<T>(
858 - GetPageRoute( 858 + GetPageRoute<T>(
859 opaque: opaque ?? true, 859 opaque: opaque ?? true,
860 popGesture: popGesture ?? defaultPopGesture, 860 popGesture: popGesture ?? defaultPopGesture,
861 page: () => page, 861 page: () => page,