cleanRouteName method

String cleanRouteName(
  1. String name
)

Implementation

String cleanRouteName(String name) {
  name = name.replaceAll('() => ', '');

  /// uncomment for URL styling.
  // name = name.paramCase!;
  if (!name.startsWith('/')) {
    name = '/$name';
  }
  return Uri.tryParse(name)?.toString() ?? name;
}