toSimpleRoute method Null safety

String toSimpleRoute()

Implementation

String toSimpleRoute() {
  final self = this;
  if (self is Type) {
    return "/${self.simpleName.uncapitalize()}";
  } else {
    return "/${this?.toString().uncapitalize()}";
  }
}