mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-06-03 16:26:15 +08:00
55 lines
1.3 KiB
Dart
55 lines
1.3 KiB
Dart
/*
|
|
* @Author: xiaojia.dxj
|
|
* @Date: 2018-12-15 16:07:59
|
|
* @Last Modified by: xiaojia.dxj
|
|
* @Last Modified time: 2018-12-15 16:49:17
|
|
*/
|
|
import 'package:flutter/material.dart';
|
|
|
|
class IconThemeDemo extends StatelessWidget {
|
|
Color curColor = Colors.white;
|
|
|
|
IconThemeDemo({Key key, this.curColor}) : super();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AppBar(
|
|
actions: <Widget>[
|
|
new IconTheme(
|
|
data: new IconThemeData(color: curColor, opacity: 3.0),
|
|
child: Container(
|
|
padding: EdgeInsets.all(20.0), child: Icon(Icons.equalizer))),
|
|
],
|
|
);
|
|
}
|
|
}
|
|
|
|
class IconThemeDemo2 extends StatelessWidget {
|
|
Color curColor = Colors.white;
|
|
final double curSize;
|
|
|
|
IconThemeDemo2({Key key, this.curColor, this.curSize}) : super();
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AppBar(
|
|
actions: <Widget>[
|
|
new IconTheme(
|
|
data: new IconThemeData(color: curColor, opacity: 3.0),
|
|
child: Row(
|
|
children: <Widget>[
|
|
Icon(
|
|
Icons.favorite_border,
|
|
size: curSize,
|
|
),
|
|
Padding(
|
|
padding: const EdgeInsets.all(20.0),
|
|
child: Text('喜欢'),
|
|
),
|
|
],
|
|
)),
|
|
],
|
|
);
|
|
}
|
|
}
|