initialize method
Try to initialize by checking conditions Returns true if already initialized or successfully initialized now
Implementation
bool initialize() {
bool retValue = false;
__.in_('initialize');
try {
if (_initialized) {
return true;
}
if (checkInitializationConditions()) {
_initialized = true;
__.info('$runtimeType initialized successfully');
retValue = true;
}
} catch (e, stackTrace) {
__.severe('Initialization failed for $runtimeType', e, stackTrace);
retValue = false;
} finally {
__.out_('initialize');
}
return retValue;
}