From fd38286328a99cf35a3f68429812a4cca0b676a0 Mon Sep 17 00:00:00 2001 From: "yifeng.yl" Date: Sat, 12 Jan 2019 15:43:59 +0800 Subject: [PATCH] fix bur --- lib/common/widget_demo.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/common/widget_demo.dart b/lib/common/widget_demo.dart index 34aaaec2..b7c1759d 100644 --- a/lib/common/widget_demo.dart +++ b/lib/common/widget_demo.dart @@ -36,6 +36,7 @@ class _WidgetDemoState extends State { Color _collectionColor; List widgetDemosList = new WidgetDemoList().getDemos(); String _router = ''; + String _collText = ''; void showInSnackBar(String value) { Fluttertoast.showToast( @@ -147,10 +148,10 @@ class _WidgetDemoState extends State { Widget build(BuildContext context) { if (_hasCollected) { _collectionColor = Colors.red; - _router='取消收藏'; + _collText='取消收藏'; } else { _collectionColor =null; - _router='组件收藏'; + _collText='组件收藏'; } return Scaffold( appBar: AppBar( @@ -186,7 +187,7 @@ class _WidgetDemoState extends State { value: 'collection', child: ListTile( leading: Icon(Icons.star,size: 22.0,color: _collectionColor,), - title: Text(_router), + title: Text(_collText), ), ),