77 lines
2.1 KiB
Dart
77 lines
2.1 KiB
Dart
import 'package:flutter/cupertino.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
|
|
import '../translations/trans_lib.dart';
|
|
|
|
class ShowIosTipView extends StatelessWidget {
|
|
String? title;
|
|
String? tipTitle;
|
|
Function()? sureClick;
|
|
Function()? cancelClick;
|
|
|
|
ShowIosTipView(
|
|
{Key? key,
|
|
this.title,
|
|
this.tipTitle,
|
|
this.sureClick,
|
|
this.cancelClick})
|
|
: super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
color: const Color(0x00FFFFFF),
|
|
child: Builder(
|
|
builder: (context) {
|
|
return Theme(
|
|
data: ThemeData.light(),
|
|
child: CupertinoAlertDialog(
|
|
title: Text(title!),
|
|
content: Column(
|
|
children: <Widget>[
|
|
const SizedBox(
|
|
height: 10,
|
|
),
|
|
Column(
|
|
children: [
|
|
Text(tipTitle!, style: TextStyle(fontSize: 24.sp))
|
|
],
|
|
)
|
|
],
|
|
),
|
|
actions: <Widget>[
|
|
CupertinoDialogAction(
|
|
child: Text(
|
|
TranslationLoader.lanKeys!.cancel!.tr,
|
|
style: const TextStyle(color: Colors.black),
|
|
),
|
|
onPressed: () {
|
|
// Navigator.pop(context);
|
|
// print("取消");
|
|
if (cancelClick != null) {
|
|
cancelClick!();
|
|
}
|
|
},
|
|
),
|
|
CupertinoDialogAction(
|
|
child: Text(TranslationLoader.lanKeys!.sure!.tr,
|
|
style: const TextStyle(color: Colors.black)),
|
|
onPressed: () {
|
|
if (sureClick != null) {
|
|
sureClick!();
|
|
}
|
|
// Navigator.pop(context);
|
|
// print("确定");
|
|
},
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
),
|
|
);
|
|
}
|
|
}
|