Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adding border color to nes container #148

Merged
merged 1 commit into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading