listFromResult static method
Parses the commands list of an ext.nylo.commands.list result.
Implementation
static List<LiveCommandSchema> listFromResult(Object? result) {
final Object? commands = result is Map ? result['commands'] : null;
if (commands is! List) return const [];
return commands
.map(LiveCommandSchema.fromJson)
.whereType<LiveCommandSchema>()
.toList();
}