diff --git a/lib/src/common/adaptive_container.dart b/lib/src/common/adaptive_container.dart index 77c621f06..6e4228d8f 100644 --- a/lib/src/common/adaptive_container.dart +++ b/lib/src/common/adaptive_container.dart @@ -14,12 +14,7 @@ class AdaptiveContainer extends StatelessWidget { Widget build(BuildContext context) { final theme = context.t; final smallWindow = context.m.size.width < 1200; - final color = smallWindow - ? null - : theme.colorScheme.background.scale( - lightness: theme.isLight ? -0.02 : 0.02, - saturation: -0.5, - ); + final color = smallWindow ? null : theme.containerBg; return Center( child: Container( diff --git a/lib/src/radio/view/sliver_radio_page_header.dart b/lib/src/radio/view/sliver_radio_page_header.dart index 4b1931005..7be3c264c 100644 --- a/lib/src/radio/view/sliver_radio_page_header.dart +++ b/lib/src/radio/view/sliver_radio_page_header.dart @@ -23,6 +23,7 @@ class SliverRadioPageHeader extends StatelessWidget { final smallWindow = context.m.size.width < kMasterDetailBreakPoint; return SliverAppBar( + shape: const RoundedRectangleBorder(side: BorderSide.none), backgroundColor: Colors.transparent, automaticallyImplyLeading: false, expandedHeight: size, diff --git a/lib/src/radio/view/station_page.dart b/lib/src/radio/view/station_page.dart index 220933fc2..6c9f6ca7f 100644 --- a/lib/src/radio/view/station_page.dart +++ b/lib/src/radio/view/station_page.dart @@ -29,12 +29,7 @@ class StationPage extends StatelessWidget with WatchItMixin { final size = context.m.size; final wrappedInContainer = size.width < 1200; - final color = wrappedInContainer - ? null - : theme.colorScheme.background.scale( - lightness: theme.isLight ? -0.02 : 0.02, - saturation: -0.5, - ); + final color = wrappedInContainer ? Colors.transparent : theme.containerBg; return YaruDetailPage( appBar: HeaderBar( @@ -49,6 +44,8 @@ class StationPage extends StatelessWidget with WatchItMixin { slivers: [ SliverRadioPageHeader(station: station), SliverAppBar( + shape: const RoundedRectangleBorder(side: BorderSide.none), + elevation: 0, backgroundColor: color, automaticallyImplyLeading: false, toolbarHeight: 80, diff --git a/lib/theme_data_x.dart b/lib/theme_data_x.dart index 54eb05f51..558a3d5f2 100644 --- a/lib/theme_data_x.dart +++ b/lib/theme_data_x.dart @@ -1,6 +1,8 @@ import 'package:flutter/material.dart'; import 'package:yaru/yaru.dart'; +import 'theme.dart'; + extension ThemeDataX on ThemeData { bool get isLight => brightness == Brightness.light; Color get contrastyPrimary => @@ -13,4 +15,10 @@ extension ThemeDataX on ThemeData { fontSize: 30, color: colorScheme.onSurface.withOpacity(0.9), ); + + Color get containerBg => colorScheme.background.scale( + lightness: + isLight ? (yaruStyled ? -0.03 : -0.02) : (yaruStyled ? 0.01 : 0.02), + saturation: -0.5, + ); }