Skip to content

Commit

Permalink
fix:
Browse files Browse the repository at this point in the history
  • Loading branch information
DeckeDeng committed Jan 12, 2019
2 parents 741f952 + 645deb3 commit 0b64cc0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/common/widget_demo.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class _WidgetDemoState extends State<WidgetDemo> {
Color _collectionColor;
List widgetDemosList = new WidgetDemoList().getDemos();
String _router = '';
String _collText = '';

void showInSnackBar(String value) {
Fluttertoast.showToast(
Expand Down Expand Up @@ -147,10 +148,10 @@ class _WidgetDemoState extends State<WidgetDemo> {
Widget build(BuildContext context) {
if (_hasCollected) {
_collectionColor = Colors.red;
_router='取消收藏';
_collText='取消收藏';
} else {
_collectionColor =null;
_router='组件收藏';
_collText='组件收藏';
}
return Scaffold(
appBar: AppBar(
Expand Down Expand Up @@ -186,7 +187,7 @@ class _WidgetDemoState extends State<WidgetDemo> {
value: 'collection',
child: ListTile(
leading: Icon(Icons.star,size: 22.0,color: _collectionColor,),
title: Text(_router),
title: Text(_collText),

),
),
Expand Down

0 comments on commit 0b64cc0

Please sign in to comment.