invoke method
Implementation
T? invoke({
required bool isUseStatic,
required T? Function() onData,
}) {
try {
if (isUseStatic) {
if (isInitialized) {
return data;
}
data = onData();
isInitialized = true;
return data;
}
return onData();
} catch (e) {
return null;
}
}