toUrl method
Converts the current BaseModel to a Uri that can be used as a distinct identifier. The model must not be too large to avoid exceeding the maximum length of a URL.
Implementation
Uri toUrl() {
return Uri(
path: this.$className,
queryParameters: this.toJson().mapValues((v) => v.toString()),
);
}