Closed pgainullin closed 5 years ago
Hi, @pgainullin , thanks for the report!
What version of flutter/dart are you using?
This is probably caused by a recent change in the Flutter SDK that required refactoring of flame, using a new API that used to return Image
and now returns a Future<Image>
.
Currently we are using Flutter version 1.2.0 here, though that's up to debate (which version we should support).
Thanks for quick response. I'm using 1.2.1:
Flutter 1.2.1 • channel stable • https://github.com/flutter/flutter.git Framework • revision 8661d8aecd (7 weeks ago) • 2019-02-14 19:19:53 -0800 Engine • revision 3757390fa4 Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
Please try to update to flutter version 1.4.10; it should work on the newer versions :) You can do that by changing the flutter channel to anything greater than stable, I believe.
I'm clearly doing something wrong but I'm getting a different error at compile in this case:
flame-0.10.3/lib/svg.dart:26:17: Error: Too few positional arguments: 3 required, 2 given. svgRoot.draw(canvas, null);
I was only able to solve it by going back to Flame v. 0.10.2 which then results in the original error related to the TextBoxComponent.
Fixed on 0.10.4
; @pgainullin , would you please test that for us? Thanks!
Thanks! this works without errors though I can't seem to be able to get it to render anything using the pattern
(MyTextBox instance).render(canvas)
within my game render function. best I can do is force it to drawBackground by adding it to the render override of MyTextBox.
Hi, @pgainullin! Have you seen the example app called text inside the docs/examples folder? Does that app work? Could you compare and see the differences? Or show your code that is not working and why? So that we can better understand the problem...
Hi, @pgainullin , we tested here with the latest versions of flame, the docs/examples/text example is working fine. Could you please either refer to that to see if something is wrong or provide your code that you claim is not working?
Hi,
Thanks very much - I'm sure I'll figure it out but I'm travelling for a few weeks now and won't be able to test. Thanks again for being so responsive!
On Mon, 22 Apr 2019 at 01:10, Luan Nico notifications@github.com wrote:
Hi, @pgainullin https://github.com/pgainullin , we tested here with the latest versions of flame, the docs/examples/text example is working fine. Could you please either refer to that to see if something is wrong or provide your code that you claim is not working?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/luanpotter/flame/issues/72#issuecomment-485267366, or mute the thread https://github.com/notifications/unsubscribe-auth/AGJSBXY3KGBMPENQWKKQYP3PRSNXZANCNFSM4HD2DYRQ .
--
Pjotr Gainullin +65 9669 8721 pgainullin@gmail.com
This has been inactive for some time now and the issue was resolved on a couple of versions earlier.
I will be closing this, but feel free to open a new issue if you still have problems @pgainullin.
Code:
Error: