From a74755490d9ce2fd95f18d99790ee7f85764cdc2 Mon Sep 17 00:00:00 2001 From: Bruno D'Luka Date: Fri, 23 Dec 2022 14:18:07 -0300 Subject: [PATCH] Add `Card.borderColor` (Fixes #643) --- CHANGELOG.md | 1 + lib/src/controls/surfaces/card.dart | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a63fdc11c..6cfe1bcfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - `FlyoutListTile` can be used outside of a flyout ([#650](https://github.com/bdlukaa/fluent_ui/issues/650)) - Add uk localization ([#647](https://github.com/bdlukaa/fluent_ui/pull/647)) - Add `Flyout.navigatorKey` ([#538](https://github.com/bdlukaa/fluent_ui/issues/538)) +- Add `Card.borderColor` ([#643](https://github.com/bdlukaa/fluent_ui/issues/643)) ## 4.1.2 diff --git a/lib/src/controls/surfaces/card.dart b/lib/src/controls/surfaces/card.dart index 2af2846da..7cda6fca7 100644 --- a/lib/src/controls/surfaces/card.dart +++ b/lib/src/controls/surfaces/card.dart @@ -8,6 +8,7 @@ class Card extends StatelessWidget { this.padding = const EdgeInsets.all(12.0), this.margin, this.backgroundColor, + this.borderColor, this.borderRadius = const BorderRadius.all(Radius.circular(4.0)), }) : super(key: key); @@ -25,6 +26,11 @@ class Card extends StatelessWidget { /// If null, [ThemeData.cardColor] is used final Color? backgroundColor; + /// The card's border color. + /// + /// If null, [ResourceDictionary.cardStrokeColorDefault] is used + final Color? borderColor; + /// The rounded corners of this card /// /// A circular border with a 4.0 radius is used by default @@ -41,7 +47,7 @@ class Card extends StatelessWidget { color: backgroundColor ?? theme.cardColor, borderRadius: borderRadius, border: Border.all( - color: theme.resources.cardStrokeColorDefault, + color: borderColor ?? theme.resources.cardStrokeColorDefault, ), ), padding: padding,