Hi
I am getting the following error on latest flutter master branch, my hunch is that this is related the dart 2.3 update. Working fine on Stable channel
Compiler message:
file:///Users/rahul/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.3.13/lib/flare.dart:981:18: Error: The argument type 'Int32List' can't be assigned to the parameter type 'Uint16List'.
Flutter version:
Flutter 1.5.5-pre.19 • channel master • https://github.com/flutter/flutter.git
Framework • revision ac7f875778 (2 hours ago) • 2019-04-22 21:41:18 -0400
Engine • revision 0523870e0b
Tools • Dart 2.3.0 (build 2.3.0-dev.0.1 cf4444b803)
It looks like the latest Flutter master has changed the Vertices.raw() constructor type for the indices parameter, but Flutter stable still relies on the old signature.
In the meantime @Zazo032's temporary fix works, but we'll be updating everything asap!
Is this issue solved?
I try it with Flutter master and flare_flutter: ^1.5.0 but still getting errors:
Compiler message:
file:///Users/example/flutter/.pub-cache/hosted/pub.dartlang.org/flare_flutter-1.5.0/lib/flare.dart:1023:18: Error: The argument type 'Int32List' can't be
assigned to the parameter type 'Uint16List'.
- 'Int32List' is from 'dart:typed_data'.
- 'Uint16List' is from 'dart:typed_data'.
Try changing the type of the parameter, or casting the argument to 'Uint16List'.
indices: _indices, textureCoordinates: _uvBuffer);
^
Compiler failed on /Users/example/Desktop/coding/flutter-flare/flare/lib/main.dart
Error launching application on iPhone XÊ€.
Flutter Doctor - v:
[✓] Flutter (Channel master, v1.5.9-pre.86, on Mac OS X 10.14.4 18E226, locale en-US)
• Flutter version 1.5.9-pre.86 at /Users/ex/flutter
• Framework revision a8504405a8 (5 hours ago), 2019-04-30 23:27:30 -0700
• Engine revision 2f11d3c4a2
• Dart version 2.3.0 (build 2.3.0-dev.0.4 c46deebfb6)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/ex/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
• ios-deploy 1.9.4
• CocoaPods version 1.6.1
[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 31.3.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
[✓] VS Code (version 1.33.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.25.1
[✓] Connected device (1 available)
• iPhone Xʀ • 6BA67AB4-AB37-4C1C-8EA3-D69EC44E4B6A • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
! Doctor found issues in 1 category.
We've been making a few updates to the runtime in order to have better support for these changes in the Flutter APIs.
Using this repo's stable branch together with Flutter Stable should work!
Now that these changes have landed in flutter dev, you can use either our master or dev channel if you are using non-stable version of flutter:
flare_flutter:
git:
url: git://github.com/2d-inc/Flare-Flutter.git
ref: dev
path: flare_flutter
1.7.8-hotfix.2 is now stable, we need to fix this in the stable version of flare as well
We already updated flare_flutter for this yesterday! Please update your flare_flutter dependency in pubspec.yaml to ^1.5.4 and run pub get.
@luigi-rosso can you also check https://github.com/2d-inc/Nima-Flutter/pull/16, because it's a blocker for https://github.com/flutter/slideplayer/pull/8
Yes, I’ll take a look at this today!
Should this ticket be closed then?
Closing this issue. If you still see this, you’re likely on an old flutter or flare version. Make sure to update flare_flutter to 1.5.4 and run flutter upgrade on flutter channel stable.
@luigi-rosso Had the same issue, followed the instructions above and was fixed.
For all others running into this issue.
1.- Add flare_flutter: ^1.5.4 in pubspec.yaml file.
2.- Run 'flutter upgrade'
3.- Profit
Thanks!
Most helpful comment
Now that these changes have landed in flutter dev, you can use either our master or dev channel if you are using non-stable version of flutter: