get static method
TextStyle
get({
- required dynamic nodeState,
- required BuildContext context,
- required FFill fill,
- required String fontFamily,
- required FFontSize fontSize,
- required FFontWeight fontWeight,
- required FTextDecoration textDecoration,
- required FFontStyle fontStyle,
- required FGeneralTypeInput letterSpacing,
- required FGeneralTypeInput lineSpacing,
- TextStyleEntity? model,
Returns the current TextStyle object
Implementation
static TextStyle get({
required final WidgetState nodeState,
required final BuildContext context,
required final FFill fill,
required final String fontFamily,
required final FFontSize fontSize,
required final FFontWeight fontWeight,
required final FTextDecoration textDecoration,
required final FFontStyle fontStyle,
required final FGeneralTypeInput letterSpacing,
required final FGeneralTypeInput lineSpacing,
final TextStyleEntity? model,
}) {
final letterSpacing0 = double.tryParse(
letterSpacing.get(
context: context,
loop: 0,
),
);
final lineHeight = double.tryParse(
lineSpacing.get(
context: context,
loop: 0,
),
);
final color = fill.getColor(
context,
nodeState.loop,
);
if (model != null) {
final textStyle = getTextStyleFromName(context, model.name);
return textStyle.copyWith(
fontFamily: fontFamily,
color: color,
);
}
return getTextStyle(
fontFamily,
fontSize.get(
context,
),
fontWeight.get,
color,
textDecoration.textDecoration,
fontStyle.value,
lineHeight,
letterSpacing0,
);
}