Flutter Package: A Redux version tailored for Flutter, which is easy to learn, to use, to test, and has no boilerplate. Allows for both sync and async reducers.
Just to explain what I mean, I've created this PR. You're free to decide if it's philosophically the right direction for this project, and if so I'm also happy to clear things up and add more tests.
This PR adds a dependency container to Store in the form of an "environment", set at the time of the store's creation. It can be accessed by ReduxActions by reading the environment field, in the same way as they currently read state.
The environment is to be used for attaching dependencies shared by actions. For example, you could pass a GetIt instance if you prefer to use it. The advantage of attaching it to the store is clear: a single point of configuration.
References #107.
Just to explain what I mean, I've created this PR. You're free to decide if it's philosophically the right direction for this project, and if so I'm also happy to clear things up and add more tests.
This PR adds a dependency container to
Store
in the form of an "environment", set at the time of the store's creation. It can be accessed byReduxAction
s by reading theenvironment
field, in the same way as they currently readstate
.The environment is to be used for attaching dependencies shared by actions. For example, you could pass a
GetIt
instance if you prefer to use it. The advantage of attaching it to the store is clear: a single point of configuration.