Skip to content
This repository has been archived by the owner on Nov 18, 2024. It is now read-only.

Pdf flashes when the state of the parent widget changes #126

Open
shabanov-krl opened this issue Sep 27, 2023 · 2 comments
Open

Pdf flashes when the state of the parent widget changes #126

shabanov-krl opened this issue Sep 27, 2023 · 2 comments

Comments

@shabanov-krl
Copy link

shabanov-krl commented Sep 27, 2023

Description

Pdf flashes when the state of the parent widget changes

Code

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool _someVariable = true;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: PdfViewer.openAsset(
          'assets/hello.pdf',
          params: PdfViewerParams(
            onInteractionUpdate: (_) {
              setState(() {
                _someVariable = !_someVariable;
              });
            },
          ),
        ),
      ),
    );
  }
}

Screen recording

pdf_render_bug.mp4

Package version: 1.4.0

Output of flutter doctor -v

[✓] Flutter (Channel stable, 3.13.5, on Ubuntu 22.04.3 LTS 5.15.0-84-generic, locale ru_RU.UTF-8)
    • Flutter version 3.13.5 on channel stable at /home/shabanov/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 12fccda598 (8 дней назад), 2023-09-19 13:56:11 -0700
    • Engine revision bd986c5ed2
    • Dart version 3.1.2
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /home/shabanov/Android/Sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /home/shabanov/.local/share/JetBrains/Toolbox/apps/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[✓] Android Studio (version 2022.3)
    • Android Studio at /home/shabanov/.local/share/JetBrains/Toolbox/apps/android-studio
    • Flutter plugin version 75.1.2
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.82.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.72.0

[✓] Connected device (3 available)
    • sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64    • Android 13 (API 33) (emulator)
    • Linux (desktop)              • linux         • linux-x64      • Ubuntu 22.04.3 LTS 5.15.0-84-generic
    • Chrome (web)                 • chrome        • web-javascript • Google Chrome 117.0.5938.92

[✓] Network resources
    • All expected network resources are available.

• No issues found!
@MrUbeyd
Copy link

MrUbeyd commented Oct 25, 2023

Hi, any solutions yet? I have similar issue and I need to solve urgently. If anybody find solution can reply please.

@martinogarrizzo5
Copy link

+1

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

3 participants