fromJson static method

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

Implementation

static WebDomainException? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return WebDomainException(
    url: (json['url'] as String?) ?? '',
    domain: (json['domain'] as String?) ?? '',
    title: (json['title'] as String?) ?? '',
    faviconCustomEmojiId: (json['favicon_custom_emoji_id'] is int
            ? json['favicon_custom_emoji_id'] as int
            : int.tryParse(
                json['favicon_custom_emoji_id']?.toString() ?? '')) ??
        0,
  );
}