execute method
Implementation
@override
Future<bool?> execute(String caller, String propertyOrFunction, List<dynamic> arguments) async
{
if (scope == null) return null;
var function = propertyOrFunction.toLowerCase().trim();
switch (function)
{
case "open" :
var view = findListenerOfExactType(ModalViewState);
if (view == null)
{
// modal width
if (arguments.isNotEmpty) width = S.toStr(arguments[0]);
// modal height
if (arguments.length > 1) height = S.toStr(arguments[1]);
// resizeable
if (arguments.length > 2) resizeable = S.toBool(arguments[2]) ?? true;
// closeable
if (arguments.length > 3) closeable = S.toBool(arguments[3]) ?? true;
// draggable
if (arguments.length > 4) draggable = S.toBool(arguments[4]) ?? true;
// modal
if (arguments.length > 5) modal = S.toBool(arguments[5]) ?? true;
view = ModalView(this);
}
open(view);
return true;
case "close" :
close();
return true;
}
return super.execute(caller, propertyOrFunction, arguments);
}