addStyle method

List<String> addStyle(
  1. String? style
)

Add inline style to the block

Implementation

List<String> addStyle(String? style) {
  var copiedStyles = (jsonDecode(jsonEncode(this.inlineStyles)) as List)
      .map((e) => e as String)
      .toList();
  if (style != null) {
    return copiedStyles..add(style);
  } else {
    return copiedStyles;
  }
}