74 lines
2.5 KiB
Dart
74 lines
2.5 KiB
Dart
import 'package:ef/ef.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:vbvs_app/common/util/FitTool.dart';
|
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
|
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
|
|
|
|
class ConfirmDialog extends GetView {
|
|
ConfirmDialog();
|
|
|
|
Future showConfirmCustomDialog(BuildContext context,
|
|
{String name = "是否确认取消?"}) async {
|
|
// Completer<String> completer = Completer<String>();
|
|
ThemeController themeController = Get.find();
|
|
TextEditingController textEditingController = TextEditingController();
|
|
return showDialog(
|
|
context: context,
|
|
barrierDismissible: false,
|
|
builder: (BuildContext context) {
|
|
return Dialog(
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
),
|
|
child: Container(
|
|
width: 340,
|
|
padding: EdgeInsets.fromLTRB(16, 0, 16, 16),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
Container(alignment: Alignment.centerRight, child: closeIcon),
|
|
Center(
|
|
child: Text(
|
|
'${name}',
|
|
style: TextStyle(fontSize: 16),
|
|
),
|
|
),
|
|
SizedBox(height: 30),
|
|
Container(
|
|
margin: EdgeInsets.only(top: 50.rpx, bottom: 40.rpx),
|
|
alignment: Alignment.center,
|
|
child: InkWell(
|
|
onTap: () {
|
|
Get.back(result: "confirm");
|
|
},
|
|
child: Container(
|
|
width: 280.rpx,
|
|
height: 60.rpx,
|
|
alignment: Alignment.center,
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(6),
|
|
color: stringToColor("#D3B684")),
|
|
child: Text(
|
|
'确定',
|
|
style: TextStyle( color: themeController.currentColor.sc3, fontSize: 30.rpx),
|
|
),
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
},
|
|
);
|
|
// return completer.future;
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
// TODO: implement build
|
|
return Container();
|
|
}
|
|
}
|