execute method
Implementation
@override
Future<bool?> execute(
String caller, String propertyOrFunction, List<dynamic> arguments) async {
/// setter
if (scope == null) return null;
var function = propertyOrFunction.toLowerCase().trim();
switch (function) {
case "open":
// set the index
if (parent is TabViewModel)
{
// set the parent index
var index = (parent as TabViewModel).tabs.indexOf(this);
(parent as TabViewModel).index = index;
}
return true;
// close specified tab
case "close":
// set the index
if (parent is TabViewModel)
{
(parent as TabViewModel).deleteTab(this);
}
return true;
}
return super.execute(caller, propertyOrFunction, arguments);
}