flame icon indicating copy to clipboard operation
flame copied to clipboard

Official Riverpod support

Open devberkay opened this issue 2 years ago • 7 comments

Problem to solve

Games need complex state management solutions and Riverpod is the core dependency for many flutter developers like me.

Proposal

It would be amazing if we could see a collabaration in the future as it was done with flame_bloc package.

More information

@rrousselGit

devberkay avatar Feb 20 '23 08:02 devberkay

Lucky for you there is already a package for this, which we soon will be reviewing and bringing in to the monorepo. https://github.com/markvideon/flame_riverpod https://pub.dev/packages/flame_riverpod

spydon avatar Feb 20 '23 09:02 spydon

@markvideon do you know when you'll put up a PR for this? :)

spydon avatar Feb 20 '23 09:02 spydon

Making an official Riverpod implementation involves more work.

As is, it's not going to work with any tools like riverpod_lint & upcoming.

rrousselGit avatar Feb 20 '23 10:02 rrousselGit

Making an official Riverpod implementation involves more work.

As is, it's not going to work with any tools like riverpod_lint & upcoming.

Well depends on what is meant with official here I guess, if they mean an official bridge package from the Flame side (like flame_bloc) or if they mean official from the Riverpod side.

spydon avatar Feb 20 '23 10:02 spydon

I assume it should be official for both sides at the same time. Otherwise it's not truly official right? :) Where the project sits doesn't really matter. I'm fine with it being in the flame repository.

But it should be compatible with riverpod_lint, which is a core Riverpod package. Nothing blocking, but I'm sure it'd be inconvenient for Riverpod users if flame's consumer broke the various refactors & lints

rrousselGit avatar Feb 20 '23 11:02 rrousselGit

I assume it should be official for both sides at the same time. Otherwise it's not truly official right? :)

True true. :)

But it should be compatible with riverpod_lint, which is a core Riverpod package. Nothing blocking, but I'm sure it'd be inconvenient for Riverpod users if flame's consumer broke the various refactors & lints

Alright, let's create an issue for that once the initial version is merged into the monorepo. I ran the linter on the the example that was provided in the repository and there were no warnings reported in there, but you're probably right that refactors wouldn't work like they should.

spydon avatar Feb 20 '23 12:02 spydon

@markvideon do you know when you'll put up a PR for this? :)

I'll try to get to it this week

markvideon avatar Feb 21 '23 20:02 markvideon

@spydon can probably close this one?

markvideon avatar Mar 15 '24 09:03 markvideon