Skip to content

Commit

Permalink
fix: Modal.show title is now optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathrunet committed Feb 15, 2024
1 parent 3ef1f4a commit 5e61cd3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/katana_ui/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,14 @@ packages:
path: "../../katana"
relative: true
source: path
version: "2.10.2"
version: "2.11.0"
katana_ui:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "2.5.26"
version: "2.6.0"
lints:
dependency: transitive
description:
Expand Down
16 changes: 9 additions & 7 deletions packages/katana_ui/lib/modal/modal.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Modal {
BuildContext context, {
Color? backgroundColor,
Color? color,
required String title,
String? title,
required List<Widget> Function(ModalRef ref) builder,
bool disableBackKey = false,
bool popOnPress = true,
Expand Down Expand Up @@ -90,12 +90,14 @@ class Modal {
child: SimpleDialog(
contentPadding: contentPadding,
alignment: alignment,
title: Text(
title,
style: TextStyle(
color: foregroundColor,
),
),
title: title != null
? Text(
title,
style: TextStyle(
color: foregroundColor,
),
)
: null,
backgroundColor: backgroundColor,
surfaceTintColor: backgroundColor,
children: builder.call(ref),
Expand Down
4 changes: 2 additions & 2 deletions packages/katana_ui/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,14 @@ packages:
path: "../katana"
relative: true
source: path
version: "2.10.2"
version: "2.12.1"
katana_test:
dependency: "direct dev"
description:
path: "../katana_test"
relative: true
source: path
version: "2.0.0"
version: "2.1.0"
lints:
dependency: transitive
description:
Expand Down

0 comments on commit 5e61cd3

Please sign in to comment.