call method
Implementation
@override
Object? call(Interpreter interpreter, List<Object?> arguments,
Map<Symbol, Object?> namedArguments) {
Widget? leading;
var leadingParsed = namedArguments[const Symbol('leading')];
if (leadingParsed != null) {
leading = leadingParsed as Widget;
}
Widget? title;
var titleParsed = namedArguments[const Symbol('title')];
if (titleParsed != null) {
title = titleParsed as Widget;
}
Widget? subtitle;
var subtitleParsed = namedArguments[const Symbol('subtitle')];
if (subtitleParsed != null) {
subtitle = subtitleParsed as Widget;
}
Widget? trailing;
var trailingParsed = namedArguments[const Symbol('trailing')];
if (trailingParsed != null) {
trailing = trailingParsed as Widget;
}
bool? dense;
var denseParsed = namedArguments[const Symbol('dense')];
if (denseParsed != null) {
dense = denseParsed as bool;
}
bool selected = false;
var selectedParsed = namedArguments[const Symbol('selected')];
if (selectedParsed != null) {
selected = selectedParsed as bool;
}
Function()? onTap;
var onTapParsed = namedArguments[const Symbol('onTap')];
if (onTapParsed != null) {
onTap = () {
(onTapParsed as LoxFunction).call(interpreter, [], {});
};
}
Function()? onLongPress;
var onLongPressParsed = namedArguments[const Symbol('onLongPress')];
if (onLongPressParsed != null) {
onLongPress = () {
(onLongPressParsed as LoxFunction).call(interpreter, [], {});
};
}
EdgeInsetsGeometry? contentPadding;
var contentPaddingParsed = namedArguments[const Symbol('contentPadding')];
if (contentPaddingParsed != null) {
contentPadding = contentPaddingParsed as EdgeInsetsGeometry;
}
bool isThreeLine = false;
var isThreeLineParsed = namedArguments[const Symbol('isThreeLine')];
if (isThreeLineParsed != null) {
isThreeLine = isThreeLineParsed as bool;
}
ShapeBorder? shape;
var shapeParsed = namedArguments[const Symbol('shape')];
if (shapeParsed != null) {
shape = shapeParsed as ShapeBorder;
}
bool enabled = true;
var enabledParsed = namedArguments[const Symbol('enabled')];
if (enabledParsed != null) {
enabled = enabledParsed as bool;
}
bool autofocus = false;
var autofocusParsed = namedArguments[const Symbol('autofocus')];
if (autofocusParsed != null) {
autofocus = autofocusParsed as bool;
}
Color? focusColor;
var focusColorParsed = namedArguments[const Symbol('focusColor')];
if (focusColorParsed != null) {
focusColor = focusColorParsed as Color;
}
Color? tileColor;
var tileColorParsed = namedArguments[const Symbol('tileColor')];
if (tileColorParsed != null) {
tileColor = tileColorParsed as Color;
}
Color? selectedTileColor;
var selectedTileColorParsed =
namedArguments[const Symbol('selectedTileColor')];
if (selectedTileColorParsed != null) {
selectedTileColor = selectedTileColorParsed as Color;
}
double? horizontalTitleGap =
parseDouble(namedArguments[const Symbol('horizontalTitleGap')]);
double? minVerticalPadding =
parseDouble(namedArguments[const Symbol('minVerticalPadding')]);
double? minLeadingWidth =
parseDouble(namedArguments[const Symbol('minLeadingWidth')]);
return ListTile(
leading: leading,
title: title,
subtitle: subtitle,
trailing: trailing,
isThreeLine: isThreeLine,
enabled: enabled,
dense: dense,
shape: shape,
selected: selected,
onTap: onTap,
tileColor: tileColor,
selectedTileColor: selectedTileColor,
horizontalTitleGap: horizontalTitleGap,
minVerticalPadding: minVerticalPadding,
minLeadingWidth: minLeadingWidth,
autofocus: autofocus,
focusColor: focusColor,
onLongPress: onLongPress,
contentPadding: contentPadding);
}