load method Null safety

AnnouncementLoginData? load()

Implementation

static AnnouncementLoginData? load() {
  final String? rawString = Preferences.getStringSecurity(
    '${ApConstants.packageName}'
        '.announcement_login_data',
    '',
  );
  if (rawString == '') {
    return null;
  } else {
    return AnnouncementLoginData.fromRawJson(rawString!);
  }
}