{"action":"created","issue":{"url":"https://api.github.com/repos/brianegan/flutter_redux/issues/46","repository_url":"https://api.github.com/repos/brianegan/flutter_redux","labels_url":"https://api.github.com/repos/brianegan/flutter_redux/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/brianegan/flutter_redux/issues/46/comments","events_url":"https://api.github.com/repos/brianegan/flutter_redux/issues/46/events","html_url":"https://github.com/brianegan/flutter_redux/issues/46","id":321395827,"number":46,"title":"App Crashes with \"No StoreProvider<Store<State>> found.\" on launch.","user":{"login":"tluckett77","id":2301183,"avatar_url":"https://avatars2.githubusercontent.com/u/2301183?v=4","gravatar_id":"","url":"https://api.github.com/users/tluckett77","html_url":"https://github.com/tluckett77","followers_url":"https://api.github.com/users/tluckett77/followers","following_url":"https://api.github.com/users/tluckett77/following{/other_user}","gists_url":"https://api.github.com/users/tluckett77/gists{/gist_id}","starred_url":"https://api.github.com/users/tluckett77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tluckett77/subscriptions","organizations_url":"https://api.github.com/users/tluckett77/orgs","repos_url":"https://api.github.com/users/tluckett77/repos","events_url":"https://api.github.com/users/tluckett77/events{/privacy}","received_events_url":"https://api.github.com/users/tluckett77/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-05-09T01:02:53Z","updated_at":"2018-05-15T22:13:44Z","closed_at":"2018-05-15T17:25:42Z","author_association":"NONE","body":"I can't seem to get this working. My app crashes right at boot since attempting to upgrade to the latest flutter redux. Below is the currently set up that I am working with. \r\n\r\n```\r\ndependencies:\r\n  # Redux\r\n    redux: \"^3.0.0\"\r\n    flutter_redux: \"^0.5.0\"\r\n```\r\n\r\n```\r\nFlutter 0.3.2 • channel beta • https://github.com/flutter/flutter.git\r\nFramework • revision 44b7e7d3f4 (3 weeks ago) • 2018-04-20 01:02:44 -0700\r\nEngine • revision 09d05a3891\r\nTools • Dart 2.0.0-dev.48.0.flutter-fe606f890b\r\n```\r\n\r\n**The Code Which is Crashing:** \r\n```\r\nfinal store = new Store<PrimeAppStateModel>(\r\n    appReducer,\r\n    initialState: new PrimeAppStateModel().initState(), /* initState Returns instance of PrimeAppStateModel */\r\n    middleware: [loggingMiddleware]\r\n  );\r\n\r\n  runApp(\r\n    new StoreProvider<PrimeAppStateModel>(\r\n      store: store,\r\n      child: new MaterialApp(\r\n        debugShowCheckedModeBanner: _isDebugBannerOn,\r\n        localizationsDelegates: [\r\n          const HLocalizationsDelegate(),\r\n          GlobalMaterialLocalizations.delegate,\r\n          GlobalWidgetsLocalizations.delegate,\r\n        ],\r\n        supportedLocales: AppSettings.supportedLocales,\r\n        onGenerateTitle: (BuildContext context) => HLocalizations.of(context).appName,\r\n        color: HColors.canvas,\r\n        theme: HTheme.baseTheme(),\r\n        home: new AppLaunch()\r\n      )\r\n    )\r\n  );\r\n\r\nclass AppLaunch extends StatelessWidget {\r\n\r\n  @override\r\n  Widget build(BuildContext context) {\r\n   return new Scaffold(\r\n      backgroundColor: HColors.purple,\r\n      body: new StoreConnector<PrimeAppStateModel, Store<PrimeAppStateModel>>(\r\n        converter: (store) => store,\r\n        onInit: (store){ \r\n            AppEntryModel modalModel = new AppEntryModel.set(\r\n                HLocalizations.of(context),\r\n                modalMode: ModalMode.login\r\n          );\r\n          store.dispatch(new AppEntryInitAction(modalModel));\r\n        }\r\n        builder: (BuildContext build, store) => new Container()\r\n```\r\n\r\n**The Error On Build Completion:**\r\n```\r\nI/flutter (20772): :: ACTION LOG :: 2018-05-09 00:35:43.225096: Instance of 'AppEntryInitAction'\r\nI/flutter (20772): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════\r\nI/flutter (20772): The following StoreProviderError was thrown building StoreConnector<Store<PrimeAppStateModel>, () =>\r\nI/flutter (20772): void>(dirty):\r\nI/flutter (20772): Error: No StoreProvider<Store<PrimeAppStateModel>> found. To fix, please try:\r\nI/flutter (20772):           \r\nI/flutter (20772):   * Using Dart 2 (required) by using the --preview-dart-2 flag\r\nI/flutter (20772):   * Wrapping your MaterialApp with the StoreProvider<State>, rather than an individual Route\r\nI/flutter (20772):   * Providing full type information to your Store<State>, StoreProvider<State> and\r\nI/flutter (20772):     StoreConnector<State, ViewModel>\r\n```\r\n\r\nI have checked to make sure that the app is running in Dart 2.0, and it is enabled in Android Studio -> Preferences -> Languages & Frameworks -> Flutter\r\n\r\nThe launch screen is displayed and then the AppLaunch's StoreConnector runs, since I get a log notice from my logging middleware that `store.dispatch(new AppEntryInitAction(modalModel));` action has started. At that point the App Crashes. \r\n\r\nI've tried some time trying to isolate where this is happening, and can't seem to pin-point it. \r\n"},"comment":{"url":"https://api.github.com/repos/brianegan/flutter_redux/issues/comments/389330389","html_url":"https://github.com/brianegan/flutter_redux/issues/46#issuecomment-389330389","issue_url":"https://api.github.com/repos/brianegan/flutter_redux/issues/46","id":389330389,"user":{"login":"brianegan","id":126604,"avatar_url":"https://avatars2.githubusercontent.com/u/126604?v=4","gravatar_id":"","url":"https://api.github.com/users/brianegan","html_url":"https://github.com/brianegan","followers_url":"https://api.github.com/users/brianegan/followers","following_url":"https://api.github.com/users/brianegan/following{/other_user}","gists_url":"https://api.github.com/users/brianegan/gists{/gist_id}","starred_url":"https://api.github.com/users/brianegan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianegan/subscriptions","organizations_url":"https://api.github.com/users/brianegan/orgs","repos_url":"https://api.github.com/users/brianegan/repos","events_url":"https://api.github.com/users/brianegan/events{/privacy}","received_events_url":"https://api.github.com/users/brianegan/received_events","type":"User","site_admin":false},"created_at":"2018-05-15T22:13:44Z","updated_at":"2018-05-15T22:13:44Z","author_association":"OWNER","body":"Thanks @tluckett77! Dang, sorry to hear it took you a while to find this one.\r\n\r\nI think I definitely need to add an FAQ for this issue as well -- I tried to put that information in the error message that you pasted, but it looks like that wasn't helpful."}}
{"actor":{"display_login":"brianegan"}}