Files
Reboot-Launcher/lib/src/widget/shared/warning_info.dart
2022-10-16 22:52:17 +02:00

29 lines
639 B
Dart

import 'package:fluent_ui/fluent_ui.dart';
class WarningInfo extends StatelessWidget {
final String text;
final VoidCallback onPressed;
final IconData icon;
final InfoBarSeverity severity;
const WarningInfo(
{Key? key,
required this.text,
required this.icon,
required this.onPressed,
this.severity = InfoBarSeverity.info})
: super(key: key);
@override
Widget build(BuildContext context) {
return InfoBar(
severity: severity,
title: Text(text),
action: IconButton(
icon: Icon(icon),
onPressed: onPressed
)
);
}
}