88 lines
3.0 KiB
Dart
88 lines
3.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class CancelDialog extends StatefulWidget {
|
|
final Function onTap;
|
|
|
|
CancelDialog({required this.onTap});
|
|
|
|
@override
|
|
State<CancelDialog> createState() => _CancelDialogState();
|
|
}
|
|
|
|
class _CancelDialogState extends State<CancelDialog> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Material(
|
|
type: MaterialType.transparency, //透明类型
|
|
color: Color(0x1A000000),
|
|
child: Center(
|
|
child: ClipRRect(
|
|
borderRadius: BorderRadius.circular(7.0),
|
|
child: Container(
|
|
width: 247,
|
|
color: Color(0xFF272727),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.only(top: 28),
|
|
child: Text(
|
|
'确认注销账号吗?\n 账号所有数据都将删除!',
|
|
textAlign: TextAlign.center,
|
|
style: TextStyle(fontSize: 15, color: Color(0xFFBABABA)),
|
|
),
|
|
),
|
|
Container(
|
|
margin: EdgeInsets.only(top: 38, left: 22, right: 22, bottom: 19),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
GestureDetector(
|
|
onTap: () {
|
|
Navigator.pop(context);
|
|
},
|
|
child: Container(
|
|
width: 80,
|
|
height: 28,
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.all(Radius.circular(14)),
|
|
border: Border.all(color: Color(0xFF074CE7), width: 1),
|
|
),
|
|
child: Text(
|
|
'取消',
|
|
style: TextStyle(color: Color(0xFF074CE7), fontSize: 12),
|
|
),
|
|
),
|
|
),
|
|
GestureDetector(
|
|
onTap: () {
|
|
Navigator.pop(context);
|
|
widget.onTap();
|
|
},
|
|
child: Container(
|
|
width: 80,
|
|
height: 28,
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
color: Color(0xFF074CE7),
|
|
borderRadius: BorderRadius.all(Radius.circular(14)),
|
|
),
|
|
child: Text(
|
|
'确定',
|
|
style: TextStyle(color: Colors.white, fontSize: 12),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|