location has been enabled in addition to sending the domain
This commit is contained in:
16
lib/core/config/app_urls.dart
Normal file
16
lib/core/config/app_urls.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
class AppUrls {
|
||||
static const String themeLogoBase = 'https://hrm.go.iq/Images/';
|
||||
|
||||
static String buildThemeLogoUrl(String logoFileName) {
|
||||
if (logoFileName.isEmpty) return '';
|
||||
|
||||
// If backend ever returns a full URL, keep it
|
||||
final lower = logoFileName.toLowerCase();
|
||||
if (lower.startsWith('http://') || lower.startsWith('https://')) {
|
||||
return logoFileName;
|
||||
}
|
||||
|
||||
// Encode spaces/special chars (important!)
|
||||
return themeLogoBase + Uri.encodeComponent(logoFileName);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user