import 'package:flutter/cupertino.dart'; import 'package:project_telephony/utils/headers.dart'; class Centertipsalterwidget extends StatefulWidget { final String title; final String desText; const Centertipsalterwidget( {Key? key, required this.desText, required this.title}) : super(key: key); @override _CentertipsalterwidgetState createState() => _CentertipsalterwidgetState(); } class _CentertipsalterwidgetState extends State { @override Widget build(BuildContext context) { return CupertinoAlertDialog( title: Text(widget.title), content: Column(children: [ SizedBox( height: 10.w, ), Align( alignment: const Alignment(0, 0), child: Text(widget.desText), ) ]), actions: [ CupertinoDialogAction( child: const Text( '取消', style: TextStyle(color: Color(0xFF999999)), ), onPressed: () { Navigator.pop(context); }, ), CupertinoDialogAction( child: const Text('确定'), onPressed: () { Navigator.pop(context); }, ) ], ); } }