Skip to content

Rive factory does not repaint when app comes from background. #544

@gabrielgarciagava

Description

@gabrielgarciagava

Description

Moving the app to the foreground will leave a black screen where the image/animation should be.
This issues only happens when:

  1. Using Rive factory. (File.asset("assets/vehicles.riv", riveFactory: Factory.rive))
  2. The animation is static when foregrounding.

Tested with Rive 0.14.0-dev.8

Steps To Reproduce

Steps to reproduce the behavior:

  1. Build a File using some animation that is not looping (so that it stays still at some point) and rive Factory
  2. Build a RiveWidgetController and RiveWidget using such File
  3. Background the app when the image is static
  4. Foreground the app. A blank screen will be shown

Notes:
If the animation is ongoing/looping, the issue does not happen.
If the flutter factory is used, the issue does not happen.
As a workaround, calling controller.scheduleRepaint() when didChangeAppLifecycleState is called with AppLifecycleState.resumed fixes the problem.

Device & Versions (please complete the following information)

  • Device: Samsung S24
  • OS: Android 15
  • Flutter Version:
Flutter 3.35.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 05db968908 (4 weeks ago) • 2025-08-25 10:21:35 -0700
Engine • hash abb725c9a5211af2a862b83f74b7eaf2652db083 (revision a8bfdfc394) (31 days ago) • 2025-08-22 23:51:12.000Z
Tools • Dart 3.9.0 • DevTools 2.48.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions