splitByCurly function
- String command
It removes the curly braces from the command, splits the command by commas, removes empty strings, and returns the result as a list
Args: command (String): The command to split.
Implementation
List<String> splitByCurly(String command) => command
.removeSurrounding(prefix: "{", suffix: "}")
.split(",")
.where((String element) => element.isNotNullOrEmpty)
.toList();