Skip to content

Commit

Permalink
Add Card.borderColor (Fixes #643)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdlukaa committed Dec 23, 2022
1 parent a1e9560 commit a747554
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 7 additions & 1 deletion lib/src/controls/surfaces/card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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
Expand All @@ -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,
Expand Down

0 comments on commit a747554

Please sign in to comment.