enableDebugLog method

  1. @override
Future<bool> enableDebugLog(
  1. bool isEnabled
)
override

It makes debug logs enable/disable. By default debug logs are disabled. We don't recommand to enable logs in live environment. 'isEnabled' must be either true/false. true - enable debug log. false - disable debug log. Returns a bool indicating that if enableDebugLog call is successful or not. In case of error it can also throw exceptions. ///

Implementation

@override
Future<bool> enableDebugLog(bool isEnabled) async {
  try {
    final statusMessage = await methodChannel
        .invokeMethod("setDebugLog", {"debugLog": isEnabled});
    return statusMessage;
  } on PlatformException catch (error) {
    log(error.message as String);
    rethrow;
  }
}