urlForModel<_Model extends RestModel> method
Given a model instance and a query, produce a fully-qualified URL
Implementation
@protected
String? urlForModel<_Model extends RestModel>(Query? query, [_Model? instance]) {
assert(
modelDictionary.adapterFor.containsKey(_Model),
'REST provider does not contain $_Model',
);
final adapter = modelDictionary.adapterFor[_Model];
final endpoint = adapter?.restEndpoint(query: query, instance: instance);
if (endpoint?.isEmpty != false) return null;
return baseEndpoint + endpoint!;
}