FontHelper class

Constructors

FontHelper()

Properties

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
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

getAlignment(String text) Alignment
统一左侧对齐布局
getAppropriateFont({required String text, required TextStyle? baseStyle}) TextStyle
直接返回固定字体样式,不做语言检测
getCrossAxisAlignment(String text) CrossAxisAlignment
getEffectiveDirection(String text, BuildContext context) TextDirection
直接返回应用当前方向(通常是LTR)
getInputDecorationWithRTL(InputDecoration baseDecoration, String text, BuildContext context) InputDecoration
getTextAlign(String text) TextAlign
统一左对齐
getTextDirection(String text) TextDirection
统一返回 LTR
isRTL(String text) bool