key_value_table 0.1.0
key_value_table: ^0.1.0 copied to clipboard
A lightweight Flutter table widget that perfectly aligns key-value pairs with intrinsic label widths, customizable separators, and widget values.
0.1.0 #
π Modern UI Standards & Design Upgrades #
- No-Colon by Default: By default,
separatoris nownull, adopting modern UI design standards (Material 3, Apple HIG, Stripe). - Automatic 2-Column Collapse: When no separator is provided, the table automatically collapses into a clean 2-column layout (
[Key, Value]) with configurablehorizontalGap(default16.0), eliminating phantom column gaps. - Traditional Separators: Colons remain fully supported anytime by passing
separator: ':'(or custom strings/widgets).
π Alignments & Density #
- Key & Value Alignment: Added
keyAlignmentandvalueAlignment(AlignmentGeometry, defaultAlignment.centerLeft). Allows left-aligned keys with right-aligned values (financial/receipt standard) or right-aligned keys (inspector/form standard). - Text Alignments: Added
keyTextAlignandvalueTextAlignfor fine-grained typography alignment. - Density Presets: Added
KeyValueDensityenum (compact,regular,comfortable) to quickly standardize table row padding.
π§© Granular Row Controls (KeyValueItem) #
- Introduced
KeyValueItemmodel andKeyValueTable.itemsconstructor:leadingandtrailingwidgets (icons, buttons, badges).tooltipfor inline label explanations.- Per-row
keyAlignment,valueAlignment,keyStyle,valueStyle. - Per-row
onTap,onLongPress, andcopyableoverrides.
π± Responsive & Mobile Modes #
- Added
KeyValueLayout(horizontal,stacked,auto). stackedplaces labels above values, ideal for cards or multiline text.autodynamically switches to stacked layout when container width is narrower thanbreakpoint(default480.0).
π οΈ Developer UX & Utilities #
- Tap-to-Copy: Added
copyable: trueandonCopycallback to easily enable one-tap clipboard copying with a floating SnackBar. - Dividers: Added
showDividers,dividerColor, anddividerThicknessfor built-in subtle horizontal borders. - Null Handling: Added
nullPlaceholder(default'β') andhideEmptyRows: truefor clean data rendering. - Text Selection: Added
isSelectable: trueto wrap the table in Flutter'sSelectionArea.
π Built-in Showcase Gallery (example/) #
- Upgraded
example/app with all 6 real-world scenarios, responsive grid layout, and real-time Light/Dark theme toggling. - Added smooth scrolling animated showcase GIFs (
.gif) in documentation.
0.0.3 #
- Fixed screenshot rendering in pub.flutter-io.cn README by using absolute GitHub raw image URLs.
0.0.2 #
- Added live showcase screenshots for desktop and mobile (dark and light modes).
- Added reference and quickstart links for the companion
key_value_table_demoproject. - Added
screenshotsmetadata inpubspec.yamlfor pub.flutter-io.cn package gallery.
0.0.1 #
- Initial release of
key_value_table. - Automatic intrinsic column alignment for label-separator-value rows.
- Support for
Map<String, dynamic>andIterable<MapEntry>. - Widget values support (Chips, Badges, RichText).
- Custom separator strings and widgets.
- Row tap and long-press event callbacks.
- Alternating row colors (zebra striping) and borders.
