class MyApp extends StatelessWidget { const MyApp({Key key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp( title: 'IconTheme图标主题', home: Scaffold( appBar: AppBar( title: Text('IconTheme图标主题'), ), body: Column( children: [ IconTheme( data: IconThemeData( color: Colors.green, //透明度 opacity: 100), child: Row( children: [ Icon( Icons.favorite_border, size: 28.0, ), Padding( padding: EdgeInsets.all(20.0), child: Text( '喜欢', style: TextStyle(fontSize: 28.0), ), ) ], )) ], ), ), ); } }
部分素材资源来源网站,本站提供免费下载,如有侵权请联系站长马上删除!