TCICFontConfig class

字体配置模型

Inheritance

Constructors

TCICFontConfig({String? fontFamily, String? fontPath, String? fontUrl, bool enableCustomFont = false, Map<FontWeight, String>? fontWeights, Map<FontStyle, String>? fontStyles})

Properties

enableCustomFont bool
是否启用自定义字体
final
fontFamily String?
字体族名称
final
fontPath String?
字体文件路径(相对于assets目录)
final
fontStyles Map<FontStyle, String>?
字体样式配置
final
fontUrl String?
字体文件URL(网络字体)
final
fontWeights Map<FontWeight, String>?
字体权重配置
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromFontFamily(String fontFamily) TCICFontConfig
从字体族名称创建配置
fromFontPath(String fontFamily, String fontPath) TCICFontConfig
从字体文件路径创建配置
fromFontUrl(String fontFamily, String fontUrl) TCICFontConfig
从字体URL创建配置
fromJson(Map<String, dynamic> json) TCICFontConfig
override
getDefault() TCICFontConfig
创建默认字体配置