Skip to content

Commit

Permalink
feat: adding border color to nes container (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
erickzanardo authored Jun 26, 2024
1 parent eb36aeb commit c25b747
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# 0.21.0
- Update to Flutter 3.22.0
- feat: adding `NesDropdownMenu`
- feat: adding `NesContainer.borderColor` to allow customizing the border color.

# 0.20.0
- feat: adding different frames to `NesDialog`s
Expand Down
7 changes: 6 additions & 1 deletion lib/src/widgets/containers/nes_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class NesContainer extends StatelessWidget {
this.width,
this.height,
this.backgroundColor,
this.borderColor,
this.padding,
this.painterBuilder,
});
Expand All @@ -33,6 +34,10 @@ class NesContainer extends StatelessWidget {
/// when null, defaults to [ThemeData.cardColor].
final Color? backgroundColor;

/// Border color of this container,
/// when null, defaults to [NesContainerTheme.borderColor].
final Color? borderColor;

/// An optional padding to apply to the container.
///
/// When omitted, defaults to [NesContainerTheme.padding].
Expand Down Expand Up @@ -65,7 +70,7 @@ class NesContainer extends StatelessWidget {
pixelSize: pixelSize,
textStyle: textStyle,
backgroundColor: containerColor,
borderColor: nesContainerTheme.borderColor,
borderColor: borderColor ?? nesContainerTheme.borderColor,
),
child: SizedBox(
width: width,
Expand Down

0 comments on commit c25b747

Please sign in to comment.