getFileSize method

  1. @override
Future<int?> getFileSize(
  1. String path
)
override

Implementation

@override
Future<int?> getFileSize(String path) async {
  if (path.isEmpty) {
    throw ArgumentError.value(path, 'path', 'path must not be empty');
  }

  final size = await methodChannel.invokeMethod<num?>('getFileSize', {
    'path': path,
  });
  return size?.toInt();
}