clearCache method

  1. @override
Future<bool> clearCache()
override

Clears cached PNG files written by removeBackground when writeToCache was enabled.

Implementation

@override
Future<bool> clearCache() async {
  try {
    final result = await methodChannel.invokeMethod<bool>('clearCache');
    return result ?? false;
  } on PlatformException {
    return false;
  }
}