binSaed / flutter_cached_pdfview

Enhanced PDF view for Flutter.
https://pub.dev/packages/flutter_cached_pdfview
MIT License
118 stars 67 forks source link

ios setPage 返回错误 #31

Closed jeromexiong closed 3 years ago

jeromexiong commented 3 years ago

在iOS中调用setPage返回的是当前的page,但是Android和flutter中解析的都是bool值;FlutterPDFView.m返回需要修改为true

- (void)setPage:(FlutterMethodCall*)call result:(FlutterResult)result {
    NSDictionary<NSString*, NSNumber*>* arguments = [call arguments];
    NSNumber* page = arguments[@"page"];

    [_pdfView goToPage: [_pdfView.document pageAtIndex: page.unsignedLongValue ]];
    result(YES);
}

image

binSaed commented 3 years ago

The fix was made in version 0.3.1