withCustomStyle method

KTypography withCustomStyle(
  1. String key,
  2. TextStyle style
)

添加或更新自定义文本样式

Implementation

KTypography withCustomStyle(String key, TextStyle style) {
  final newCustomStyles = Map<String, TextStyle>.from(customStyles);
  newCustomStyles[key] = style;
  return copyWith(customStyles: newCustomStyles);
}