readFile method

  1. @override
Future<Uint8List?> readFile(
  1. String path
)
override

Returns the file contents for path, or null when the resource cannot be found.

Implementation

@override
Future<Uint8List?> readFile(String path) async {
  final file = File(path);
  if (!await file.exists()) {
    return null;
  }
  return file.readAsBytes();
}