maybe property

LocaleService? get maybe

Safe to call from a call site that may run before/without this service registered (e.g. widget tests), matching every other service in this codebase (AudioManager.maybe, CrashReporter.maybe, ...).

Implementation

static LocaleService? get maybe =>
    Get.isRegistered<LocaleService>() ? Get.find<LocaleService>() : null;