upgradeDialog method
Implementation
Widget upgradeDialog(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
margin: const EdgeInsets.only(left: 20, right: 20),
decoration: const ShapeDecoration(
color: Color(0xfff2f2f2),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(
Radius.circular(10),
),
),
),
child: Column(
children: [
Container(
height: 250,
decoration: const BoxDecoration(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10),
topRight: Radius.circular(10)),
image: DecorationImage(
image: AssetImage('images/head_icon.png'),
fit: BoxFit.cover,
)),
),
const SizedBox(
height: 20,
),
Container(
padding: const EdgeInsets.only(left: 10, right: 10),
width: double.infinity,
child: const Text(
'本次更新',
style: TextStyle(
fontSize: 20,
color: Color(0xFF2D2D2D),
decoration: TextDecoration.none),
textAlign: TextAlign.left,
),
),
const SizedBox(
height: 15,
),
Container(
padding: const EdgeInsets.only(left: 10, right: 10),
width: double.infinity,
child: const Text(
'解决了一些已知问题',
style: TextStyle(
fontSize: 16,
color: Color(0xFF333333),
decoration: TextDecoration.none),
textAlign: TextAlign.left,
),
),
const SizedBox(
height: 20,
),
const Divider(),
Container(
height: 40,
margin: const EdgeInsets.only(bottom: 15),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
TextButton(
onPressed: () {
Navigator.of(context).pop();
confirmCallBack!();
},
child: const Text(
'升级',
style: TextStyle(fontSize: 18),
),
),
const VerticalDivider(
color: Colors.grey,
width: 1,
),
TextButton(
onPressed: () {
Navigator.of(context).pop();
cancelCallBack!();
},
child: const Text('暂不升级', style: TextStyle(fontSize: 18))),
],
),
)
],
),
)
],
);
}