isExternalStorageReadable method

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

Implementation

@override
Future<bool> isExternalStorageReadable() async {
  try {
    if (!Platform.isAndroid) throw _unsupportedPlatformException();
    return await methodChannel.invokeMethod<bool>(
          'isExternalStorageReadable',
        ) ??
        false;
  } on PlatformException catch (e) {
    debugPrint(
      'Error checking if external storage is readable: ${e.message}',
    );
    return false;
  }
}