pilot_ui 0.0.13
pilot_ui: ^0.0.13 copied to clipboard
A dynamic, theme-aware JSON UI rendering engine for Flutter with extensible parsers, action handlers, and ready-to-use smart dispatch & RTS action components.
0.0.13 #
- iOS Multi-App Calling Support (Google Voice & Phone):
- Added iOS multi-app chooser via native
CupertinoActionSheet: automatically detects if Google Voice (googlevoice://) is installed on the user's iPhone and prompts between Phone (Default) and Google Voice. - Automatically copies the driver's phone number to the iOS clipboard when launching Google Voice for effortless paste and dial.
- Added
LSApplicationQueriesSchemesconfiguration for iOS (tel,googlevoice).
- Added iOS multi-app chooser via native
0.0.12 #
- Multi-App Calling Chooser Support (Android):
- Integrated
android_intent_plusto display the native system app chooser (Intent.createChooserwithACTION_DIAL) when clicking the Call button inDriverContactBarandRtsActionCardon Android devices. - Allows users to select from all installed dialer and calling apps (e.g. Phone, Google Voice, Truecaller) rather than opening only the default dialer directly.
- Updated
PilotMarkdownText.defaultLaunchUrlto support the multi-app chooser fortel:URLs and phone numbers. - Added
<queries>declarations for Android (ACTION_DIAL,tel:) in Android manifest for Android 11+ package visibility compliance.
- Integrated
0.0.11 #
- Markdown Hyperlink & URL Tap Handling:
- Added automatic link launching in
PilotMarkdownTextpowered byurl_launcher(PilotMarkdownText.defaultLaunchUrl), automatically opening URLs in the external browser or default system app when clicked. - Added auto-detection and clickable styling for raw URLs (
http://.../https://...) in markdown content alongside standard[label](url)links. - Added
onLinkTapcallback parameter toRtsActionCardandRtsActionCard.fromMap, forwarding link tap interactions across Title, Description, and AI Insights.
- Added automatic link launching in
- Test Suite Updates:
- Added widget unit tests in
test/pilot_markdown_test.dartandtest/rts_action_card_test.dartvalidating markdown link recognition, raw URL extraction, and callback triggers.
- Added widget unit tests in
0.0.10 #
- Driver Contact Bar (
DriverContactBar):- Added dedicated
DriverContactBarcomponent for calling drivers directly viaurl_launcher(tel:dial pad intent). - Features driver avatar, driver name, clean phone number normalization, error feedback snackbars, and responsive dark/light theme styling.
- Integrated contact bar into
RtsActionCard, automatically resolving driver details fromdriver_phone,driver_name, orui_schema.data. - Added
onCallDriverandonMessageDrivercallback hooks onRtsActionCard.
- Added dedicated
- Integrated Audio Player (
PilotAudioPlayer):- Added
PilotAudioPlayerwidget powered byaudioplayersfor driver voice notes and recorded audio streams. - Includes play/pause state controls, interactive seekable scrubber slider, tabular duration display (
mm:ss), streaming error indicators, and theme-adaptive styling. - Integrated audio player into
RtsActionCardwhenaudio_urlis present, with optionalautoPlayAudiosupport.
- Added
- Card Header Edit Option:
- Added
onEditcallback andshowEdittoggle toRtsActionCardwith an edit button rendered in the header next to the timestamp.
- Added
- Dependencies & Public Exports:
- Added
audioplayers: ^6.1.0andurl_launcher: ^6.3.0dependencies. - Exported
DriverContactBarandPilotAudioPlayerinlib/pilot_ui.dart.
- Added
- Test Suite Updates:
- Added widget unit tests for
DriverContactBarcalling action,PilotAudioPlayerrendering, and header edit button trigger intest/rts_action_card_test.dart.
- Added widget unit tests for
0.0.9 #
- Countdown Expiry Progress Bar in RtsActionCard:
- Added animated top-border countdown progress bar to
RtsActionCardvisually tracking event expiration for pending action items. - Added support for
expires_at(ISO 8601 UTC timestamp) andexpires_in_secondsproperties with robust UTC-to-local normalization and total duration calculation. - Implemented dynamic progress gradient colors that smoothly transition from Blue (>40%) to Amber (15%-40%) to Red (<15%) as remaining time elapses.
- Managed internal 100ms periodic timer with automatic cleanup upon card disposal, expiration, or status change to resolved.
- Added animated top-border countdown progress bar to
- UI Robustness & Overflow Protection:
- Applied
TextOverflow.ellipsistoRtsActionCardheaders and labels to prevent text overflow issues.
- Applied
- Test Suite Updates:
- Added widget unit tests in
test/rts_action_card_test.dartto verify countdown progress bar rendering on pending events and automatic suppression on resolved events.
- Added widget unit tests in
0.0.8 #
- Full Visibility & AI Insights in RtsActionCard:
- Removed expand/collapse tap toggling and line truncation on event description and AI insights text, rendering full content by default for immediate readability and faster review.
- Renamed the "AI Diagnosis" callout section header to "AI Insights".
- Layout Modernization:
- Modernized
ColumnandRowlayouts acrossRtsActionCardusing native Flutterspacingparameters instead of interstitialSizedBoxwidgets.
- Modernized
- Test Suite Updates:
- Updated unit test suite in
test/rts_action_card_test.dartto validate "AI Insights" labeling and full-text visibility.
- Updated unit test suite in
0.0.7 #
- Dark Mode Support & Theme Adaptability:
- Added
isDarkModeparameter toRtsActionCardandDynamicActionButtonswith automatic brightness detection fromTheme.of(context).brightness. - Implemented dedicated dark theme color palettes, card surface backgrounds, high-contrast borders, inputs, and button styling.
- Added
- AI Diagnosis Section & Interactive Preview:
- Added a dedicated AI Diagnosis callout container in
RtsActionCardrendered directly below event descriptions. - Added tap-to-expand collapsible preview (
_isDiagnosisExpanded) with smooth animation and rich markdown formatting support.
- Added a dedicated AI Diagnosis callout container in
- Responsive Layout & Badge Improvements:
- Wrapped severity and status badges in
FittedBoxwithBoxFit.scaleDownto prevent text overflows on compact screens and narrow cards.
- Wrapped severity and status badges in
- Testing & Quality:
- Added comprehensive unit test coverage for AI diagnosis expansion and dark theme rendering in
test/rts_action_card_test.dart.
- Added comprehensive unit test coverage for AI diagnosis expansion and dark theme rendering in
0.0.6 #
- Markdown Text Rendering & Formatting:
- Introduced
PilotMarkdownTextwidget for rendering markdown formatting (bold, italic, inline code, headers, bullet lists, and clickable hyperlinks) without heavy external dependencies. - Added
MarkdownTextParserto parse and render"markdown"and"markdown_text"widget definitions in JSON schemas viaPilotBuilder. - Updated
RtsActionCardto format and render event titles and descriptions usingPilotMarkdownText. - Updated example application mock data with rich markdown-formatted event descriptions and AI diagnoses.
- Added comprehensive unit test suite in
test/pilot_markdown_test.dartfor regex parsing, list normalization, styling, and JSON widget schema parsing.
- Introduced
0.0.5 #
- Asynchronous Loading States & RTS Action Enhancements:
- Converted
DynamicActionButtonsto aStatefulWidgetwith internal loading state management for asynchronous actions. - Added inline
CircularProgressIndicatorinside action buttons while action execution is in progress. - Added
isLoading,loadingAction,loadingActionType, andloadingActionLabelprops toDynamicActionButtonsfor granular external loading control. - Prevented concurrent duplicate triggers by disabling action buttons while any action is executing.
- Updated
RtsActionCardto support asynchronousonActionTriggeredandonButtonTapcallbacks and propagate loading states to buttons. - Disabled
RtsActionCardreason text field, "Self" edit toggle, and mode switch buttons while an action is executing. - Updated
RtsActionCardexpanded view to display the event description directly. - Enhanced unit tests with async loading indicator verification and updated example application with simulated network latency.
- Converted
0.0.4 #
- Expandable RTS Action Card & UI Refinements:
- Added smooth expandable/collapsible body animation to
RtsActionCardusingSizeTransitionandCurvedAnimation. - Added
initiallyExpandedparameter toRtsActionCardto control initial card expansion (defaults tofalse). - Modernized visual styling with multi-layered soft elevation shadows, refined borders, and compact badge typography.
- Enhanced action reason handling to prefill from action payloads or direct data keys.
- Updated
DynamicActionButtonsstyling: increased height to 38px, adjusted padding, and updated Emerald & Indigo palettes. - Renamed manual action toggle to "Self" with an updated icon.
- Updated unit tests to verify expandable interaction behaviors and initial expansion states.
- Added smooth expandable/collapsible body animation to
0.0.3 #
- Package Renaming & RTS Action Card Enhancements:
- Renamed package to
pilot_ui. - Enhanced
RtsActionCardto merge top-levelaction_payloadwith individual action item payloads. - Added fallback context ID extraction (
user_id,driver_id,attendance_id,id) from card data orui_schema. - Improved action trigger status inference and reason handling.
- Added unit tests verifying complete
actionPayloadmerging and ID preservation.
- Renamed package to
0.0.2 #
- RtsActionCard Refactoring & Enhancements:
- Refactored
RtsActionCardto accept a consolidateddatamap instead of individual parameters. - Added
onButtonTapcallback for handling action triggers. - Moved data parsing and property extraction to private getters within
_RtsActionCardState. - Updated example app and unit tests to reflect the new component API.
- Refactored
0.0.1 #
- Initial release of
pilot_ui. - Dynamic JSON UI Engine:
- Core
PilotBuilderwidget for compiling JSON definitions into interactive, responsive Flutter widget trees. - Extensible
PilotRegistrysystem for registering custom widget parsers and action handlers. - State management and dynamic context evaluation through
PilotStateContextandEvaluator. - AST caching and performance optimization for rapid expression parsing.
- Theme resolution and responsive layout helpers (breakpoints, adaptive sizes).
- Core
- Comprehensive Widget Parser Suite:
- Layout:
Container,Column,Row,Flex,Stack,ListView,Expanded,Wrap,SafeArea. - Display:
Text,Icon,CachedImage,Card,Avatar,Badge,ProgressIndicator,GlassContainer. - Input & Interactive:
TextField,Checkbox,ElevatedButton,TextButton. - Navigation & App Structure:
AppBar,BottomNavigationBar,FloatingActionButton,PageView,TabView.
- Layout:
- Built-in Action Handlers:
showDialog,showBottomSheet,setState,emitEvent.
- Specialized Fleet & Logistics Components:
RtsActionCard: Feature-rich, interactive Return-to-Station (RTS) event cards with severity tags, AI diagnosis panels, expandable reasons, and confirmation bottom sheets.DynamicActionButtons: Configurable action buttons with icon mapping and callback routing.PilotComponents.registerAll()helper to quickly register pre-built specialized components.