Skip to content

Null check operator used on a null value in _buildLoaded #599

@Soliardi-Chyngyz

Description

@Soliardi-Chyngyz

_PdfViewState._buildLoaded.
io.flutter.plugins.firebase.crashlytics.FlutterError - Null check operator used on a null value. Error thrown .

_PdfViewState._buildLoaded. (pdf_view.dart:208)
_PhotoViewGalleryState._buildPageOption (photo_view_gallery.dart:316)
_PhotoViewGalleryState._buildItem (photo_view_gallery.dart:250)
SliverChildBuilderDelegate.build (scroll_delegate.dart:498)

SchedulerBinding._handleDrawFrame (binding.dart:1204)

To Reproduce
PdfView(controller: PdfController(document: PdfDocument.openFile(path)))

There seems to be a problem with this method.

class PdfView ... {
  Widget _buildLoaded(BuildContext context) => PhotoViewGallery.builder(
        builder: (context, index) => widget.builders.pageBuilder(
          context,
          _getPageImage(index),
          index,
          _controller._document! // crash here
        ), ...

Smartphone:

  • Redmi Note 12 Pro
  • Galaxy A23

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions