call method
$Value?
call(
- Runtime runtime,
- $Value? target,
- List<$Value?> args
)
Implementation
@override
$Value? call(Runtime runtime, $Value? target, List<$Value?> args) {
final result = showTextInputDialog(
context: args[0]!.$value,
textFields: (args[1]!.$reified as List).cast(),
title: args[2]?.$value,
message: args[3]?.$value,
okLabel: args[4]?.$value,
cancelLabel: args[5]?.$value,
isDestructiveAction: args[6]?.$value ?? false,
barrierDismissible: args[7]?.$value ?? true,
style: args[8]?.$value,
useRootNavigator: args[9]?.$value ?? true,
actionsOverflowDirection: args[10]?.$value ?? VerticalDirection.up,
fullyCapitalizedForMaterial: args[11]?.$value ?? false,
canPop: args[12]?.$value ?? true,
onPopInvokedWithResult: (bool didPop, List<String>? result) {
(args[13]! as EvalCallable?)?.call(runtime, null, [
$bool(didPop),
if (result == null)
const $null()
else
$List.view(result, (e) => $String(e)),
]);
},
autoSubmit: args[14]?.$value ?? false,
builder: (BuildContext context, Widget child) {
return (args[15]! as EvalCallable?)?.call(runtime, null, [
$BuildContext.wrap(context),
$Widget.wrap(child),
])?.$value;
},
routeSettings: args[16]?.$value,
);
return $Future.wrap(
result.then(
(e) => e == null ? const $null() : $List.view(e, (e) => $String(e)),
),
);
}