LabelTextStyle.fromMap constructor

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

Implementation

factory LabelTextStyle.fromMap(Map<String, dynamic> map) {
  return LabelTextStyle(
    posX: map['posX'],
    posY: map['posY'],
    textSize: map['textSize'],
    textWidthRatio: map['textWidthRatio'],
    textHeightRatio: map['textHeightRatio'],
    width: map['width'],
    height: map['height'],
    align: AlignLabel.values.firstWhere((e) => e.toString() == 'AlignLabel.${map['align']}'),
    rotate: Rotate.values.firstWhere((e) => e.toString() == 'Rotate.${map['rotate']}'),
    textSpace: map['textSpace'],
    enableBold: map['enableBold'],
    enableUnderline: map['enableUnderline'],
    enableStrikethrough: map['enableStrikethrough'],
    enableItalics: map['enableItalics'],
    enAntiColor: map['enAntiColor'],
  );
}