Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/plugin.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/responsive-row/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ResponsiveRow(
- Renders as `SizedBox(width: double.infinity, child: Wrap(...))` — always full parent width.
- `children` only accepts `List<ResponsiveCol>` — 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`).

---

Expand Down
2 changes: 1 addition & 1 deletion .claude/skills/responsive-row/references/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ResponsiveRow.builder({
| `children` | `List<ResponsiveCol>` | 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.

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions example/lib/views/table/src/basic.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore_for_file: deprecated_member_use
part of '../table.dart';

class BasicTableView extends StatefulWidget {
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ packages:
path: ".."
relative: true
source: path
version: "7.5.27"
version: "7.5.28"
leak_tracker:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions lib/src/grid/src/row.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class ResponsiveRow extends StatelessWidget {
width: double.infinity,
child: Wrap(
spacing: spacing,
runSpacing: spacing,
direction: Axis.horizontal,
alignment: mainAxisAlignment,
crossAxisAlignment: crossAxisAlignment,
Expand Down
1 change: 1 addition & 0 deletions lib/src/scaffolds/src/sidebar.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore_for_file: deprecated_member_use_from_same_package
part of '../scaffolds.dart';

class ThemedScaffoldView<T> extends StatefulWidget {
Expand Down
1 change: 1 addition & 0 deletions lib/src/table/src/action.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
part of '../table.dart';

@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.')
class ThemedTableAction<T> {
/// The label of the action.
final Widget? label;
Expand Down
1 change: 1 addition & 0 deletions lib/src/table/src/avatar.dart
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 6 additions & 0 deletions lib/src/table/src/column.dart
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
part of '../table.dart';

/// [ValueBuilder<T>] defines the value to display in a column.
@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.')
typedef ValueBuilder<T> = String Function(BuildContext context, T item);

/// [WidgetBuilder<T>] defines the widget to display in a column.
@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.')
typedef WidgetBuilder<T> = Widget Function(BuildContext context, T item);

/// [CellTap<T>] defines the action when the cell is tapped.
@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.')
typedef CellTap<T> = void Function(T item);

/// [CellColor<T>] defines the color of the cell.
@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.')
typedef CellColor<T> = Color? Function(T item);

/// [ValueBuilder2<T>] defines the value to display in a column.
@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.')
typedef ValueBuilder2<T> = String Function(T item);

@Deprecated('Use ThemedTable2 instead. ThemedTable will be removed in version 8.0.0.')
class ThemedColumn<T> {
/// The label of the column.
final Widget? label;
Expand Down
3 changes: 3 additions & 0 deletions lib/src/table/src/table.dart
Original file line number Diff line number Diff line change
@@ -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<T> extends StatefulWidget {
/// Represents the columns or headers of the table. This columns only will be displayed in desktop size.
///
Expand Down
1 change: 1 addition & 0 deletions lib/src/table2/src/column.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// ignore_for_file: deprecated_member_use_from_same_package
part of '../table2.dart';

class ThemedColumn2<T> {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
37 changes: 37 additions & 0 deletions test/widgets/responsive_row_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading