2d-inc / Flare-Flutter

Load and get full control of your Rive files in a Flutter project using this library.
https://rive.app/
MIT License
2.55k stars 469 forks source link

FlareActor breaks flutter_driver integration testing #69

Open tdesc opened 5 years ago

tdesc commented 5 years ago

Having FlareActor in widget tree broke test driver. https://flutter.dev/docs/cookbook/testing/integration/introduction https://github.com/flutter/flutter/issues/25975

luigi-rosso commented 5 years ago

Thanks for calling this out, could you try with version 1.3.10?

miguelcmedeiros commented 5 years ago

@luigi-rosso, I am using version 1.5.0 with Flutter 1.5.4-hotfix.2 and I have similar problem, but with widget tests. I get the following error which seems related to the original issue of this ticket:

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test:
A Timer is still pending even after the widget tree was disposed.
'package:flutter_test/src/binding.dart': Failed assertion: line 1014 pos 7:
'_currentFakeAsync.nonPeriodicTimerCount == 0'

It would be handy to have a way to dispose the animation so that we can couple it with the lifecycle to the (stateful) widget using it. I have little understanding of the internals of flare, but is this a possibility?

yjoo9317 commented 5 years ago

@luigi-rosso Any update on this one?

This issue is not allowing us to perform automation test. We are now disabling flare while automation test.

Thanks.

artem-zaitsev commented 5 years ago

@yjoo9317 I found solution. https://github.com/flutter/flutter/issues/25975#issuecomment-542152044