Skip to content

Commit

Permalink
Fix/sheet and dialog children constraints (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
nank1ro authored Nov 8, 2024
1 parent 7e8aa72 commit b9a1be0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.15.2

- **FIX**: `ShadDialog` and `ShadSheet` children constraints.

## 0.15.1

- **FIX**: Decoration merge
Expand Down
30 changes: 18 additions & 12 deletions lib/src/components/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -369,23 +369,29 @@ class ShadDialog extends StatelessWidget {
crossAxisAlignment: effectiveCrossAxisAlignment,
children: [
if (title != null)
DefaultTextStyle(
style: effectiveTitleStyle,
textAlign: effectiveTitleTextAlign,
child: title!,
Flexible(
child: DefaultTextStyle(
style: effectiveTitleStyle,
textAlign: effectiveTitleTextAlign,
child: title!,
),
),
if (description != null)
DefaultTextStyle(
style: effectiveDescriptionStyle,
textAlign: effectiveDescriptionTextAlign,
child: description!,
Flexible(
child: DefaultTextStyle(
style: effectiveDescriptionStyle,
textAlign: effectiveDescriptionTextAlign,
child: description!,
),
),
if (child != null)
DefaultTextStyle(
style: effectiveDescriptionStyle,
child: child!,
Flexible(
child: DefaultTextStyle(
style: effectiveDescriptionStyle,
child: child!,
),
),
if (actions.isNotEmpty) effectiveActions,
if (actions.isNotEmpty) Flexible(child: effectiveActions),
].separatedBy(SizedBox(height: effectiveGap)),
),
),
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: shadcn_ui
description: shadcn-ui ported in Flutter. Awesome UI components for Flutter, fully customizable.
version: 0.15.1
version: 0.15.2
homepage: https://flutter-shadcn-ui.mariuti.com
repository: https://github.com/nank1ro/flutter-shadcn-ui
documentation: https://flutter-shadcn-ui.mariuti.com
Expand Down

0 comments on commit b9a1be0

Please sign in to comment.