More redux work. User creation/retrieve

This commit is contained in:
vjrj 2018-06-27 19:46:02 +02:00
parent 2c67b68512
commit 2dfa745c6a
16 changed files with 212 additions and 110 deletions

View file

@ -1,16 +1,17 @@
import 'package:comunes_flutter/comunes_flutter.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:redux/redux.dart';
import 'activeFires.dart';
import 'generated/i18n.dart';
import 'homePage.dart';
import 'introPage.dart';
import 'models/appState.dart';
import 'redux/actions.dart';
import 'sandbox.dart';
import 'theme.dart';
import 'package:flutter_redux/flutter_redux.dart';
import 'package:redux/redux.dart';
import 'models/appState.dart';
class FiresApp extends StatelessWidget {
static final WidgetBuilder introWidget = (context) => new IntroPage();
@ -30,20 +31,25 @@ class FiresApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new StoreProvider(store: this.store, child:
new MaterialApp(
localizationsDelegates: [
S.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
supportedLocales: S.delegate.supportedLocales,
localeResolutionCallback:
S.delegate.resolution(fallback: new Locale("en", "")),
home: new MaterialAppWithIntroHome(
introWidget, continueWidget, 'showInitialWizard-2018-06-27-01'),
onGenerateTitle: (context) => S.of(context).appName,
theme: firesTheme,
routes: routes));
return new StoreProvider(
store: this.store,
child: new MaterialApp(
localizationsDelegates: [
S.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
supportedLocales: S.delegate.supportedLocales,
localeResolutionCallback:
S.delegate.resolution(fallback: new Locale("en", "")),
home: new MaterialAppWithIntroHome(
introWidget, continueWidget, 'showInitialWizard-2018-06-27-01'),
onGenerateTitle: (context) {
String lang = Localizations.localeOf(context).languageCode;
this.store.dispatch(new OnUserLangAction(lang));
return S.of(context).appName;
},
theme: firesTheme,
routes: routes));
}
}