Skip to content

Commit

Permalink
fix(mobile): SafeArea bugs and back button color
Browse files Browse the repository at this point in the history
  • Loading branch information
KRTirtho committed Nov 24, 2022
1 parent 3b6bf27 commit a8330ef
Show file tree
Hide file tree
Showing 6 changed files with 305 additions and 294 deletions.
3 changes: 2 additions & 1 deletion lib/components/Home/Genres.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:spotube/components/Shared/Waypoint.dart';
import 'package:spotube/provider/SpotifyDI.dart';
import 'package:spotube/provider/SpotifyRequests.dart';
import 'package:spotube/provider/UserPreferences.dart';
import 'package:spotube/utils/platform.dart';

class Genres extends HookConsumerWidget {
const Genres({Key? key}) : super(key: key);
Expand Down Expand Up @@ -43,7 +44,7 @@ class Genres extends HookConsumerWidget {
];

return PlatformScaffold(
appBar: PageWindowTitleBar(),
appBar: kIsDesktop ? PageWindowTitleBar() : null,
body: ListView.builder(
itemCount: categories.length,
itemBuilder: (context, index) {
Expand Down
38 changes: 20 additions & 18 deletions lib/components/Library/UserLibrary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,28 @@ class UserLibrary extends HookConsumerWidget {
const UserAlbums(),
][index.value];

return PlatformScaffold(
appBar: PageWindowTitleBar(
titleWidth: 347,
centerTitle: true,
center: PlatformTabBar(
androidIsScrollable: true,
selectedIndex: index.value,
onSelectedIndexChanged: (value) => index.value = value,
isNavigational:
PlatformProperty.byPlatformGroup(mobile: false, desktop: true),
tabs: [
PlatformTab(label: 'Playlists', icon: const SizedBox.shrink()),
PlatformTab(label: 'Tracks', icon: const SizedBox.shrink()),
PlatformTab(label: 'Downloads', icon: const SizedBox.shrink()),
PlatformTab(label: 'Artists', icon: const SizedBox.shrink()),
PlatformTab(label: 'Albums', icon: const SizedBox.shrink()),
],
return SafeArea(
child: PlatformScaffold(
appBar: PageWindowTitleBar(
titleWidth: 347,
centerTitle: true,
center: PlatformTabBar(
androidIsScrollable: true,
selectedIndex: index.value,
onSelectedIndexChanged: (value) => index.value = value,
isNavigational:
PlatformProperty.byPlatformGroup(mobile: false, desktop: true),
tabs: [
PlatformTab(label: 'Playlists', icon: const SizedBox.shrink()),
PlatformTab(label: 'Tracks', icon: const SizedBox.shrink()),
PlatformTab(label: 'Downloads', icon: const SizedBox.shrink()),
PlatformTab(label: 'Artists', icon: const SizedBox.shrink()),
PlatformTab(label: 'Albums', icon: const SizedBox.shrink()),
],
),
),
body: body,
),
body: body,
);
}
}
6 changes: 3 additions & 3 deletions lib/components/Player/PlayerOverlay.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class PlayerOverlay extends HookConsumerWidget {
),
Row(
children: [
PlatformIconButton(
IconButton(
icon: Icon(
Icons.skip_previous_rounded,
color: paletteColor.bodyTextColor,
Expand All @@ -91,7 +91,7 @@ class PlayerOverlay extends HookConsumerWidget {
}),
Consumer(
builder: (context, ref, _) {
return PlatformIconButton(
return IconButton(
icon: Icon(
ref.read(playbackProvider).isPlaying
? Icons.pause_rounded
Expand All @@ -105,7 +105,7 @@ class PlayerOverlay extends HookConsumerWidget {
);
},
),
PlatformIconButton(
IconButton(
icon: Icon(
Icons.skip_next_rounded,
color: paletteColor.bodyTextColor,
Expand Down
Loading

0 comments on commit a8330ef

Please sign in to comment.