style method

dynamic style({
  1. StarXpandStyleAlignment? alignment,
  2. StarXpandStyleFontType? fontType,
  3. bool? bold,
  4. bool? invert,
  5. bool? underLine,
  6. StarXpandStyleMagnification? magnification,
  7. double? characterSpace,
  8. double? lineSpace,
  9. double? horizontalPositionTo,
  10. double? horizontalPositionBy,
  11. List<int>? horizontalTabPosition,
  12. StarXpandStyleInternationalCharacter? internationalCharacter,
  13. StarXpandStyleCharacterEncodingType? secondPriorityCharacterEncoding,
  14. List<StarXpandStyleCjkCharacterType>? cjkCharacterPriority,
})

Implementation

style({
  StarXpandStyleAlignment? alignment,
  StarXpandStyleFontType? fontType,
  bool? bold,
  bool? invert,
  bool? underLine,
  StarXpandStyleMagnification? magnification,
  double? characterSpace,
  double? lineSpace,
  double? horizontalPositionTo,
  double? horizontalPositionBy,
  List<int>? horizontalTabPosition,
  StarXpandStyleInternationalCharacter? internationalCharacter,
  StarXpandStyleCharacterEncodingType? secondPriorityCharacterEncoding,
  List<StarXpandStyleCjkCharacterType>? cjkCharacterPriority,
}) {
  _actions.add({
    'action': 'style',
    'alignment': alignment?.name,
    'fontType': fontType?.name,
    'bold': bold,
    'invert': invert,
    'underLine': underLine,
    'magnification': magnification?.toMap(),
    'characterSpace': characterSpace,
    'lineSpace': lineSpace,
    'horizontalPositionTo': horizontalPositionTo,
    'horizontalPositionBy': horizontalPositionBy,
    'horizontalTabPosition': horizontalTabPosition,
    'internationalCharacter': internationalCharacter?.name,
    'secondPriorityCharacterEncoding': secondPriorityCharacterEncoding?.name,
    'cjkCharacterPriority': cjkCharacterPriority?.map((e) => e.name).toList()
  }..trim());
}