validateModelUrl function
Validates the URL before any platform-specific network request.
Implementation
void validateModelUrl(String url) {
final uri = Uri.tryParse(url);
if (uri == null || uri.scheme != 'https' || uri.host.isEmpty || uri.userInfo.isNotEmpty) {
throw ArgumentError('Use an HTTPS GLB URL without embedded credentials.');
}
}