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 CupertinoAlertDialog( title: Text(title!), content: Text(tipTitle!), actions: [ CupertinoDialogAction( child: Text(TranslationLoader.lanKeys!.cancel!.tr), onPressed: () { if (cancelClick != null) { cancelClick!(); } }, ), CupertinoDialogAction( child: Text(TranslationLoader.lanKeys!.sure!.tr), onPressed: () { if (sureClick != null) { sureClick!(); } }, ), ], ); return Card( color: const Color(0x00FFFFFF), child: Builder( builder: (context) { // return Theme( // data: ThemeData.light(), // child: CupertinoAlertDialog( // title: Text(title!), // content: Column( // children: [ // const SizedBox( // height: 10, // ), // Column( // children: [ // Text(tipTitle!, style: TextStyle(fontSize: 24.sp)) // ], // ) // ], // ), // actions: [ // CupertinoDialogAction( // child: Text( // TranslationLoader.lanKeys!.cancel!.tr, // style: const TextStyle(color: Colors.black), // ), // onPressed: () { // // Navigator.pop(context); // 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); // }, // ), // ], // ), // ); } ), ); } }