@@ -5,6 +5,8 @@ import 'package:efox_flutter/config/theme.dart' show AppTheme;
55import 'component/tabs.dart' as TabIndex;
66import 'mine/index.dart' as MyIndex;
77import 'app_login/index.dart' as LoginIndex;
8+ import 'comment/index.dart' as CommentIndex;
9+ import 'library/index.dart' as LibraryIndex;
810
911import 'package:efox_flutter/store/index.dart' show Store, UserModel;
1012
@@ -34,10 +36,17 @@ class _IndexState extends State<Index> {
3436 shape: CircularNotchedRectangle (),
3537 clipBehavior: Clip .antiAlias,
3638 child: BottomNavigationBar (
39+ type: BottomNavigationBarType .fixed,
3740 items: < BottomNavigationBarItem > [
3841 BottomNavigationBarItem (
3942 title: Text (AppLocalizations .$t ('title_component' )),
4043 icon: Icon (Icons .dashboard)),
44+ BottomNavigationBarItem (
45+ title: Text (AppLocalizations .$t ('title_comment' )),
46+ icon: Icon (Icons .comment)),
47+ BottomNavigationBarItem (
48+ title: Text (AppLocalizations .$t ('title_library' )),
49+ icon: Icon (Icons .library_add)),
4150 BottomNavigationBarItem (
4251 title: Text (AppLocalizations .$t ('title_my' )),
4352 icon: Icon (Icons .person_outline)),
@@ -127,7 +136,7 @@ class _IndexState extends State<Index> {
127136 );
128137 }
129138
130- Widget _floatingActionButton () {
139+ Widget _floatingActionButton (context ) {
131140 return Store .connect <UserModel >(
132141 builder: (context, child, model) {
133142 return FloatingActionButton (
@@ -146,6 +155,10 @@ class _IndexState extends State<Index> {
146155 }
147156 )
148157 );
158+ } else {
159+ Scaffold .of (context).showSnackBar (SnackBar (
160+ content: Text ('已star' ),
161+ ));
149162 }
150163 }
151164 },
@@ -175,7 +188,7 @@ class _IndexState extends State<Index> {
175188 drawer: renderDrawer (),
176189 bottomNavigationBar: _bottomNavigationBar (),
177190 floatingActionButtonLocation: FloatingActionButtonLocation .centerDocked,
178- floatingActionButton: _floatingActionButton (),
191+ floatingActionButton: _floatingActionButton (context ),
179192 body: PageView (
180193 controller: _pageController,
181194 physics: NeverScrollableScrollPhysics (),
@@ -186,6 +199,8 @@ class _IndexState extends State<Index> {
186199 },
187200 children: < Widget > [
188201 TabIndex .Index (),
202+ CommentIndex .Index (),
203+ LibraryIndex .Index (),
189204 MyIndex .Index (),
190205 ],
191206 ),
0 commit comments