rive-app / rive-flutter

Flutter runtime for Rive
https://rive.app
MIT License
1.16k stars 180 forks source link

Erro build flutter web with rive 0.11.5 #333

Closed JgomesAT closed 11 months ago

JgomesAT commented 11 months ago

With the las version of rive 0.11.5 I cant compile flutter web I have this error:

Target dart2js failed: Exception: lib/presentation/ui/widgets/features/authentication/authentication_form.dart:40:11: Error: A value of type 'Type/1/' can't be assigned to a variable of type 'Type/2/'.

HayesGordon commented 11 months ago

Hi @JgomesAT, can you replicate the compilation failure in a new Flutter project?

What platform are you on?

Have you tried cleaning your project

flutter clean
flutter pub get
flutter pub upgrade
JgomesAT commented 11 months ago

HI,

the problem is that:

The argument type 'Map<Type, Action> (where Type is defined in /Users/.pub-cache/hosted/pub.dev/rive-0.11.5/lib/src/asset.dart)' can't be assigned to the parameter type 'Map<Type, Action> (where Type is defined in /Users//Development/Flutter2_SDK/flutter/bin/cache/pkg/sky_engine/lib/core/type.dart)'.dartargument_type_not_assignable map.dart(30, 16):

the type is not the same in this code: Actions( actions: Map<Type, Action>{ ToggleFluskyIntent: CallbackAction(onInvoke: (ToggleFluskyIntent intent) => viewModel.toggleEasterEgg()), },

by now I have removed the type annotation and the code compiles well, but in previous versions, this annotation worked well

HayesGordon commented 11 months ago

There were some deprecations in 0.11.5, but there should not have been anything breaking in the public API.

Glad you sorted it. Going to close this for now, but feel free to reopen.