重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
flutter-debugging by dhruvanbhalara/skills
npx skills add https://github.com/dhruvanbhalara/skills --skill flutter-debuggingAppLogger 类进行所有日志记录 — 切勿使用 print() 或原始的 debugPrint()verbose、debug、info、warning、error、fatalAppLogger.error('Failed to fetch user', error: e, stackTrace: st)广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
showPerformanceOverlay: true) 来监控帧率debugPaintSizeEnabled = true 来可视化小部件边界RenderFlex overflowed — 使用 Expanded、Flexible 或约束尺寸ListView 包裹在 SizedBox 中,或对 NeverScrollableScrollPhysics 使用 shrinkWrap: truedebugPrint('$runtimeType rebuild') 以识别过度重建 — 提交前移除try-catch 块中捕获并记录错误,包含堆栈跟踪assert() 进行开发时的不变式检查,这些检查在发布版本中会被剥离dispose() 中释放所有控制器、订阅、Timer 和 AnimationControllerinitState() 中使用 late 初始化 — 切勿内联初始化可释放对象WeakReferenceBuildContext 的闭包、未取消的全局流始终使用 --profile 模式(非 debug)进行分析:flutter run --profile --flavor dev -t lib/main_dev.dart
使用 Timeline.startSync / Timeline.finishSync 对关键路径进行自定义性能追踪
监控首次运行时的着色器编译卡顿 — 使用 --cache-sksl 进行预热:
flutter run --profile --cache-sksl --purge-persistent-cache
目标指标:< 16ms 帧构建时间,< 100ms 屏幕切换,< 2s 冷启动
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError)FlutterError.onError 和 PlatformDispatcher.instance.onError 以捕获框架和异步错误每周安装数
54
代码仓库
GitHub 星标数
16
首次出现
2026年3月2日
安全审计
安装于
kimi-cli52
gemini-cli52
amp52
cline52
github-copilot52
codex52
AppLogger class for all logging — NEVER use print() or raw debugPrint()verbose, debug, info, warning, error, fatalAppLogger.error('Failed to fetch user', error: e, stackTrace: st)showPerformanceOverlay: true) to monitor frame ratesdebugPaintSizeEnabled = true to visualize widget boundariesRenderFlex overflowed — use Expanded, Flexible, or constrain dimensionsListView in SizedBox or use shrinkWrap: true with NeverScrollableScrollPhysicsdebugPrint('$runtimeType rebuild') temporarily to identify excessive rebuilds — remove before commitTimer, and AnimationController in dispose()late initialization in initState() — never inline-initialize disposable objectsWeakReference for caches that should not prevent garbage collectionBuildContext, global streams without cancellationAlways profile with --profile mode (not debug): flutter run --profile --flavor dev -t lib/main_dev.dart
Use Timeline.startSync / Timeline.finishSync for custom performance tracing of critical paths
Monitor shader compilation jank on first run — use --cache-sksl for warmup:
flutter run --profile --cache-sksl --purge-persistent-cache
Target metrics: < 16ms frame build time, < 100ms screen transition, < 2s cold start
FlutterError.onError = FirebaseCrashlytics.instance.recordFlutterFatalError)FlutterError.onError and PlatformDispatcher.instance.onError to catch framework and async errorsWeekly Installs
54
Repository
GitHub Stars
16
First Seen
Mar 2, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
kimi-cli52
gemini-cli52
amp52
cline52
github-copilot52
codex52
Flutter无障碍功能实现指南:UI设计、语义组件与网页适配完整教程
4,400 周安装
try-catch blocks with stack tracesassert() for development-time invariant checks that are stripped in release builds