Files
xiaojia22326@163.com 438977a2d5 delete code
2019-01-12 15:56:59 +08:00

63 lines
1.6 KiB
Dart

/**
* Created with Android Studio.
* User: ryan
* Date: 2019/1/1
* Time: 下午10:00
* email: zhu.yan@alibaba-inc.com
* tartget: BottomNavigationBarItem 的示例
*/
import 'package:flutter/material.dart';
/*
* BottomNavigationBarItem 默认的实例,无状态
* */
class BottomNavigationBarItemLessDefault extends StatelessWidget {
final widget;
final parent;
const BottomNavigationBarItemLessDefault([this.widget, this.parent])
: super();
@override
Widget build(BuildContext context) {
return new SizedBox(
height: 100,
child: Scaffold(
bottomNavigationBar: new BottomNavigationBar(items: [
new BottomNavigationBarItem(
icon: new Icon(Icons.laptop_chromebook),
title: new Text("主页"),
backgroundColor: Colors.red
),
new BottomNavigationBarItem(
icon: new Icon(Icons.list), title: new Text("分类"),backgroundColor: Colors.grey),
new BottomNavigationBarItem(
icon: new Icon(Icons.local_grocery_store), title: new Text("购物车")),
new BottomNavigationBarItem(icon: new Icon(Icons.person), title: new Text("我的"))
],
//onTap: onTap,
//currentIndex: page
),
)
);
}
}
//backgroundColor: Colors.grey,
//
//// body: new PageView(
////
//// children: [
//// new Index(),
//// new Classify(),
//// new Shopping(),
//// new Myself()
//// ],
////
//// controller: pageController,
//// onPageChanged: onPageChanged
//// ),
//