TextTrackStyle.fromMap constructor

TextTrackStyle.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory TextTrackStyle.fromMap(Map<String, dynamic> map) {
  return TextTrackStyle(
    backgroundColor: map['backgroundColor'] != null
        ? HColor.fromHex(map['backgroundColor'])
        : null,
    customData: Map<String, dynamic>.from(map['customData']),
    edgeColor:
        map['edgeColor'] != null ? HColor.fromHex(map['edgeColor']) : null,
    edgeType: map['edgeType'] != null
        ? TextTrackStyle.fromMap(map['edgeType'])
        : null,
    fontFamily: map['fontFamily'],
    fontGenericFamily: map['fontGenericFamily'] != null
        ? TextTrackFontGenericFamily.fromMap(map['fontGenericFamily'])
        : null,
    fontScale: map['fontScale']?.toInt(),
    fontStyle: map['fontStyle'] != null
        ? TextTrackFontStyle.fromMap(map['fontStyle'])
        : null,
    foregroundColor: map['foregroundColor'] != null
        ? HColor.fromHex(map['foregroundColor'])
        : null,
    windowColor: map['windowColor'] != null
        ? HColor.fromHex(map['windowColor'])
        : null,
    windowRoundedCornerRadius: map['windowRoundedCornerRadius']?.toDouble(),
    windowType: map['windowType'] != null
        ? TextTrackWindowType.fromMap(map['windowType'])
        : null,
  );
}