flutter_dev_intelligence 0.1.0-dev.2
flutter_dev_intelligence: ^0.1.0-dev.2 copied to clipboard
Evidence-based Flutter developer diagnostics toolkit for build issues, UI quality checks, and runtime performance investigation.
0.1.0-dev.2 #
Lockfile & Dependency Analyzer Fixes #
- Refactored
PubspecAnalyzerto useloadYamlfor authoritative dependency map parsing. - Fixed false-positive
Dependencies declared in pubspec.yaml but absent from pubspec.lock: sdkby excluding SDK pseudo-packages (sdk,flutter,sky_engine) and environment constraints.
Static UI Diagnostic Engine Improvements #
- Refined
UiSuspiciousSetStateRulewith AST parent traversal to distinguish direct build-timesetState()calls from callback/closure invocations (onTap,onPressed, event handlers, async callbacks). - Enhanced
UiNestedScrollableRulewith contextual checks forNeverScrollableScrollPhysics, horizontal carousels (scrollDirection: Axis.horizontal), Slivers insideCustomScrollView, and bounded parent containers (SizedBox,Expanded,Flexible).
CLI Architecture & Pipe / Stdin Support #
- Added
--stdinsupport forbuild-doctorandperformancecommands to enable stdin pipe workflows (flutter analyze 2>&1 | dart run ...andcat trace.json | dart run ...). - Enforced option validation (rejecting
--stdincombined with--logor--input), non-empty stdin validation, and actionable error messages with clean exit codes (0 for success, 1 for issues found, 2 for argument/usage error, 3 for runtime error).
Terminal UX, Semantic Colors & Exporters #
- Implemented ANSI semantic color system with TTY auto-detection,
NO_COLORenvironment variable support, and--color auto|always|never/--no-coloroptions. - Added ASCII symbol fallbacks (
✓,!) and ANSI code stripping for saved file output (--output <path>). - Centralized package version (
kPackageVersion = '0.1.0-dev.2') across CLI,DiagnosticReportmodels, and metadata. - Upgraded Markdown exporter (
--format markdown) and JSON exporter (--format json) for clean machine-readable integration without ANSI escape sequence pollution.
0.1.0-dev.1 #
Foundation & Models #
- Enriched
DiagnosticReportwithschemaVersion: '1.0',issuesBySeverity,issuesBySource, andissuesByCategory. - Added
FixRiskLevelenum and updatedFixSuggestionwith automation safety metadata.
Lockfile Analyzer #
- Upgraded
PubspecLockAnalyzerto use authoritativepackage:yamlparsing. - Added classification for dependency kinds (
direct main,direct dev,transitive) and source types (hosted,git,path,sdk). - Added graceful error handling for missing and malformed lockfiles.
UI AST Rule Engine #
- Modularized UI AST static analysis into
UiAstRulearchitecture andUiAstRuleRegistry. - Implemented 7 layout rules:
ui_nested_scrollable,ui_nested_shrink_wrap,ui_unconstrained_scrollable,ui_expanded_misuse,ui_oversized_dimension,ui_nested_scaffold, andui_suspicious_setstate.
Build Doctor Rule Registry #
- Introduced extensible
BuildDoctorRulearchitecture withBuildDoctorRuleRegistry. - Added 20+ specialized diagnostic rules covering Android Gradle, Kotlin versions, duplicate classes, Manifest merges, NDK, iOS Xcode/Swift compiler errors, CocoaPods, and code signing.
Performance Insight Enhancements #
- Added build vs. raster timing breakdown in
FrameTimingSummary. - Added session-to-session performance comparison with
FrameTimingComparison. - Implemented automated recommendation generator (
perf_slow_frame_p90,perf_build_bottleneck,perf_raster_bottleneck).
Privacy & AI Boundary #
- Implemented
PrivacyRedactoralias forSecretRedactorwith credentials, Bearer tokens, private URLs, cloud keys (AWS/GCP/OpenAI), and home directory path normalization (~). - Implemented
AiProviderConfig,MockAiProvider, andAiAnalysisServiceenforcing local-first, opt-in AI analysis (enabled == falseby default).
Safe Auto-Fix Engine #
- Implemented
AutoFixEnginewithplanFixes(dry-run unified diffs) andapplyFixes(creates.bakbackups before write). - Enforced safety guardrails preventing automated edits to high-risk, sensitive, or generated files.
Dedicated CLI Sub-commands #
- Added dedicated CLI sub-commands:
doctor,build-doctor,ui-doctor, andperformance. - Supported flags:
--project,--log,--input,--format(terminal/json/markdown),--output,--verbose,--quiet,--no-ai.
0.0.1 #
- Initial Developer Preview release with core diagnostics, log parsing, and performance investigation tools.