|
@@ -35,7 +35,6 @@ class _HomePageState extends State<HomePage> {
|
|
|
setState(() {
|
|
setState(() {
|
|
|
seasonList = list;
|
|
seasonList = list;
|
|
|
});
|
|
});
|
|
|
- print(seasonList);
|
|
|
|
|
} else {}
|
|
} else {}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -287,6 +286,7 @@ class _HomePageState extends State<HomePage> {
|
|
|
onTapHomeMenu: () {
|
|
onTapHomeMenu: () {
|
|
|
Navigator.push(context, new CupertinoPageRoute(builder: (context) => new TipList()));
|
|
Navigator.push(context, new CupertinoPageRoute(builder: (context) => new TipList()));
|
|
|
},
|
|
},
|
|
|
|
|
+ showBadge: true,
|
|
|
),
|
|
),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
@@ -302,7 +302,8 @@ class HomeMenu extends StatelessWidget {
|
|
|
final String icon;
|
|
final String icon;
|
|
|
final String title;
|
|
final String title;
|
|
|
final OnTapHomeMenu onTapHomeMenu;
|
|
final OnTapHomeMenu onTapHomeMenu;
|
|
|
- HomeMenu(this.icon, this.title, {this.onTapHomeMenu});
|
|
|
|
|
|
|
+ final bool showBadge;
|
|
|
|
|
+ HomeMenu(this.icon, this.title, {this.onTapHomeMenu, this.showBadge = false});
|
|
|
@override
|
|
@override
|
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
|
return Container(
|
|
return Container(
|
|
@@ -323,11 +324,28 @@ class HomeMenu extends StatelessWidget {
|
|
|
child: Column(
|
|
child: Column(
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
children: <Widget>[
|
|
children: <Widget>[
|
|
|
- Image.asset(
|
|
|
|
|
- icon,
|
|
|
|
|
- fit: BoxFit.contain,
|
|
|
|
|
|
|
+ Container(
|
|
|
width: 44,
|
|
width: 44,
|
|
|
height: 34,
|
|
height: 34,
|
|
|
|
|
+ child: Stack(
|
|
|
|
|
+ children: <Widget>[
|
|
|
|
|
+ Image.asset(
|
|
|
|
|
+ icon,
|
|
|
|
|
+ fit: BoxFit.contain,
|
|
|
|
|
+ width: 44,
|
|
|
|
|
+ height: 34,
|
|
|
|
|
+ ),
|
|
|
|
|
+ Positioned(
|
|
|
|
|
+ right: 0,
|
|
|
|
|
+ top: 0,
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ width: showBadge ? 10 : 0,
|
|
|
|
|
+ height: showBadge ? 10 : 0,
|
|
|
|
|
+ decoration: BoxDecoration(color: Color.fromARGB(255, 239, 0, 9), borderRadius: BorderRadius.all(Radius.circular(10))),
|
|
|
|
|
+ ),
|
|
|
|
|
+ )
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
Text(
|
|
Text(
|
|
|
title,
|
|
title,
|