Simply implement snippet running.

This commit is contained in:
LollipopKit
2021-11-06 14:05:03 +08:00
parent 7c34530821
commit e0fb591dea
17 changed files with 305 additions and 34 deletions

View File

@@ -15,13 +15,13 @@ bool isDarkMode(BuildContext context) =>
void showSnackBar(BuildContext context, Widget child) =>
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: child));
void showSnackBarWithAction(
BuildContext context, String content, String action, Function onTap) {
void showSnackBarWithAction(BuildContext context, String content, String action,
GestureTapCallback onTap) {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(content),
action: SnackBarAction(
label: action,
onPressed: () => onTap,
onPressed: onTap,
),
));
}