UEpubTypography.fromJson constructor

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

Implementation

factory UEpubTypography.fromJson(Map<String, Object?> json) => UEpubTypography(
  fontScale: (json["fontScale"] as num?)?.toDouble() ?? 1,
  lineHeight: (json["lineHeight"] as num?)?.toDouble() ?? 1.6,
  fontFamily: json["fontFamily"] as String?,
  horizontalMargin: (json["horizontalMargin"] as num?)?.toDouble() ?? 20,
  verticalMargin: (json["verticalMargin"] as num?)?.toDouble() ?? 16,
  justify: json["justify"] as bool? ?? true,
  paragraphSpacing: (json["paragraphSpacing"] as num?)?.toDouble() ?? 8,
  letterSpacing: (json["letterSpacing"] as num?)?.toDouble() ?? 0,
  wordSpacing: (json["wordSpacing"] as num?)?.toDouble() ?? 0,
  hyphenate: json["hyphenate"] as bool? ?? false,
);