You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi
I'm also facing this problem , I have tried #54 solution that move app_state.dart to root directory , but it didn't make sense.
Here is my error trace:
I/flutter (27168): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (27168): The following StoreProviderError was thrown building Builder:
I/flutter (27168): Error: No StoreProvider<dynamic> found. To fix, please try:
I/flutter (27168):
I/flutter (27168): * Using Dart 2 (required) by using the --preview-dart-2 flag
I/flutter (27168): * Wrapping your MaterialApp with the StoreProvider<State>,
I/flutter (27168): rather than an individual Route
I/flutter (27168): * Providing full type information to your Store<State>,
I/flutter (27168): StoreProvider<State> and StoreConnector<State, ViewModel>
I/flutter (27168): * Ensure you are using consistent and complete imports.
I/flutter (27168): E.g. always use `import 'package:my_app/app_state.dart';
I/flutter (27168):
I/flutter (27168): If none of these solutions work, please file a bug at:
I/flutter (27168): https://github.com/brianegan/flutter_redux/issues/new
I/flutter (27168):
I/flutter (27168): When the exception was thrown, this was the stack:
Here is my code
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
final Store<MainState> store = new Store<MainState>(
appReducer,
initialState: new MainState(
user: User.empty(),
)
);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return new StoreProvider<MainState>(
store: store,
child: new MaterialApp(
localizationsDelegates: [
// ... app-specific localization delegate[s] here
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
LocalizationDelegate.delegate,
],
supportedLocales: [
const Locale('en', 'US'), // English
const Locale('zh', 'CH'), // Chinese
// ... other locales the app supports
],
routes:{
RoutesName.routesHomePage: (context)=> new HomePage(),
RoutesName.routesWelcomePage: (context)=> new WelcomePage(),
},
// theme: defaultTheme,
theme: ThemeData.dark().copyWith(primaryTextTheme: new TextTheme(
title: new TextStyle(
fontFamily: 'Ubuntu'
),
)),
// home: new HomePage(this.userprovider)
)
);
}
}
Looking forward for your reply .thx.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Hi
I'm also facing this problem , I have tried #54 solution that move app_state.dart to root directory , but it didn't make sense.
Here is my error trace:
Here is my code
Looking forward for your reply .thx.
The text was updated successfully, but these errors were encountered: