open method Null safety

void open(
  1. String? bookPath
)

@param bookPath the local path in cache

Implementation

static void open(String? bookPath) async {
  if (bookPath == null || bookPath.isEmpty) throw 'bookPath cannot be empty';

  await _channel.invokeMethod('open', {
    "bookPath": bookPath,
  });
}