@@ -8,7 +8,7 @@ import 'app_login/index.dart' as LoginIndex;
8
8
import 'comment/index.dart' as CommentIndex;
9
9
import 'library/index.dart' as LibraryIndex;
10
10
11
- import 'package:efox_flutter/store/index.dart' show Store, UserModel ;
11
+ import 'package:efox_flutter/store/index.dart' ;
12
12
13
13
class Index extends StatefulWidget {
14
14
@override
@@ -46,22 +46,22 @@ class _IndexState extends State<Index> {
46
46
BottomNavigationBarItem (
47
47
title: Text (AppLocalizations .$t ('title_component' )),
48
48
icon: Icon (Icons .dashboard)),
49
- BottomNavigationBarItem (
49
+ /* BottomNavigationBarItem(
50
50
title: Text(AppLocalizations.$t('title_comment')),
51
51
icon: Icon(Icons.comment)),
52
52
BottomNavigationBarItem(
53
53
title: Text(AppLocalizations.$t('title_library')),
54
- icon: Icon (Icons .library_add)),
54
+ icon: Icon(Icons.library_add)),*/
55
55
BottomNavigationBarItem (
56
56
title: Text (AppLocalizations .$t ('title_my' )),
57
57
icon: Icon (Icons .person_outline)),
58
58
],
59
59
// type: BottomNavigationBarType.fixed,
60
60
currentIndex: _currentIndex,
61
61
onTap: (int index) {
62
- if (index == 1 && _currentIndex != index) {
62
+ /* if (index == 1 && _currentIndex != index) {
63
63
Store.value<UserModel>(context).getIssueFlutterUI();
64
- }
64
+ }*/
65
65
_pageController.jumpToPage (index);
66
66
},
67
67
),
@@ -104,7 +104,7 @@ class _IndexState extends State<Index> {
104
104
renderDrawer () {
105
105
print ('renderDrawer $context ' );
106
106
return Drawer (
107
- child: Store . connect <UserModel >(builder: (context, child, model) {
107
+ child: Consumer <UserModel >(builder: (context, model,child ) {
108
108
return Column (
109
109
crossAxisAlignment: CrossAxisAlignment .start,
110
110
children: < Widget > [
@@ -145,7 +145,7 @@ class _IndexState extends State<Index> {
145
145
}
146
146
147
147
Widget _floatingActionButton (context) {
148
- return Store . connect <UserModel >(builder: (context, child, model) {
148
+ return Consumer <UserModel >(builder: (context, model,child ) {
149
149
return FloatingActionButton (
150
150
backgroundColor: Theme .of (context).primaryColor,
151
151
onPressed: () {
@@ -184,12 +184,12 @@ class _IndexState extends State<Index> {
184
184
185
185
@override
186
186
Widget build (BuildContext context) {
187
- Store .setWidgetCtx (context); // 初始化scaffold的上下文作为全局上下文,提供弹窗等使用。
187
+ // Store.setWidgetCtx(context); // 初始化scaffold的上下文作为全局上下文,提供弹窗等使用。
188
188
return Scaffold (
189
189
drawer: renderDrawer (),
190
190
bottomNavigationBar: _bottomNavigationBar (),
191
- floatingActionButtonLocation: FloatingActionButtonLocation .centerDocked,
192
- floatingActionButton: _floatingActionButton (context),
191
+ // floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
192
+ // floatingActionButton: _floatingActionButton(context),
193
193
body: PageView (
194
194
controller: _pageController,
195
195
physics: NeverScrollableScrollPhysics (),
@@ -200,8 +200,8 @@ class _IndexState extends State<Index> {
200
200
},
201
201
children: < Widget > [
202
202
TabIndex .Index (),
203
- CommentIndex .Index (),
204
- LibraryIndex .Index (),
203
+ // CommentIndex.Index(),
204
+ // LibraryIndex.Index(),
205
205
MyIndex .Index (),
206
206
],
207
207
),
0 commit comments