AboutDialog
AboutDialog用于描述当前App信息,底部提供2个按钮:查看许可按钮和关闭按钮。AboutDialog需要和showAboutDialog配合使用,用法如下:
showAboutDialog(
context: context,
applicationIcon: Image.network(
'https://tse4-mm.cn.bing.net/th/id/OIP-C.hnTnpgY0VQ84QqCZ_f7x0wHaGg?pid=ImgDet&rs=1'
height: 100,
width: 100,
),
applicationName: '应用程序',
applicationVersion: '1.0.0',
applicationLegalese: 'copyright flutter初学者',
children: <Widget>[
Container(
height: 30,
color: Colors.red,
child: Text('item one'),
),
Container(
height: 30,
color: Colors.blue,
child: Text('item two'),
),
Container(
height: 30,
color: Colors.green,
child: Text('item three'),
)
],
);
效果如下:
属性说明如下:
- applicationIcon:应用程序的图标。
- applicationName:应用程序名称。
- applicationVersion:应用程序版本。
- applicationLegalese:著作权(copyright)的提示。
children:位置如上图的红蓝绿色的位置。
所有的属性都需要手动设置,不是自动获取的。