fromMap static method

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

Gets a possible IOSNSAttributedString instance from a Map value.

Implementation

static IOSNSAttributedString? fromMap(Map<String, dynamic>? map) {
  if (map == null) {
    return null;
  }
  final instance = IOSNSAttributedString(
    backgroundColor: map['backgroundColor'] != null
        ? UtilColor.fromStringRepresentation(map['backgroundColor'])
        : null,
    baselineOffset: map['baselineOffset'],
    expansion: map['expansion'],
    foregroundColor: map['foregroundColor'] != null
        ? UtilColor.fromStringRepresentation(map['foregroundColor'])
        : null,
    kern: map['kern'],
    ligature: map['ligature'],
    obliqueness: map['obliqueness'],
    strikethroughColor: map['strikethroughColor'] != null
        ? UtilColor.fromStringRepresentation(map['strikethroughColor'])
        : null,
    strikethroughStyle:
        IOSNSUnderlineStyle.fromNativeValue(map['strikethroughStyle']),
    string: map['string'],
    strokeColor: map['strokeColor'] != null
        ? UtilColor.fromStringRepresentation(map['strokeColor'])
        : null,
    strokeWidth: map['strokeWidth'],
    textEffect: IOSNSAttributedStringTextEffectStyle.fromNativeValue(
        map['textEffect']),
    underlineColor: map['underlineColor'] != null
        ? UtilColor.fromStringRepresentation(map['underlineColor'])
        : null,
    underlineStyle:
        IOSNSUnderlineStyle.fromNativeValue(map['underlineStyle']),
  );
  return instance;
}