Skip to content

Can't Find Store Producer and Reducer #49

Closed
@tensor-programming

Description

@tensor-programming

I read issue #46 and that does seem related to my issue however how there is a bit more in my case.

I took a stateless widget and wrapped the Store Provider in it and attached the Reducer to this widget as a static function. When I tried to wrap the root widget in this stateless widget it gave me the "can't find store provider" error like in #46. If I transplant the Store Provider from the stateless widget and directly put it into my root widget, I am unable to gain access to my reducer (I took the reducer out of the wrapper stateless widget and just made it a normal top level function). I happened to leave the wrapper widget code mostly alone (aside from removing the reducer from it) but its not attached to anything and it finds the reducer when it is passed into the Store Provider there.

On the other hand when I pass the same reducer into the Store Provider in the root widget it gives me this very bizarre error: the argument type '(AppState, dynamic) → AppState can't be assigned to the parameter type '(AppState, dynamic) → AppState

Any Ideas of what exactly is going on here? This is a really confusing error and even taking the reducer and its logic and putting it directly into my main file does not solve this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions