get static method

TextStyle get({
  1. required dynamic nodeState,
  2. required BuildContext context,
  3. required FFill fill,
  4. required String fontFamily,
  5. required FFontSize fontSize,
  6. required FFontWeight fontWeight,
  7. required FTextDecoration textDecoration,
  8. required FFontStyle fontStyle,
  9. required FGeneralTypeInput letterSpacing,
  10. required FGeneralTypeInput lineSpacing,
  11. 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,
  );
}