diff --git a/.claude/plugin.json b/.claude/plugin.json index b7a2c2c..d5b184e 100644 --- a/.claude/plugin.json +++ b/.claude/plugin.json @@ -1,7 +1,7 @@ { "name": "layrz-theme", "description": "Claude Code skills for layrz-theme Flutter widget library", - "version": "7.5.27", + "version": "7.5.28", "author": { "name": "Golden M, Inc.", "url": "https://github.com/goldenm-software" diff --git a/.claude/skills/responsive-row/SKILL.md b/.claude/skills/responsive-row/SKILL.md index 5daf0b7..d8496d3 100644 --- a/.claude/skills/responsive-row/SKILL.md +++ b/.claude/skills/responsive-row/SKILL.md @@ -37,7 +37,7 @@ ResponsiveRow( - Renders as `SizedBox(width: double.infinity, child: Wrap(...))` — always full parent width. - `children` only accepts `List` — use `ResponsiveCol(child: Divider())` for dividers. - `builder` takes `ResponsiveCol Function(int)` — not `Widget Function(BuildContext, int)`. -- `spacing` is horizontal gap between columns in pixels (default `0`). +- `spacing` applies to **both axes**: horizontal gap between columns in the same row, and vertical gap between rows when columns wrap (default `0`). --- diff --git a/.claude/skills/responsive-row/references/api.md b/.claude/skills/responsive-row/references/api.md index e09da55..95253fc 100644 --- a/.claude/skills/responsive-row/references/api.md +++ b/.claude/skills/responsive-row/references/api.md @@ -35,7 +35,7 @@ ResponsiveRow.builder({ | `children` | `List` | required | Only `ResponsiveCol`. For dividers: `ResponsiveCol(child: Divider())` | | `mainAxisAlignment` | `WrapAlignment` | `.start` | Horizontal alignment of columns | | `crossAxisAlignment` | `WrapCrossAlignment` | `.start` | Vertical alignment of columns | -| `spacing` | `double` | `0` | Horizontal gap between columns in pixels | +| `spacing` | `double` | `0` | Gap between columns (horizontal) and between wrapped rows (vertical) in pixels | Renders as `SizedBox(width: double.infinity, child: Wrap(...))` — always full parent width. diff --git a/CHANGELOG.md b/CHANGELOG.md index 487b0ec..8029e9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 7.5.28 + +- Deprecated `ThemedTable`, `ThemedColumn`, `ThemedTableAction`, `ThemedTableAvatar`, and related typedefs (`ValueBuilder`, `WidgetBuilder`, `CellTap`, `CellColor`, `ValueBuilder2`, `kThemedTableCanTrue`). Use `ThemedTable2` instead. All symbols will be removed in version 8.0.0. +- Fixed `ResponsiveRow` spacing on vertical layouts: `spacing` now applies to both horizontal gaps between columns and vertical gaps between wrapped rows (`Wrap.runSpacing`). Previously, `spacing` had no effect when columns stacked vertically on mobile (xs: .col12). + ## 7.5.27 - Fixed `ThemedColorPicker` double `#` prefix bug: `.hex` extension already includes `#`, so the controller text was displaying `##RRGGBB` instead of `#RRGGBB`. diff --git a/README.md b/README.md index 43d34cd..b2166e1 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This repository includes a *Claude Code plugin* as part of our initiative to pro Add this repository as a Claude Code plugin marketplace, then install the plugin: ```bash -/plugin marketplace add goldenm-software/layrz-theme +/plugin marketplace add goldenm-software/layrz_theme ``` Once the marketplace is added, install the plugin from the **Discover** tab in `/plugin`, or run: diff --git a/example/lib/views/table/src/basic.dart b/example/lib/views/table/src/basic.dart index ec2c111..0f37a61 100644 --- a/example/lib/views/table/src/basic.dart +++ b/example/lib/views/table/src/basic.dart @@ -1,3 +1,4 @@ +// ignore_for_file: deprecated_member_use part of '../table.dart'; class BasicTableView extends StatefulWidget { diff --git a/example/pubspec.lock b/example/pubspec.lock index e8c5be6..437b95f 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -390,7 +390,7 @@ packages: path: ".." relative: true source: path - version: "7.5.27" + version: "7.5.28" leak_tracker: dependency: transitive description: diff --git a/lib/src/grid/src/row.dart b/lib/src/grid/src/row.dart index ebc0693..df8f152 100644 --- a/lib/src/grid/src/row.dart +++ b/lib/src/grid/src/row.dart @@ -66,6 +66,7 @@ class ResponsiveRow extends StatelessWidget { width: double.infinity, child: Wrap( spacing: spacing, + runSpacing: spacing, direction: Axis.horizontal, alignment: mainAxisAlignment, crossAxisAlignment: crossAxisAlignment, diff --git a/lib/src/scaffolds/src/sidebar.dart b/lib/src/scaffolds/src/sidebar.dart index d53fac5..7d57bd6 100644 --- a/lib/src/scaffolds/src/sidebar.dart +++ b/lib/src/scaffolds/src/sidebar.dart @@ -1,3 +1,4 @@ +// ignore_for_file: deprecated_member_use_from_same_package part of '../scaffolds.dart'; class ThemedScaffoldView extends StatefulWidget { diff --git a/lib/src/table/src/action.dart b/lib/src/table/src/action.dart index 8e67943..a93166d 100644 --- a/lib/src/table/src/action.dart +++ b/lib/src/table/src/action.dart @@ -1,5 +1,6 @@ part of '../table.dart'; +@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.') class ThemedTableAction { /// The label of the action. final Widget? label; diff --git a/lib/src/table/src/avatar.dart b/lib/src/table/src/avatar.dart index 02c9b65..2724f31 100644 --- a/lib/src/table/src/avatar.dart +++ b/lib/src/table/src/avatar.dart @@ -1,5 +1,6 @@ part of '../table.dart'; +@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.') class ThemedTableAvatar { /// Represents the name, label or identifier of the avatar. final String? label; diff --git a/lib/src/table/src/column.dart b/lib/src/table/src/column.dart index 2127f1d..f89a378 100644 --- a/lib/src/table/src/column.dart +++ b/lib/src/table/src/column.dart @@ -1,20 +1,26 @@ part of '../table.dart'; /// [ValueBuilder] defines the value to display in a column. +@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.') typedef ValueBuilder = String Function(BuildContext context, T item); /// [WidgetBuilder] defines the widget to display in a column. +@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.') typedef WidgetBuilder = Widget Function(BuildContext context, T item); /// [CellTap] defines the action when the cell is tapped. +@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.') typedef CellTap = void Function(T item); /// [CellColor] defines the color of the cell. +@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.') typedef CellColor = Color? Function(T item); /// [ValueBuilder2] defines the value to display in a column. +@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.') typedef ValueBuilder2 = String Function(T item); +@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.') class ThemedColumn { /// The label of the column. final Widget? label; diff --git a/lib/src/table/src/table.dart b/lib/src/table/src/table.dart index 9c3fa0f..a24f220 100644 --- a/lib/src/table/src/table.dart +++ b/lib/src/table/src/table.dart @@ -1,7 +1,10 @@ +// ignore_for_file: deprecated_member_use_from_same_package part of '../table.dart'; +@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.') bool kThemedTableCanTrue(BuildContext context, item) => true; +@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.') class ThemedTable extends StatefulWidget { /// Represents the columns or headers of the table. This columns only will be displayed in desktop size. /// diff --git a/lib/src/table2/src/column.dart b/lib/src/table2/src/column.dart index 5108026..73f6638 100644 --- a/lib/src/table2/src/column.dart +++ b/lib/src/table2/src/column.dart @@ -1,3 +1,4 @@ +// ignore_for_file: deprecated_member_use_from_same_package part of '../table2.dart'; class ThemedColumn2 { diff --git a/pubspec.yaml b/pubspec.yaml index 300bd45..be190b5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: layrz_theme description: Layrz standard styling library for Flutter. Widget library following the Material Design 3 guidelines, with a focus on reliavility and functionality. -version: "7.5.27" +version: "7.5.28" homepage: https://theme.layrz.com repository: https://github.com/goldenm-software/layrz_theme diff --git a/test/widgets/responsive_row_test.dart b/test/widgets/responsive_row_test.dart index ad8c933..d7136da 100644 --- a/test/widgets/responsive_row_test.dart +++ b/test/widgets/responsive_row_test.dart @@ -112,6 +112,43 @@ void main() { expect(wrap.spacing, 0); // Default spacing should be 0 }); + testWidgets('ResponsiveRow spacing applies to Wrap.runSpacing', (WidgetTester tester) async { + await tester.pumpWidget( + MaterialApp( + home: Scaffold( + body: ResponsiveRow( + spacing: 20, + children: [ + ResponsiveCol(xs: .col6, child: Container(height: 100)), + ResponsiveCol(xs: .col6, child: Container(height: 100)), + ], + ), + ), + ), + ); + + final wrap = find.byType(Wrap).evaluate().first.widget as Wrap; + expect(wrap.runSpacing, 20); + }); + + testWidgets('ResponsiveRow default spacing gives runSpacing of 0', (WidgetTester tester) async { + await tester.pumpWidget( + MaterialApp( + home: Scaffold( + body: ResponsiveRow( + children: [ + ResponsiveCol(xs: .col6, child: Container(height: 100)), + ResponsiveCol(xs: .col6, child: Container(height: 100)), + ], + ), + ), + ), + ); + + final wrap = find.byType(Wrap).evaluate().first.widget as Wrap; + expect(wrap.runSpacing, 0); + }); + testWidgets('ResponsiveRow respects mainAxisAlignment', (WidgetTester tester) async { await tester.pumpWidget( MaterialApp(