You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
project_telephony/lib/ui/widget/centertipsalterwidget.dart

50 lines
1.2 KiB

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.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<Centertipsalterwidget> {
@override
Widget build(BuildContext context) {
return CupertinoAlertDialog(
title: Text(widget.title),
content: Column(children: [
SizedBox(
height: 10.w,
),
Align(
child: Text(widget.desText),
alignment: const Alignment(0, 0),
)
]),
actions: [
CupertinoDialogAction(
child: const Text(
'取消',
style: TextStyle(color: Color(0xFF999999)),
),
onPressed: () {
Navigator.pop(context);
},
),
CupertinoDialogAction(
child: const Text('确定'),
onPressed: () {
Navigator.pop(context);
},
)
],
);
}
}