toParams method
Parses the string into a list of route parameters.
Implementation
List<String> toParams() {
final regexp = RegExp(r'\[(.*?)\]');
final matches = regexp.allMatches(this);
return matches.map((m) {
final match = m[0]!;
return match.replaceAll(RegExp(r'\[|\]'), '').replaceFirst('...', '');
}).toList();
}