Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

RangeError (index): Invalid value: Valid value range is empty: 0 #88

Open
Osmancn opened this issue Dec 6, 2021 · 3 comments
Open

RangeError (index): Invalid value: Valid value range is empty: 0 #88

Osmancn opened this issue Dec 6, 2021 · 3 comments

Comments

@Osmancn
Copy link

Osmancn commented Dec 6, 2021

I am getting error when base64 to fromFile

    Uint8List file = base64.decode(base64File);
    PDFDocument.fromFile(File.fromRawPath(file)).then((value) => setState(() {
             document = value;
           }));
PDFViewer(
       document: document!,
       zoomSteps: 1,
       showPicker: false )

Base64String :
base64pdf.txt

errorLog:

[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: RangeError (index): Invalid value: Valid value range is empty: 0
#0 List.[] (dart:core-patch/array.dart:110:52)
#1 _PDFViewerState._loadPage (package:advance_pdf_viewer/src/viewer.dart:143:16)
#2 _PDFViewerState.didChangeDependencies (package:advance_pdf_viewer/src/viewer.dart:122:5)
#3 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4826:11)
#4 ComponentElement.mount (package:flutter/src/widgets/framework.dart:4638:5)
#5 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3673:14)
#6 Element.updateChild (package:flutter/src/widgets/framework.dart:3422:20)
#7 SingleChildRenderObjectElement.update (package:flutter/src/widgets/framework.dart:6202:14)
#8 Element.updateChild (package:flutter/src/widgets/framework.dart:3412:15)
#9 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4690:16)
#10 Element.rebuild (package:flutter/src/widget<…>

@eduardo-mior
Copy link

I have a same problem.
Any idea why this problem happens? How to fix?

@RogerBrusamarello
Copy link

Any updates here? @lohanidamodar

@devangichhatbar
Copy link

Any update? @lohanidamodar

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants