ChangelogOverlayConfig.fromJson constructor

ChangelogOverlayConfig.fromJson(
  1. Map<String, dynamic>? json
)

Deserializes ChangelogOverlayConfig from a nullable JSON map.

Implementation

factory ChangelogOverlayConfig.fromJson(Map<String, dynamic>? json) {
  if (json == null) return const ChangelogOverlayConfig();
  return ChangelogOverlayConfig(
    title: json['title'] as String? ?? "What's New",
    subtitle: json['subtitle'] as String? ?? '',
    entryCount: (json['entryCount'] as num?)?.toInt() ?? 3,
    primaryButton: json['primaryButton'] as String? ?? 'Continue',
    closeButton: json['closeButton'] as String? ?? 'Close',
  );
}