Compilation error in rive_common-0.4.15
on Flutter 3.27.1 / Dart 3.6.0
#453
Labels
bug
Something isn't working
rive_common-0.4.15
on Flutter 3.27.1 / Dart 3.6.0
#453
Description
After updating to Flutter 3.27.1 and Dart 3.6.0, I encountered a compilation error when trying to build my Flutter project with
rive_common-0.4.15
. The error message indicates that_YGValue
must be marked asbase
,final
, orsealed
because it extendsStruct
.This issue appears to be related to recent changes in Dart's handling of FFI structs.
Steps To Reproduce
rive_common-0.4.15
.flutter build
orflutter run
.layout_engine_ffi.dart
.Expected behavior
The project should compile successfully without errors.
Workaround
I was able to resolve the issue locally by modifying
_YGValue
inlayout_engine_ffi.dart
and marking it asfinal
:After applying this change, the project compiled successfully without errors. However, this is just a temporary fix, and an official update in the package would be appreciated.
Device & Versions
Additional context
This issue may be due to Dart 3.6 enforcing stricter constraints on FFI structures. It would be helpful if
rive_common
could update its codebase to be compatible with the latest Dart versions.Would appreciate guidance on whether this fix should be incorporated officially.
The text was updated successfully, but these errors were encountered: