flutter_pdf_render
flutter_pdf_render copied to clipboard
RangeError
flutter:
#0 List.[] (dart:core-patch/growable_array.dart:254:60)
#1 PdfViewerController.getPageRect (package:pdf_render/pdf_render_widgets.dart:374:55)
#2 PdfViewerController.calculatePageFitMatrix (package:pdf_render/pdf_render_widgets.dart:379:18)
#3 _PdfViewerState._relayout.<anonymous closure> (package:pdf_render/pdf_render_widgets.dart:684:36)
#4 new Future.delayed.<anonymous closure> (dart:async/future.dart:315:39)
#5 _rootRun (dart:async/zone.dart:1346:47)
#6 _CustomZone.run (dart:async/zone.dart:1258:19)
#7 _CustomZone.runGuarded (dart:async/zone.dart:1162:7)
#8 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1202:23)
#9 _rootRun (dart:async/zone.dart:1354:13)
#10 _CustomZone.run (dart:async/zone.dart:1258:19)
#11 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1186:23)
#12 Timer._createTimer.<anonymous closure> (dart:async-patch/timer_patch.dart:18:15)
#13 _Timer._runTimers (<…>
flutter: ----------------------------------------------------`
Could you please tell me more about the background of the error?
- What code? the example code?
- When it causes?
- Other
Anyway, 1.0.7 introduces intermediate error handling mechanism on document open.
Hi, the problem was that the giving pageNumber was 0.
pageNumer starts with 1. But do you have any reason to pass pageNumber=0 to the widgets? Anyway, could you please show me your code fragment.