remoteConfigGetBool method

  1. @override
Future<bool> remoteConfigGetBool(
  1. String key,
  2. bool defaultValue
)
override

Implementation

@override
Future<bool> remoteConfigGetBool(String key, bool defaultValue) async {
  try {
    final Map<String, Object?> arguments = {
      Argument.remoteConfigKey.value: key,
      Argument.remoteConfigDefaultValue.value: defaultValue,
    };

    final bool result = await methodChannel.invokeMethod(
      Method.remoteConfigGetBool.value,
      arguments,
    );

    return result;
  } catch (e) {
    return defaultValue;
  }
}