fix: 修复复制地址提示层级问题,改用 toast 提示
- 创建统一的 ToastUtils 工具类 - 使用 BotToast.showCustomText 确保显示在所有弹窗之上 - 更新三处复制地址的代码使用新的 toast 方案 - 添加阴影效果提升视觉层次 - 支持成功/错误/警告等多种提示类型
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'dart:ui';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:shadcn_ui/shadcn_ui.dart';
|
||||
import 'package:bot_toast/bot_toast.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:provider/single_child_widget.dart';
|
||||
@@ -117,7 +118,14 @@ class MyApp extends StatelessWidget {
|
||||
GlobalCupertinoLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
],
|
||||
builder: (context, child) => ShadAppBuilder(child: child!),
|
||||
builder: (context, child) {
|
||||
child = ShadAppBuilder(child: child!);
|
||||
// 配置 BotToast 确保显示在所有内容之上
|
||||
final botToastBuilder = BotToastInit();
|
||||
child = botToastBuilder(context, child);
|
||||
return child;
|
||||
},
|
||||
navigatorObservers: [BotToastNavigatorObserver()],
|
||||
initialRoute: '/',
|
||||
routes: {
|
||||
'/': (context) => const RootPage(),
|
||||
|
||||
Reference in New Issue
Block a user