open static method

void open(
  1. String bookPath, {
  2. EpubLocator? lastLocation,
})

bookPath should be a local file. Last location is only available for android.

Implementation

static void open(String bookPath, {EpubLocator? lastLocation}) async {
  Map<String, dynamic> agrs = {
    "bookPath": bookPath,
    'lastLocation': lastLocation == null ? '' : jsonEncode(lastLocation.toJson()),
  };
  _channel.invokeMethod('setChannel');
  await _channel.invokeMethod('open', agrs);
}