@@ -8,7 +8,7 @@ import 'app_login/index.dart' as LoginIndex;
88import 'comment/index.dart' as CommentIndex;
99import 'library/index.dart' as LibraryIndex;
1010
11- import 'package:efox_flutter/store/index.dart' show Store, UserModel ;
11+ import 'package:efox_flutter/store/index.dart' ;
1212
1313class Index extends StatefulWidget {
1414 @override
@@ -46,22 +46,22 @@ class _IndexState extends State<Index> {
4646 BottomNavigationBarItem (
4747 title: Text (AppLocalizations .$t ('title_component' )),
4848 icon: Icon (Icons .dashboard)),
49- BottomNavigationBarItem (
49+ /* BottomNavigationBarItem(
5050 title: Text(AppLocalizations.$t('title_comment')),
5151 icon: Icon(Icons.comment)),
5252 BottomNavigationBarItem(
5353 title: Text(AppLocalizations.$t('title_library')),
54- icon: Icon (Icons .library_add)),
54+ icon: Icon(Icons.library_add)),*/
5555 BottomNavigationBarItem (
5656 title: Text (AppLocalizations .$t ('title_my' )),
5757 icon: Icon (Icons .person_outline)),
5858 ],
5959 // type: BottomNavigationBarType.fixed,
6060 currentIndex: _currentIndex,
6161 onTap: (int index) {
62- if (index == 1 && _currentIndex != index) {
62+ /* if (index == 1 && _currentIndex != index) {
6363 Store.value<UserModel>(context).getIssueFlutterUI();
64- }
64+ }*/
6565 _pageController.jumpToPage (index);
6666 },
6767 ),
@@ -104,7 +104,7 @@ class _IndexState extends State<Index> {
104104 renderDrawer () {
105105 print ('renderDrawer $context ' );
106106 return Drawer (
107- child: Store . connect <UserModel >(builder: (context, child, model) {
107+ child: Consumer <UserModel >(builder: (context, model,child ) {
108108 return Column (
109109 crossAxisAlignment: CrossAxisAlignment .start,
110110 children: < Widget > [
@@ -145,7 +145,7 @@ class _IndexState extends State<Index> {
145145 }
146146
147147 Widget _floatingActionButton (context) {
148- return Store . connect <UserModel >(builder: (context, child, model) {
148+ return Consumer <UserModel >(builder: (context, model,child ) {
149149 return FloatingActionButton (
150150 backgroundColor: Theme .of (context).primaryColor,
151151 onPressed: () {
@@ -184,12 +184,12 @@ class _IndexState extends State<Index> {
184184
185185 @override
186186 Widget build (BuildContext context) {
187- Store .setWidgetCtx (context); // 初始化scaffold的上下文作为全局上下文,提供弹窗等使用。
187+ // Store.setWidgetCtx(context); // 初始化scaffold的上下文作为全局上下文,提供弹窗等使用。
188188 return Scaffold (
189189 drawer: renderDrawer (),
190190 bottomNavigationBar: _bottomNavigationBar (),
191- floatingActionButtonLocation: FloatingActionButtonLocation .centerDocked,
192- floatingActionButton: _floatingActionButton (context),
191+ // floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
192+ // floatingActionButton: _floatingActionButton(context),
193193 body: PageView (
194194 controller: _pageController,
195195 physics: NeverScrollableScrollPhysics (),
@@ -200,8 +200,8 @@ class _IndexState extends State<Index> {
200200 },
201201 children: < Widget > [
202202 TabIndex .Index (),
203- CommentIndex .Index (),
204- LibraryIndex .Index (),
203+ // CommentIndex.Index(),
204+ // LibraryIndex.Index(),
205205 MyIndex .Index (),
206206 ],
207207 ),
0 commit comments