44 lines
1.4 KiB
Dart
44 lines
1.4 KiB
Dart
import 'package:onufitness/environment/environment_config.dart';
|
|
|
|
class AppConfig {
|
|
static final EnvironmentConfig _config = EnvironmentConfigFactory.getConfig();
|
|
|
|
// API Configuration
|
|
static String get apiBaseUrl => _config.apiBaseUrl;
|
|
static String get webUrl => _config.webUrl;
|
|
|
|
// Logging & Monitoring
|
|
static String get sentryDsn => _config.sentryDsn;
|
|
static String get environment => _config.environment;
|
|
static bool get enableLogging => _config.enableLogging;
|
|
static bool get useSentry => _config.useSentry;
|
|
|
|
// Third-party Services
|
|
static String get googleIosClientId => _config.googleIosClientId;
|
|
static String get agoraAppId => _config.agoraAppId;
|
|
static String get agoraChatAppKey => _config.agoraChatAppKey;
|
|
|
|
// App Settings
|
|
static int get streamEndsTime => _config.streamEndsTime;
|
|
|
|
// Helper methods
|
|
|
|
/// Build a full share URL for a post
|
|
static String buildPostShareUrl(String encodedPostId) {
|
|
return "https://$webUrl/post-link?postId=$encodedPostId";
|
|
}
|
|
|
|
/// Build a full share URL for a tribe post
|
|
static String buildTribePostShareUrl(
|
|
String encodedTribeId,
|
|
String encodedPostId,
|
|
) {
|
|
return "https://$webUrl/tribe-post-link?tribeId=$encodedTribeId&postId=$encodedPostId";
|
|
}
|
|
|
|
/// Check if current host matches the configured web URL
|
|
static bool isValidDeepLinkHost(String host) {
|
|
return host == webUrl;
|
|
}
|
|
}
|