fromUriOrNull static method
Constructs a new instance of DataRefModel,
from the query parameters of uri
. Returns null
if uri
is null
or
if the conversion fails.
Implementation
static DataRefModel? fromUriOrNull(
Uri? uri,
) {
try {
if (uri != null && uri.path == CLASS_NAME) {
return DataRefModel.fromJson(uri.queryParameters);
} else {
return DataRefModel.assertRequired();
}
} catch (_) {
return null;
}
}