mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-05-21 23:06:33 +08:00
@ -36,6 +36,7 @@ class _WidgetDemoState extends State<WidgetDemo> {
|
|||||||
Color _collectionColor;
|
Color _collectionColor;
|
||||||
List widgetDemosList = new WidgetDemoList().getDemos();
|
List widgetDemosList = new WidgetDemoList().getDemos();
|
||||||
String _router = '';
|
String _router = '';
|
||||||
|
String _collText = '';
|
||||||
|
|
||||||
void showInSnackBar(String value) {
|
void showInSnackBar(String value) {
|
||||||
Fluttertoast.showToast(
|
Fluttertoast.showToast(
|
||||||
@ -147,10 +148,10 @@ class _WidgetDemoState extends State<WidgetDemo> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (_hasCollected) {
|
if (_hasCollected) {
|
||||||
_collectionColor = Colors.red;
|
_collectionColor = Colors.red;
|
||||||
_router='取消收藏';
|
_collText='取消收藏';
|
||||||
} else {
|
} else {
|
||||||
_collectionColor =null;
|
_collectionColor =null;
|
||||||
_router='组件收藏';
|
_collText='组件收藏';
|
||||||
}
|
}
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
@ -186,7 +187,7 @@ class _WidgetDemoState extends State<WidgetDemo> {
|
|||||||
value: 'collection',
|
value: 'collection',
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
leading: Icon(Icons.star,size: 22.0,color: _collectionColor,),
|
leading: Icon(Icons.star,size: 22.0,color: _collectionColor,),
|
||||||
title: Text(_router),
|
title: Text(_collText),
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Reference in New Issue
Block a user