toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => <String, dynamic>{
      'font_weight': editableCellFontWeight.keys.firstWhere(
          (key) => editableCellFontWeight[key] == fontWeight,
          orElse: () => 'normal'),
      'font_size': fontSize,
      'font_color': colorToHexString(fontColor),
      'background_color': colorToHexString(backgroundColor),
      'horizontal_alignment': editableHorizontalAlignment.keys.firstWhere(
          (key) => editableHorizontalAlignment[key] == horizontalAlignment,
          orElse: () => 'top-left'),
      'vertical_alignment': editableCellVerticalAlignment.keys.firstWhere(
          (key) => editableCellVerticalAlignment[key] == verticalAlignment,
          orElse: () => 'start'),
      'text_align': editableCellTextAlign.keys.firstWhere(
          (element) => editableCellTextAlign[element] == textAlign,
          orElse: () => 'left'),
    };