fix: show in-panel toasts above the inspector panel - #95
Merged
Conversation
Wrap the panel overlay in its own ScaffoldMessenger so in-panel SnackBar toasts (copy / share / replay / bug report) render above the panel instead of being occluded by it after the z-order change. Centralize the 11 scattered SnackBar calls into a reusable InspectorToast component. Bump package to 1.8.1. - lib/src/ui/inspector_toast.dart (new): shared toast component - inspector_panel / network_viewer / log_viewer: use InspectorToast; resolve ScaffoldMessenger before await to avoid use_build_context_synchronously - pubspec.yaml, ios/zero_inspector_kit.podspec: version 1.8.1 - README.md, README_zh.md, CHANGELOG.md: version strings + notes
Replace the bottom-anchored SnackBar with a custom top-anchored overlay toast so copy / share / replay / bug-report feedback appears at the top of the screen, still above the inspector panel. - lib/src/ui/inspector_toast.dart: render a floating card via OverlayEntry anchored to the top (was SnackBar, always bottom). - inspector_panel / network_viewer / log_viewer: resolve OverlayState instead of ScaffoldMessengerState before await.
Refresh the example lockfile after dependency resolution during analyze.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 摘要
Fix in-panel toasts (copy / share / replay / bug report) being drawn behind the inspector panel and invisible after the overlay z-order change; centralize all toast feedback into a single reusable
InspectorToastcomponent.修复复制 / 分享 / 重放 / Bug 报告等面板内提示被检查器面板遮挡、不可见的问题,并把所有提示反馈收敛到统一的
InspectorToast组件。Changes / 变更
InspectorToast(lib/src/ui/inspector_toast.dart) that consolidates the 11 scatteredSnackBarcalls acrossinspector_panel/network_viewer/log_viewerinto one place with a consistent floating style. / 新增统一提示组件InspectorToast,把分散在三处的 11 处SnackBar调用收敛到一处,统一样式。ScaffoldMessengerso toasts render above the panel in the same overlay layer (fixes occlusion). / 面板浮层由自身的ScaffoldMessenger包裹,提示渲染进面板所在的 Overlay 层之上,修复被遮挡问题。InspectorToast.showOn(ScaffoldMessengerState, …)for async call sites to keepflutter analyzeclean (use_build_context_synchronously). / 新增showOn重载供 await 之后的调用点使用,保持 analyze 无告警。1.8.1(pubspec.yaml, iOS podspec, README/CHANGELOG). / 版本 bump 到 1.8.1。Context / 背景
After the overlay z-order refactor, in-panel
SnackBartoasts were rendered under the panel and could not be seen, making copy / share / replay / bug-report feedback invisible. Centralizing intoInspectorToastalso removes duplicatedSnackBarboilerplate.浮层 z 序调整后,面板内的
SnackBar提示被渲染到面板之下、不可见,导致复制 / 分享 / 重放 / Bug 报告的反馈失效;统一到InspectorToast同时也消除了重复的SnackBar样板代码。Checklist / 检查项
Test plan
🤖 Generated with Zero Buddy