Skip to content

Commit

Permalink
fix: Added featureColor to CardTile.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathrunet committed May 17, 2023
1 parent 03d30c7 commit 20da6aa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
14 changes: 6 additions & 8 deletions packages/katana_ui/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -348,20 +348,19 @@ packages:
source: hosted
version: "6.6.2"
katana:
dependency: transitive
dependency: "direct overridden"
description:
name: katana
sha256: "99e37bec02e32244b575b8459d7c5108297376e4f36d7da1a40ab22fb701e97d"
url: "https://pub.dev"
source: hosted
version: "1.0.14"
path: "../../katana"
relative: true
source: path
version: "2.0.0"
katana_ui:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "1.2.13"
version: "2.0.0"
lints:
dependency: transitive
description:
Expand Down Expand Up @@ -641,4 +640,3 @@ packages:
version: "3.1.2"
sdks:
dart: ">=3.0.0-417 <4.0.0"
flutter: ">=2.0.0"
10 changes: 8 additions & 2 deletions packages/katana_ui/lib/ui/card_tile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class CardTile extends StatelessWidget {
this.iconColor,
this.textColor,
this.contentPadding,
this.featureColor,
});

/// A callback that is called when the card is tapped.
Expand Down Expand Up @@ -137,6 +138,11 @@ class CardTile extends StatelessWidget {
/// [ListTile]コンテンツの周囲のパディング。
final EdgeInsetsGeometry? contentPadding;

/// Background color of the Feature image.
///
/// Feature画像の背景色。
final Color? featureColor;

@override
Widget build(BuildContext context) {
final backgroundColor =
Expand All @@ -149,10 +155,10 @@ class CardTile extends StatelessWidget {
height: height,
padding: margin,
child: Card(
color: backgroundColor,
color: featureColor ?? backgroundColor,
shadowColor: shadowColor,
elevation: elevation,
surfaceTintColor: backgroundColor,
surfaceTintColor: featureColor ?? backgroundColor,
shape: shape,
margin: EdgeInsets.zero,
borderOnForeground: borderOnForeground,
Expand Down
9 changes: 4 additions & 5 deletions packages/katana_ui/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,10 @@ packages:
katana:
dependency: "direct main"
description:
name: katana
sha256: "99e37bec02e32244b575b8459d7c5108297376e4f36d7da1a40ab22fb701e97d"
url: "https://pub.dev"
source: hosted
version: "1.0.14"
path: "../katana"
relative: true
source: path
version: "2.0.1"
lints:
dependency: transitive
description:
Expand Down

0 comments on commit 20da6aa

Please sign in to comment.