isInternalUrl method
Implementation
bool isInternalUrl(Uri uri) {
if (appBaseUrl == null) return false;
final base = Uri.tryParse(appBaseUrl!);
if (base == null) return false;
final isHttpBase = base.scheme == 'https' || base.scheme == 'http';
if (isHttpBase) {
return uri.host == base.host && uri.host.isNotEmpty;
} else {
// Custom scheme app link — match on scheme only
return uri.scheme == base.scheme;
}
}