initialize static method
Implementation
static Future<FontInitStatus> initialize() {
if (_initCompleter.isCompleted && _initStatus == FontInitStatus.success) {
return Future.value(FontInitStatus.alreadyInitialized);
}
if (!_initializing) {
_initializing = true;
initFont().then(
(value) {
_initStatus = value ? FontInitStatus.success : FontInitStatus.failed;
_initCompleter.complete(_initStatus);
_initializing = false;
},
);
}
return _initCompleter.future;
}