RemoteConfig constructor
RemoteConfig({})
Constructor takes in default values
Implementation
RemoteConfig({
String? key,
Map<String, dynamic>? defaults,
int? fetchTimeout,
int? minimumFetchInterval,
FirebaseApp? app,
}) {
//
if (key != null && key.trim().isNotEmpty) {
_key = key;
}
//
if (defaults != null && defaults.isNotEmpty) {
_defaults = defaults;
}
//
if (fetchTimeout != null && fetchTimeout > 0) {
_fetchTimeout = fetchTimeout;
} else {
// Defaults to one minute.
_fetchTimeout = 60;
}
//
if (minimumFetchInterval != null && minimumFetchInterval > 0) {
_minimumFetchInterval = minimumFetchInterval;
} else {
// Considered stale after 12 hours.
_minimumFetchInterval = 12;
}
// If explicitly supplied a FirebaseApp
if (app != null) {
_app = app;
}
}