getUrl method

  1. @protected
String getUrl(
  1. String action,
  2. Object? masterId
)

Obtém uma URL com o controle base usando a action action e o masterId ID do registro pai, se houver (opcional).

Implementation

@protected
String getUrl(String action, Object? masterId) {
  var baseUrl = config.baseUrl!;

  if (masterId != null) {
    baseUrl = baseUrl.replaceFirst(BaseStore.urlIdPlaceholder, masterId.toString());
  }

  return '$baseUrl${action.isNotEmpty ? '/$action' : ''}';
}