mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
new: rebuild impl
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:toolbox/view/widget/rebuild.dart';
|
||||
|
||||
extension SnackBarX on BuildContext {
|
||||
void showSnackBar(String text) =>
|
||||
@@ -22,12 +21,4 @@ extension SnackBarX on BuildContext {
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
void showRestartSnackbar({String? btn, String? msg}) {
|
||||
showSnackBarWithAction(
|
||||
msg ?? 'Need restart to take effect',
|
||||
btn ?? 'Restart',
|
||||
() => RebuildWidget.restartApp(this),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user