app-starlock/lib/tools/showIosTipView.dart

45 lines
950 B
Dart
Raw Permalink Normal View History

2024-08-19 15:24:14 +08:00
import 'package:flutter/cupertino.dart';
import 'package:get/get.dart';
class ShowIosTipView extends StatelessWidget {
ShowIosTipView(
{Key? key,
this.title,
this.tipTitle,
this.sureClick,
this.cancelClick})
: super(key: key);
2024-08-19 15:24:14 +08:00
String? title;
String? tipTitle;
Function()? sureClick;
Function()? cancelClick;
@override
Widget build(BuildContext context) {
2023-10-25 16:18:27 +08:00
return CupertinoAlertDialog(
title: Text(title!),
content: Text(tipTitle!),
actions: [
CupertinoDialogAction(
2024-07-26 09:57:44 +08:00
child: Text('取消'.tr),
2023-10-25 16:18:27 +08:00
onPressed: () {
if (cancelClick != null) {
cancelClick!();
}
},
),
CupertinoDialogAction(
2024-07-26 09:21:22 +08:00
child: Text('确定'.tr),
2023-10-25 16:18:27 +08:00
onPressed: () {
if (sureClick != null) {
sureClick!();
}
},
),
],
);
}
}