update new version

This commit is contained in:
2025-12-29 22:19:48 +08:00
parent fb2603c6f0
commit b26a339d5c
18 changed files with 1113 additions and 293 deletions
+18
View File
@@ -0,0 +1,18 @@
import 'package:flutter/material.dart';
class UiUtils {
/// 全域通用的訊息提示
static void showMsg(BuildContext context, String message, {bool isError = false}) {
ScaffoldMessenger.of(context).removeCurrentSnackBar();
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(message),
backgroundColor: isError ? Colors.red.shade700 : Colors.blueGrey.shade800,
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
margin: const EdgeInsets.all(15),
duration: const Duration(seconds: 3),
),
);
}
}