1- import 'dart:async' ;
2-
31import 'package:flutter/material.dart' ;
4- import 'package:flutter_redux/flutter_redux.dart' ;
5- import 'package:gsy_github_app_flutter/common/model/User.dart' ;
6- import 'package:gsy_github_app_flutter/common/redux/GSYState.dart' ;
7- import 'package:gsy_github_app_flutter/common/redux/UserRedux.dart' ;
82import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart' ;
3+ import 'package:gsy_github_app_flutter/page/DynamicPage.dart' ;
4+ import 'package:gsy_github_app_flutter/page/MyPage.dart' ;
5+ import 'package:gsy_github_app_flutter/page/TrendPage.dart' ;
96import 'package:gsy_github_app_flutter/widget/GSYTabBarWidget.dart' ;
107
118class HomePage extends StatelessWidget {
9+
10+ static final String sName = "home" ;
11+
1212 // This widget is the root of your application.
1313 @override
1414 Widget build (BuildContext context) {
@@ -20,30 +20,9 @@ class HomePage extends StatelessWidget {
2020 new Tab (icon: new Icon (Icons .directions_bike)),
2121 ],
2222 tabViews: [
23- new StoreBuilder <GSYState >(
24- builder: (context, store) {
25- new Future .delayed (const Duration (seconds: 2 ), () {
26- User user = store.state.userInfo;
27- user.login = "new login" ;
28- user.name = "new name" ;
29- store.dispatch (new UpdateUserAction (user));
30- });
31- return new Text (
32- store.state.userInfo.login,
33- style: Theme .of (context).textTheme.display1,
34- );;
35- },
36- ),
37- new StoreConnector <GSYState , String >(
38- converter: (store) => store.state.userInfo.name,
39- builder: (context, count) {
40- return new Text (
41- count,
42- style: Theme .of (context).textTheme.display1,
43- );
44- },
45- ),
46- new Icon (Icons .directions_bike),
23+ new DynamicPage (),
24+ new TrendPage (),
25+ new MyPage (),
4726 ],
4827 backgroundColor: GSYColors .primarySwatch,
4928 indicatorColor: Colors .white,
0 commit comments