DiscoverModule/lib/custom_widget/show_alert.dart

34 lines
707 B
Dart

import 'package:discover_module/custom_widget/text.dart';
import 'package:flutter/material.dart';
class Alert extends StatefulWidget {
Alert({super.key, required this.data});
String? data;
@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(
title: widget.data!,
txtfont: 18.0,
),
actions: [
TextButton(
onPressed: () {
Navigator.pop(context);
},
child: Text("Cancel"))
],
);
}
}