4.1 Material Design字体图标的使用(icon)
1.源代码
import 'package:flutter/material.dart';
void main () => runApp(MyApp());
class MyApp extends StatelessWidget{
@override
Widget build(BuildContext context ){
return MaterialApp(
title:'All Widget Usages',
home:Scaffold(
body:
Center(
child:
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(Icons.airline_seat_legroom_normal,color: Colors.green,),
Icon(Icons.access_alarms,color: Colors.green,),
Icon(Icons.aspect_ratio,color: Colors.green,),
],
),
)
),
);
}
}
2.解释源代码
import 'package:flutter/material.dart';
void main () => runApp(MyApp());
class MyApp extends StatelessWidget{
@override
Widget build(BuildContext context ){
return MaterialApp(
title:'All Widget Usages',
home:Scaffold(
body:
Center(
child:
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(Icons.airline_seat_legroom_normal,color: Colors.green,),
Icon(Icons.access_alarms,color: Colors.green,),
Icon(Icons.aspect_ratio,color: Colors.green,),
],
),
)
),
);
}
}
3.效果图