enum Environment { production, } class AppConfig { static const Environment currentEnvironment = Environment.production; static final Map> _environmentHosts = { Environment.production: [ 'h5-im.imharry.work', ], }; static List get environmentHosts { return _environmentHosts[currentEnvironment] ?? const []; } static String get homeUrl { final host = environmentHosts.isNotEmpty ? environmentHosts.first : 'h5-im.imharry.work'; return _normalizeHomeUrl(host); } static String _normalizeHomeUrl(String host) { final value = host.trim(); if (value.startsWith('http://') || value.startsWith('https://')) { return value.endsWith('/') ? value : '$value/'; } return 'https://$value/'; } }