mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 19:22:22 +01:00
decoupled business logic from ui
This commit is contained in:
28
lib/src/widget/shared/warning_info.dart
Normal file
28
lib/src/widget/shared/warning_info.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
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
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user