17 lines
501 B
Dart
17 lines
501 B
Dart
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);
|
|
}
|
|
}
|