call method
Implementation
@override
Object call(Interpreter interpreter, List<Object?> arguments,
Map<Symbol, Object?> namedArguments) {
var context = namedArguments[const Symbol('context')];
if (context == null) {
throw "context required in showModalBottomSheet";
}
var builder = namedArguments[const Symbol('builder')];
if (builder == null) {
throw "builder required in showModalBottomSheet";
}
Color? backgroundColor;
var backgroundColorParsed = namedArguments[const Symbol('backgroundColor')];
if (backgroundColorParsed != null) {
backgroundColor = backgroundColorParsed as Color;
}
double? elevation = parseDouble(namedArguments[const Symbol('elevation')]);
Color? barrierColor;
var barrierColorParsed = namedArguments[const Symbol('barrierColor')];
if (barrierColorParsed != null) {
barrierColor = barrierColorParsed as Color;
}
bool isDismissible = true;
var isDismissibleParsed = namedArguments[const Symbol('isDismissible')];
if (isDismissibleParsed != null) {
isDismissible = isDismissibleParsed as bool;
}
ShapeBorder? shape;
var shapeParsed = namedArguments[const Symbol('shape')];
if (shapeParsed != null) {
shape = shapeParsed as ShapeBorder;
}
BoxConstraints? constraints;
var constraintsParsed = namedArguments[const Symbol('constraints')];
if (constraintsParsed != null) {
constraints = constraintsParsed as BoxConstraints;
}
return showModalBottomSheet(
context: context as BuildContext,
backgroundColor: backgroundColor,
barrierColor: barrierColor,
isDismissible: isDismissible,
elevation: elevation,
constraints: constraints,
shape: shape,
builder: (context) {
return (builder as LoxFunction).call(interpreter, [context], {})
as Widget;
});
}