DiscoverModule/lib/custom_widget/show_alert.dart

34 lines
707 B
Dart
Raw Permalink Normal View History

2024-05-20 10:29:02 +00:00
import 'package:discover_module/custom_widget/text.dart';
import 'package:flutter/material.dart';
class Alert extends StatefulWidget {
2024-05-21 08:40:44 +00:00
Alert({super.key, required this.data});
String? data;
2024-05-20 10:29:02 +00:00
@override
State<Alert> createState() => _AlertState();
}
class _AlertState extends State<Alert> {
@override
Widget build(BuildContext context) {
return AlertDialog(
title: Text1(
title: "Alert",
txtfont: 22.0,
),
content: Text1(
2024-05-21 08:40:44 +00:00
title: widget.data!,
2024-05-20 10:29:02 +00:00
txtfont: 18.0,
),
actions: [
TextButton(
onPressed: () {
Navigator.pop(context);
},
child: Text("Cancel"))
],
);
}
}