call method
Implementation
@override
Object? call(Interpreter interpreter, List<Object?> arguments,
Map<Symbol, Object?> namedArguments) {
double? fontSize;
var sizeParsed = namedArguments[const Symbol('fontSize')];
fontSize = parseDouble(sizeParsed);
Color? color;
var colorParsed = namedArguments[const Symbol('color')];
if (colorParsed != null) {
color = colorParsed as Color;
}
Color? backgroundColor;
var backgroundColorParsed = namedArguments[const Symbol('backgroundColor')];
if (backgroundColorParsed != null) {
backgroundColor = backgroundColorParsed as Color;
}
FontWeight? fontWeight;
var fontWeightParsed = namedArguments[const Symbol('fontWeight')];
if (fontWeightParsed != null) {
fontWeight = fontWeightParsed as FontWeight;
}
FontStyle? fontStyle;
var fontStyleParsed = namedArguments[const Symbol('fontStyle')];
if (fontStyleParsed != null) {
fontStyle = fontStyleParsed as FontStyle;
}
double? letterSpacing =
parseDouble(namedArguments[const Symbol('letterSpacing')]);
double? wordSpacing =
parseDouble(namedArguments[const Symbol('wordSpacing')]);
double? height = parseDouble(namedArguments[const Symbol('height')]);
double? decorationThickness =
parseDouble(namedArguments[const Symbol('decorationThickness')]);
TextOverflow? overflow;
var overflowParsed = namedArguments[const Symbol('overflow')];
if (overflowParsed != null) {
overflow = overflowParsed as TextOverflow;
}
TextDecorationStyle? decorationStyle;
var decorationStyleParsed = namedArguments[const Symbol('decorationStyle')];
if (decorationStyleParsed != null) {
decorationStyle = decorationStyleParsed as TextDecorationStyle;
}
TextDecoration? decoration;
var decorationParsed = namedArguments[const Symbol('decoration')];
if (decorationParsed != null) {
decoration = decorationParsed as TextDecoration;
}
TextBaseline? textBaseline;
var textBaselineParsed = namedArguments[const Symbol('textBaseline')];
if (textBaselineParsed != null) {
textBaseline = textBaselineParsed as TextBaseline;
}
List<Shadow>? shadows;
var shadowsParsed = namedArguments[const Symbol('shadows')];
if (shadowsParsed != null) {
shadows = (shadowsParsed as List).cast<Shadow>();
}
Color? decorationColor;
var decorationColorParsed = namedArguments[const Symbol('decorationColor')];
if (decorationColorParsed != null) {
decorationColor = decorationColorParsed as Color;
}
return TextStyle(
backgroundColor: backgroundColor,
fontWeight: fontWeight,
fontSize: fontSize,
height: height,
shadows: shadows,
textBaseline: textBaseline,
decorationColor: decorationColor,
decorationThickness: decorationThickness,
letterSpacing: letterSpacing,
overflow: overflow,
decoration: decoration,
decorationStyle: decorationStyle,
wordSpacing: wordSpacing,
fontStyle: fontStyle,
color: color);
}