flame icon indicating copy to clipboard operation
flame copied to clipboard

FlameBlocReader doesn't call super.onLoad()

Open imaNNeo opened this issue 1 year ago • 1 comments

What happened?

I need to be able to chain multiple mixins in my component, but when I add FlameBlocReader, it doesn't call super.onLoad()

Take a look at the below code: https://github.com/flame-engine/flame/blob/6d7eeee3983ae2d9c169ab05a9674b6c30c40f6a/packages/flame_bloc/lib/src/flame_bloc_reader.dart#L18-L29

What do you expect?

I expect it to call super.onLoad(), then I am able to chain multiple mixins in my flame component.

How can we reproduce this?

You can chain multiple mixins and put the FlameBlocReader as the last mixin, so previous mixins onLoad() will never call.

What steps should take to fix this?

No response

Do have an example of where the bug occurs?

No response

Relevant log output

No response

Execute in a terminal and put output into the code block below

Output of: flutter doctor -v

Affected platforms

All

Other information

No response

Are you interested in working on a PR for this?

  • [ ] I want to work on this

imaNNeo avatar May 21 '24 14:05 imaNNeo

@imaNNeo can you create a PR for this?

spydon avatar May 24 '24 08:05 spydon

Sorry for my late response. And thanks for fixing it!

imaNNeo avatar May 27 '24 21:05 imaNNeo

It's now released in flame_bloc v1.12.0 :)

spydon avatar May 27 '24 21:05 spydon

Oh, nice! Let's update the dependency 🥳🥳🥳🥳🥳

imaNNeo avatar May 27 '24 21:05 imaNNeo

It's now released in flame_bloc v1.12.0 :)

1.18.0 you mean

imaNNeo avatar May 27 '24 21:05 imaNNeo

1.18.0 you mean

No, v1.18.0 is the Flame version, the FlameBlocReader class is in the flame_bloc package which has the version v1.12.0.

spydon avatar May 27 '24 21:05 spydon

No, v1.18.0 is the Flame version, the FlameBlocReader class is in the flame_bloc package which has the version v1.12.0.

Oh, you're right. We have separate versioning for flame_bloc

imaNNeo avatar May 27 '24 21:05 imaNNeo