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: $className,
queryParameters: toJson().mapValues((v) => v.toString()),
);
}