mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
Safearea fix for Home widgets
This commit is contained in:
parent
42257d9615
commit
e2bba4ac94
@ -94,8 +94,7 @@ class Home extends HookConsumerWidget {
|
|||||||
return null;
|
return null;
|
||||||
}, [backgroundColor]);
|
}, [backgroundColor]);
|
||||||
|
|
||||||
return SafeArea(
|
return Scaffold(
|
||||||
child: Scaffold(
|
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
if (_selectedIndex.value != 3)
|
if (_selectedIndex.value != 3)
|
||||||
@ -142,8 +141,7 @@ class Home extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
return PagedListView(
|
return PagedListView(
|
||||||
pagingController: pagingController,
|
pagingController: pagingController,
|
||||||
builderDelegate:
|
builderDelegate: PagedChildBuilderDelegate<Category>(
|
||||||
PagedChildBuilderDelegate<Category>(
|
|
||||||
firstPageProgressIndicatorBuilder: (_) =>
|
firstPageProgressIndicatorBuilder: (_) =>
|
||||||
const ShimmerCategories(),
|
const ShimmerCategories(),
|
||||||
newPageProgressIndicatorBuilder: (_) =>
|
newPageProgressIndicatorBuilder: (_) =>
|
||||||
@ -170,7 +168,6 @@ class Home extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,11 +15,13 @@ class UserLibrary extends ConsumerWidget {
|
|||||||
return Expanded(
|
return Expanded(
|
||||||
child: DefaultTabController(
|
child: DefaultTabController(
|
||||||
length: 3,
|
length: 3,
|
||||||
|
child: SafeArea(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: TabBar(
|
appBar: TabBar(
|
||||||
indicator: const BoxDecoration(color: Colors.transparent),
|
indicator: const BoxDecoration(color: Colors.transparent),
|
||||||
labelColor: Theme.of(context).primaryColor,
|
labelColor: Theme.of(context).primaryColor,
|
||||||
unselectedLabelColor: Theme.of(context).textTheme.bodyText1?.color,
|
unselectedLabelColor:
|
||||||
|
Theme.of(context).textTheme.bodyText1?.color,
|
||||||
tabs: const [
|
tabs: const [
|
||||||
Tab(text: "Playlist"),
|
Tab(text: "Playlist"),
|
||||||
Tab(text: "Artists"),
|
Tab(text: "Artists"),
|
||||||
@ -35,6 +37,7 @@ class UserLibrary extends ConsumerWidget {
|
|||||||
: const AnonymousFallback(),
|
: const AnonymousFallback(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ class Lyrics extends HookConsumerWidget {
|
|||||||
return Text(
|
return Text(
|
||||||
lyrics == null && playback.track == null
|
lyrics == null && playback.track == null
|
||||||
? "No Track being played currently"
|
? "No Track being played currently"
|
||||||
: lyrics!,
|
: lyrics ?? "",
|
||||||
style: textTheme.headline6
|
style: textTheme.headline6
|
||||||
?.copyWith(color: textTheme.headline1?.color),
|
?.copyWith(color: textTheme.headline1?.color),
|
||||||
);
|
);
|
||||||
|
@ -14,6 +14,7 @@ import 'package:spotube/helpers/artist-to-string.dart';
|
|||||||
import 'package:spotube/helpers/image-to-url-string.dart';
|
import 'package:spotube/helpers/image-to-url-string.dart';
|
||||||
import 'package:spotube/hooks/useAutoScrollController.dart';
|
import 'package:spotube/hooks/useAutoScrollController.dart';
|
||||||
import 'package:spotube/hooks/useBreakpoints.dart';
|
import 'package:spotube/hooks/useBreakpoints.dart';
|
||||||
|
import 'package:spotube/hooks/useCustomStatusBarColor.dart';
|
||||||
import 'package:spotube/hooks/usePaletteColor.dart';
|
import 'package:spotube/hooks/usePaletteColor.dart';
|
||||||
import 'package:spotube/hooks/useSyncedLyrics.dart';
|
import 'package:spotube/hooks/useSyncedLyrics.dart';
|
||||||
import 'package:spotube/provider/Playback.dart';
|
import 'package:spotube/provider/Playback.dart';
|
||||||
@ -110,6 +111,12 @@ class SyncedLyrics extends HookConsumerWidget {
|
|||||||
: textTheme.headline4?.copyWith(fontSize: 25))
|
: textTheme.headline4?.copyWith(fontSize: 25))
|
||||||
?.copyWith(color: palette.titleTextColor);
|
?.copyWith(color: palette.titleTextColor);
|
||||||
|
|
||||||
|
useCustomStatusBarColor(
|
||||||
|
palette.color,
|
||||||
|
true,
|
||||||
|
noSetBGColor: true,
|
||||||
|
);
|
||||||
|
|
||||||
return Expanded(
|
return Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
@ -126,6 +133,7 @@ class SyncedLyrics extends HookConsumerWidget {
|
|||||||
filter: ImageFilter.blur(sigmaX: 15, sigmaY: 15),
|
filter: ImageFilter.blur(sigmaX: 15, sigmaY: 15),
|
||||||
child: Container(
|
child: Container(
|
||||||
color: palette.color.withOpacity(.7),
|
color: palette.color.withOpacity(.7),
|
||||||
|
child: SafeArea(
|
||||||
child: failed.value
|
child: failed.value
|
||||||
? Lyrics(titleBarForegroundColor: palette.bodyTextColor)
|
? Lyrics(titleBarForegroundColor: palette.bodyTextColor)
|
||||||
: Column(
|
: Column(
|
||||||
@ -206,6 +214,7 @@ class SyncedLyrics extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,6 +120,14 @@ class PlayerView extends HookConsumerWidget {
|
|||||||
)..repeat();
|
)..repeat();
|
||||||
return RotationTransition(
|
return RotationTransition(
|
||||||
turns: Tween(begin: 0.0, end: 1.0).animate(controller),
|
turns: Tween(begin: 0.0, end: 1.0).animate(controller),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border.all(
|
||||||
|
color: paletteColor.titleTextColor,
|
||||||
|
width: 2,
|
||||||
|
),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
),
|
||||||
child: CircleAvatar(
|
child: CircleAvatar(
|
||||||
backgroundImage: CachedNetworkImageProvider(
|
backgroundImage: CachedNetworkImageProvider(
|
||||||
albumArt,
|
albumArt,
|
||||||
@ -128,6 +136,7 @@ class PlayerView extends HookConsumerWidget {
|
|||||||
radius: MediaQuery.of(context).size.width *
|
radius: MediaQuery.of(context).size.width *
|
||||||
(breakpoint.isSm ? 0.4 : 0.3),
|
(breakpoint.isSm ? 0.4 : 0.3),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
|
@ -37,19 +37,22 @@ class Search extends HookConsumerWidget {
|
|||||||
}
|
}
|
||||||
final searchSnapshot = ref.watch(searchQuery(searchTerm));
|
final searchSnapshot = ref.watch(searchQuery(searchTerm));
|
||||||
|
|
||||||
return Expanded(
|
return SafeArea(
|
||||||
|
child: Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Theme.of(context).backgroundColor,
|
color: Theme.of(context).backgroundColor,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
padding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 20, vertical: 10),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: controller,
|
controller: controller,
|
||||||
decoration: const InputDecoration(hintText: "Search..."),
|
decoration:
|
||||||
|
const InputDecoration(hintText: "Search..."),
|
||||||
onSubmitted: (value) {
|
onSubmitted: (value) {
|
||||||
ref.read(searchTermStateProvider.notifier).state =
|
ref.read(searchTermStateProvider.notifier).state =
|
||||||
controller.value.text;
|
controller.value.text;
|
||||||
@ -116,9 +119,10 @@ class Search extends HookConsumerWidget {
|
|||||||
imageToUrlString(track.value.album?.images),
|
imageToUrlString(track.value.album?.images),
|
||||||
isActive: playback.track?.id == track.value.id,
|
isActive: playback.track?.id == track.value.id,
|
||||||
onTrackPlayButtonPressed: (currentTrack) async {
|
onTrackPlayButtonPressed: (currentTrack) async {
|
||||||
var isPlaylistPlaying = playback.playlist?.id !=
|
var isPlaylistPlaying =
|
||||||
null &&
|
playback.playlist?.id != null &&
|
||||||
playback.playlist?.id == currentTrack.id;
|
playback.playlist?.id ==
|
||||||
|
currentTrack.id;
|
||||||
if (!isPlaylistPlaying) {
|
if (!isPlaylistPlaying) {
|
||||||
playback.playPlaylist(
|
playback.playPlaylist(
|
||||||
CurrentPlaylist(
|
CurrentPlaylist(
|
||||||
@ -216,6 +220,7 @@ class Search extends HookConsumerWidget {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user