From a4e85c3dde3509dd3245c584b6d31aa050f27781 Mon Sep 17 00:00:00 2001 From: Jon Saw Date: Fri, 24 Jun 2022 23:00:44 +0800 Subject: [PATCH] Expand remaining part of row in MacosListTile (#265) * Expand remaining part of row https://github.com/GroovinChip/macos_ui/issues/264 * Increment to version 1.4.2 --- CHANGELOG.md | 3 +++ lib/src/layout/macos_list_tile.dart | 40 ++++++++++++++++------------- pubspec.yaml | 2 +- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 702f9472..54254a25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [1.4.2] +* Fixes RenderFlex overflowed in `MacosListTile` [#264](https://github.com/GroovinChip/macos_ui/issues/264) + ## [1.4.1+1] * Update `pubspec.yaml` with `repository` and new `homepage` field. diff --git a/lib/src/layout/macos_list_tile.dart b/lib/src/layout/macos_list_tile.dart index 92d443a6..1251e755 100644 --- a/lib/src/layout/macos_list_tile.dart +++ b/lib/src/layout/macos_list_tile.dart @@ -51,26 +51,30 @@ class MacosListTile extends StatelessWidget { children: [ if (leading != null) leading!, SizedBox(width: leadingWhitespace), - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - DefaultTextStyle( - style: MacosTheme.of(context).typography.headline.copyWith( - fontWeight: FontWeight.bold, - ), - child: title, - ), - if (subtitle != null) + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ DefaultTextStyle( - style: - MacosTheme.of(context).typography.subheadline.copyWith( - color: MacosTheme.brightnessOf(context).isDark - ? MacosColors.systemGrayColor - : const MacosColor(0xff88888C), - ), - child: subtitle!, + style: MacosTheme.of(context).typography.headline.copyWith( + fontWeight: FontWeight.bold, + ), + child: title, ), - ], + if (subtitle != null) + DefaultTextStyle( + style: MacosTheme.of(context) + .typography + .subheadline + .copyWith( + color: MacosTheme.brightnessOf(context).isDark + ? MacosColors.systemGrayColor + : const MacosColor(0xff88888C), + ), + child: subtitle!, + ), + ], + ), ), ], ), diff --git a/pubspec.yaml b/pubspec.yaml index 55c5ab47..9ebd7c0e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: macos_ui description: Flutter widgets and themes implementing the current macOS design language. -version: 1.4.1+1 +version: 1.4.2 homepage: "https://macosui.dev" repository: "https://github.com/GroovinChip/macos_ui"