generate method
Implementation
@override
Widget generate(Context context) {
var wids = <Widget>[];
switch (_action) {
case _TeamAction.add:
wids.add(Command('team add $name'));
break;
case _TeamAction.empty:
wids.add(Command('team empty $name'));
break;
case _TeamAction.remove:
wids.add(Command('team remove $name'));
break;
case _TeamAction.join:
wids.add(Command('team join $name $entity'));
break;
case _TeamAction.leave:
wids.add(Command('team leave $entity'));
break;
default:
}
if (modifiers.isNotEmpty) {
for (var key in modifiers.keys) {
wids.add(Command('team modify $name $key ${modifiers[key]}'));
}
}
return For.of(wids);
}