Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No storeprovider<dynamic> found #54

Closed
aTylerRice opened this issue Jun 10, 2018 · 2 comments
Closed

No storeprovider<dynamic> found #54

aTylerRice opened this issue Jun 10, 2018 · 2 comments

Comments

@aTylerRice
Copy link

aTylerRice commented Jun 10, 2018

I keep getting not storeprovider found. here is my main.dart code:

`
void main() => runApp(new MyApp());

class MyApp extends StatelessWidget {

  final store = new Store<AppState>(
    appReducer,
    initialState: new AppState.loading(),
  );

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return new StoreProvider<AppState>(
      store: store,
      child: new MaterialApp(
        title: 'Flutter Demo',
        routes: <String, WidgetBuilder>{
          FamilRoutes.home: (context) {
            return new StoreBuilder(
                onInit: (store) =>
                    store.dispatch(new LoadAreasAction()),
                builder: (context, store) {
                  return new ListAreas();
                });
          },
          FamilRoutes.addArea: (context) {
              return new AddArea();
          },
        }
      ),
    );
  }
}`

Here is my package versions:

google_sign_in: "^3.0.3+1"
  firebase_auth: "^0.5.10"
  cloud_firestore: "^0.7.2"
  redux: "^3.0.0"
  flutter_redux: "^0.5.1"
@aTylerRice
Copy link
Author

Ok so closing this issue. this needs to buy in the error report for this type of error. Your app state file must be in your root lib directory.

@brianegan
Copy link
Owner

Hey, sorry about that! Hrm, I've definitely been able to store that file in different directories, but Dart is a bit funny about how it imports different files. The good news: The Dart team has a bug filed to fix that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants