flutter_agentation library
A production-grade visual inspection and annotation engine for Flutter applications.
Classes
- AgentationColors
- Centralized color palette and design tokens for the Agentation visual inspection engine.
- AgentationController
- Programmatic controller for the FlutterAgentation inspection overlay, toolbar, and annotations.
- AgentationFormatAdapter
- Adapter converting native Flutter Annotation objects into the canonical Agentation-compatible schema for AI and web interoperability (Section 28 of flow.md).
- AgentationIcons
- Pixel-perfect vector icons matching the official Agentation design system.
- AgentationKeymap
- Configurable keyboard shortcut mapping for Agentation overlay actions matching official upstream specs.
- AgentationLogger
- Internal diagnostic logger for FlutterAgentation.
- AgentationRadii
- Centralized standard corner radii and border radius tokens for Agentation UI elements.
- AgentationScope
- An InheritedNotifier providing descendant widgets access to AgentationController.
- AgentationShortcuts
- Widget providing keyboard shortcut handling and keymap routing for Agentation.
- AgentationState
- Immutable state snapshot of the Agentation inspection system.
- AgentationSyntaxColors
- Syntax highlighting color scheme for inspected Dart snippets.
- AgentationTarget
- Optional explicit target widget that developers can wrap around widgets to provide deterministic identity in complex or dynamic applications.
- AgentationThemeData
- Semantic theme tokens for Agentation UI elements (toolbar, cards, dialogs, badges).
- AgentationToolbar
- AgentationTypography
- Centralized standard typography and text styles for Agentation UI elements.
- AgentSyncClient
- Client for communicating with local or remote Agentation Model Context Protocol (MCP) servers.
- Annotation
- Immutable model representing user feedback attached to a visual Flutter widget or area.
- AnnotationDetailCard
-
Floating edit card / dialog displayed when an AnnotationMarker is tapped
(matching Screenshot 2:
> list item, blue border input field, Delete / Cancel / Save). - AnnotationHoverPreviewCard
- Sleek floating hover preview card displayed when an AnnotationMarker is hovered (matching Screenshot 1: element label in italic gray, feedback text below, white card).
- AnnotationJsonEncoder
- Formats annotations into JSON strings with support for indented or compact representations.
- AnnotationMarkdownEncoder
- Formats annotations into Markdown matching the official Agentation protocol and Section 27.
- AnnotationMarker
- Numbered circular visual badge rendered on the overlay over an annotated widget.
- AnnotationPopup
- Annotation creation popup matching the Agentation design system.
- AnnotationStorage
- Abstract persistence contract for storing and querying annotations.
- AreaSelectionHandler
- State and geometry helper for dragging marquee bounding boxes in Area Selection mode.
- BoundsResolver
- Specialized resolver responsible for calculating accurate global coordinates and bounding boxes for RenderBoxes, including transformed and rotated geometry.
- ClearAllAnnotationsIntent
- Intent to clear all annotations on page ('X').
- ClipboardExporter
- Utility for exporting annotations and copying them to the system clipboard.
- CloseAnnotationIntent
- Intent to close or dismiss the active annotation popup, detail card, or selection.
- ComponentPalette
- Layout Mode component palette matching Screenshot 4 of the Agentation design system.
- CopyFeedbackIntent
- Intent to copy feedback markdown output ('C').
- DeleteAnnotationIntent
- Intent to delete the currently active / selected annotation or comment.
- DrawCanvasPainter
- Canvas painter rendering both completed freehand strokes and active in-flight sketch paths.
- DrawingStroke
- Represents a freehand drawing stroke captured during sketch mode.
- ElementInspector
- Helper responsible for mapping Flutter RenderObjects to their owning Elements and identifying meaningful developer widgets.
- FeedbackContextBuilder
- Formatter that generates clean, token-efficient, AI-readable UI feedback messages.
- FeedbackTarget
- Target model encapsulating an inspected widget's name and its exact source code location.
- FlutterAgentation
- The top-level wrapper widget for FlutterAgentation visual feedback tooling.
- FlutterInspectionEngine
- The core Flutter Inspection Engine coordinating hit-testing, element resolution, coordinate bounding, and context extraction.
- FlutterMcpServer
- Full Web implementation of the Flutter MCP Server using an HTTP Bridge.
- FlutterSourceLocationResolver
- Primary Flutter implementation of SourceLocationResolver utilizing Flutter SDK's WidgetInspectorService and AST constructor creation tracking.
- FreezeOverlay
- Wraps the host application widget subtree in a dynamic TickerMode to halt and freeze in-flight animations, transitions, and tickers during inspection.
- HierarchicalInspectionResult
- Comprehensive inspection result encompassing a target widget, its ancestor hierarchy, its visual children, and all hit candidates under the interaction coordinate.
- HighlightPainter
- Custom painter responsible for rendering the bounding outline and semi-transparent fill.
- HighlightStyle
- Visual styling configuration for inspected widget bounding boxes and badges.
- HitTestEngine
- Helper responsible for executing native hit tests against the Flutter render tree.
- HttpResponseData
- Response payload from an HTTP request.
- InspectionOverlay
- Overlay widget managing gesture interception, pointer inspection, and multi-mode presentation.
- LocalAnnotationStorage
- Production-ready persistent annotation storage.
- MarkerColor
- Curated marker color options matching Agentation brand styling (Screenshot 3).
- McpProtocol
- Standard Model Context Protocol (MCP) JSON-RPC 2.0 constants and schema definitions.
- MemoryAnnotationStorage
- In-memory implementation of AnnotationStorage.
- MultiSelectHandler
- Manages multiple selected widgets for concurrent multi-widget feedback annotations.
- OutputDetailButton
- Interactive button cycling between the 4 output detail levels with animated dot indicators.
- OutputDetailOption
- UI model representing detail options matching OUTPUT_DETAIL_OPTIONS.
- PackageVersion
-
Provides dynamic access to the package version defined in
pubspec.yaml. - PauseAnimationsIntent
- Intent to toggle animation pause/freeze ('P').
- PlacementData
- Structured metadata for a newly placed component wireframe in Design Mode.
- RearrangeController
- Manages visual drag-and-drop state when rearranging existing widgets on screen.
- RearrangeData
- Structured metadata for an element rearranged or repositioned during Design Mode.
- RedoAnnotationIntent
- Intent to redo the last undone annotation ('Cmd+Shift+Z' / 'Ctrl+Shift+Z' / 'Ctrl+Y').
- RouteResolver
- Specialized resolver responsible for determining the active navigation route name containing the inspected element.
- SemanticsInfo
- Semantic accessibility metadata extracted from a widget or RenderObject.
- SemanticsResolver
- Specialized resolver responsible for extracting accessibility semantics from inspected widgets and RenderObjects.
- SendAnnotationsIntent
- Intent to send annotations to webhook ('S').
- SettingsPanel
- Settings panel matching the official Agentation design system without MCP.
- SkeletonTemplate
- Pre-built wireframe skeleton template for Visual Design Mode, matching Screenshot 4.
- SourceLocationResolver
- Contract for resolving exact source code locations for inspected Flutter elements.
- SpatialGuidePainter
- Custom painter for rendering alignment crosshairs, coordinate lines, and live dimension callouts during skeleton dragging and rearrangement.
- SubmitAnnotationIntent
- Intent to submit and save the active annotation popup or thread reply.
- TextResolver
- Specialized resolver responsible for extracting primary text content from widgets and their immediate child trees.
- ThreadMessage
- Conversational message exchanged in an annotation thread between human developers and AI coding agents.
- ToggleCommentsVisibilityIntent
- Intent to toggle visibility of comments and markers on the page ('H').
- ToggleFeedbackModeIntent
- Intent to toggle feedback mode ('Cmd+Shift+F' / 'Ctrl+Shift+F').
- ToggleInspectIntent
- Intent to toggle inspection mode / animation freeze.
- ToggleLayoutModeIntent
- Intent to toggle layout / design mode ('L').
- ToolbarActionButton
- An interactive action button within the Agentation floating toolbar.
- ToolbarSettings
- User preferences and configuration state for the inspection overlay and toolbar.
- UndoAnnotationIntent
- Intent to undo the last annotation created ('Cmd+Z' / 'Ctrl+Z').
- WidgetBounds
- Immutable model representing the global rectangular coordinates and dimensions of an inspected widget.
- WidgetCodeResolver
- Helper responsible for extracting exact developer source code or generating canonical Flutter Dart widget code for inspected elements.
- WidgetContext
- Immutable model representing contextual environment metadata associated with an inspected widget.
- WidgetHierarchyNode
- Immutable node representing a widget in the hierarchical inspection tree.
- WidgetHighlight
- Visual bounding box and identity badge rendered over an inspected widget.
- WidgetIdentity
- Immutable model representing the identity and type classification of an inspected widget.
- WidgetIdentityResolver
- Specialized resolver responsible for determining the identity of an inspected widget according to strict priority order.
- WidgetInspectionResult
- Primary immutable result object encapsulating a complete widget inspection snapshot.
- WidgetPathResolver
- Specialized resolver responsible for determining the hierarchical ancestry path of an inspected widget.
- WidgetSourceLocation
- Immutable model representing the source code location of a Flutter widget.
Enums
- AgentationLogLevel
- Available log levels for Agentation diagnostic logging.
- AnnotationIntent
- Categorizes the primary objective or nature of an annotation.
- AnnotationKind
- The categorical kind of visual annotation.
- AnnotationSeverity
- Indicates the urgency, priority, or impact level of an annotation.
- AnnotationStatus
- Lifecycle status of an annotation.
- AnnotationToolMode
- Active interaction tool mode in the inspection overlay.
- CopyFormat
- Formats supported for copying annotations to system clipboard.
- ExportFormat
- Supported export formats for annotations.
- FlutterComponentMode
- Flutter component hierarchy detail mode corresponding to ReactComponentMode in Agentation.
- InspectionMode
- Interaction mode of the visual inspection overlay.
- OutputDetailLevel
- Output detail levels matching the official Agentation protocol.
- ToolbarAnchor
- TooltipBeakDirection
Constants
-
outputDetailOptions
→ const List<
OutputDetailOption> -
outputToFlutterMode
→ const Map<
OutputDetailLevel, FlutterComponentMode> - Parity mapping matching OUTPUT_TO_REACT_MODE from agentation-main.
Functions
-
defaultHttpTransport(
String method, Uri uri, {Map< String, String> ? headers, String? body}) → Future<HttpResponseData> - Default cross-platform HttpTransport implementation working on Web, Mobile, and Desktop.
-
extractFileName(
String path) → String - Extracts the clean base file name from a path or URI (e.g. 'login_page.dart').
-
extractSnippetFromSource(
String sourceText, int line, String? widgetType) → String? - Utility responsible for extracting a clean, idiomatic Flutter Dart widget snippet from source code text given a target line number and widget type.
-
normalizeProjectPath(
String path) → String - Utility responsible for normalizing file paths and URIs into clean, portable, project-relative locations.
Typedefs
-
HttpTransport
= Future<
HttpResponseData> Function(String method, Uri uri, {String? body, Map<String, String> ? headers}) - Abstract function signature for dispatching HTTP requests.
- ToolbarIconButton = ToolbarActionButton
- Alias for ToolbarActionButton conforming to standard naming.