buildFinalUrl function

String buildFinalUrl(
  1. String host,
  2. String? sessionId,
  3. String? pageId,
  4. Map<String, dynamic>? pageInputs, {
  5. bool? isApplicationPublic,
  6. String? identityProviderId,
})

Builds the final URL with page inputs if provided

Implementation

String buildFinalUrl(
  String host,
  String? sessionId,
  String? pageId,
  Map<String, dynamic>? pageInputs, {
  bool? isApplicationPublic,
  String? identityProviderId,
}) {
  if (pageInputs == null || pageInputs.isEmpty) {
    return _buildBaseUrl(
      host,
      sessionId,
      pageId,
      isApplicationPublic,
      identityProviderId,
    );
  }

  // Note: In UnifyApps matrix links %22 is not being resolved correctly, so we need to replace it with ".
  return _buildUrlWithPageInputs(
    host,
    sessionId,
    pageId,
    pageInputs,
    isApplicationPublic,
    identityProviderId,
  ).replaceAll('%22', '"');
}