opt: func

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-05-07 13:07:15 +08:00
parent 6353ecc13e
commit 286193f08f
99 changed files with 204 additions and 270 deletions

View File

@@ -57,7 +57,7 @@ class Utils {
static bool? _isIpad;
static FutureOr<bool> isIpad() async {
static Future<bool> isIpad() async {
if (Platform.isIOS.not) {
return false;
}
@@ -164,11 +164,11 @@ class Utils {
return '${randomTraceId.toString()}:${randomTraceId.toString().substring(16, 32)}:0:0';
}
static Future copyText(
static void copyText(
String text, {
bool needToast = true,
String? toastText,
}) async {
}) {
Clipboard.setData(ClipboardData(text: text));
if (needToast) {
SmartDialog.showToast(toastText ?? '已复制');