AnnouncementBannerConfiguration.fromJson constructor

AnnouncementBannerConfiguration.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory AnnouncementBannerConfiguration.fromJson(Map<String, Object?> json) {
  return AnnouncementBannerConfiguration(
    hashId: json[r'hashId'] as String?,
    isDismissible: json[r'isDismissible'] as bool? ?? false,
    isEnabled: json[r'isEnabled'] as bool? ?? false,
    message: json[r'message'] as String?,
    visibility: json[r'visibility'] != null
        ? AnnouncementBannerConfigurationVisibility.fromValue(
            json[r'visibility']! as String)
        : null,
  );
}