doIfControllerRegister<T> method
void
doIfControllerRegister<T>({
- String tag = '',
- dynamic doIfRegister(
- T controller
- dynamic doIfUnRegister()?,
Implementation
void doIfControllerRegister<T>(
{String tag = '',
Function(T controller)? doIfRegister,
Function()? doIfUnRegister}) {
if (Get.isRegistered<T>(tag: tag)) {
doIfRegister?.call(Get.find<T>(tag: tag));
} else {
doIfUnRegister?.call();
}
}