AboutDialog

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:位置如上图的红蓝绿色的位置。

所有的属性都需要手动设置,不是自动获取的。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值