From ccb086dc8d7d7ba4baf5fc79053b00f329098445 Mon Sep 17 00:00:00 2001 From: Erick Date: Tue, 23 Jan 2024 17:39:06 -0300 Subject: [PATCH] feat: NesWindow uses theming from nes container instead of material --- CHANGELOG.md | 1 + lib/src/widgets/nes_window.dart | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f825ddc..2a854f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ - feat: add `NesIcons.hamburgerMenu`. - feat: adding `NesButton` helper constructors. - feat: add `NesIcons.arrowCursor`. + - feat: `NesWindow` uses `NesContainerTheme` instead of Material's card. # 0.12.1 - fix: theme lerp causing error on null access. diff --git a/lib/src/widgets/nes_window.dart b/lib/src/widgets/nes_window.dart index dfddb93..9fb15fe 100644 --- a/lib/src/widgets/nes_window.dart +++ b/lib/src/widgets/nes_window.dart @@ -62,7 +62,8 @@ class NesWindow extends StatelessWidget { final textStyle = Theme.of(context).textTheme.labelMedium ?? const TextStyle(); - final containerColor = Theme.of(context).cardColor; + final nesContainerTheme = context.nesThemeExtension(); + final containerColor = nesContainerTheme.backgroundColor; final nesTheme = context.nesThemeExtension(); final titleBarHeight = (textStyle.fontSize ?? 8) + nesTheme.pixelSize * 4; @@ -75,7 +76,7 @@ class NesWindow extends StatelessWidget { height: titleBarHeight, child: DecoratedBox( decoration: BoxDecoration( - color: textStyle.color ?? Colors.black, + color: nesContainerTheme.borderColor, ), child: Row( children: [ @@ -117,7 +118,7 @@ class NesWindow extends StatelessWidget { color: containerColor, border: Border.all( width: nesTheme.pixelSize.toDouble(), - color: textStyle.color ?? Colors.black, + color: nesContainerTheme.borderColor, ), ), child: Column(