Command.fromJson constructor

Command.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Command.fromJson(Map<String, dynamic> json) {
  return Command(
    args: (json['Args'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    name: json['Name'] as String?,
    scriptPath: json['ScriptPath'] as String?,
  );
}