call method
Implementation
@override
Object? call(Interpreter interpreter, List<Object?> arguments,
Map<Symbol, Object?> namedArguments) {
AlignmentGeometry begin = Alignment.centerLeft;
AlignmentGeometry end = Alignment.centerRight;
var beginParsed = namedArguments[const Symbol('begin')];
if (beginParsed != null) {
begin = beginParsed as AlignmentGeometry;
}
var endParsed = namedArguments[const Symbol('end')];
if (endParsed != null) {
end = endParsed as AlignmentGeometry;
}
List<Color> colors = [];
var colorsParsed = namedArguments[const Symbol('colors')];
if (colorsParsed != null) {
colors = (colorsParsed as List).cast<Color>();
}
List<double>? stops;
var stopsParsed = namedArguments[const Symbol('stops')];
if (stopsParsed != null) {
stops = (stopsParsed as List).cast<double>();
}
TileMode tileMode = TileMode.clamp;
var tileModeParsed = namedArguments[const Symbol('tileMode')];
if (tileModeParsed != null) {
tileMode = tileModeParsed as TileMode;
}
return LinearGradient(
begin: begin,
end: end,
colors: colors,
stops: stops,
tileMode: tileMode);
}