mirror of
https://github.com/KRTirtho/spotube.git
synced 2025-09-13 07:55:18 +00:00
fix(android): system navigator back doesn't close player
This commit is contained in:
parent
e5d0aaf80d
commit
20d70927c9
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@ -8,7 +8,7 @@
|
||||
"program": "lib/main.dart",
|
||||
"args": [
|
||||
"--flavor",
|
||||
"nightly"
|
||||
"dev"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -82,6 +82,12 @@ android {
|
||||
applicationIdSuffix ".nightly"
|
||||
versionNameSuffix "-nightly"
|
||||
}
|
||||
dev {
|
||||
dimension "default"
|
||||
resValue "string", "app_name", "Spotube Dev"
|
||||
applicationIdSuffix ".dev"
|
||||
versionNameSuffix "-dev"
|
||||
}
|
||||
stable {
|
||||
dimension "default"
|
||||
resValue "string", "app_name", "Spotube"
|
||||
|
@ -75,7 +75,12 @@ class PlayerView extends HookConsumerWidget {
|
||||
noSetBGColor: true,
|
||||
);
|
||||
|
||||
return IconTheme(
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
onClosePage();
|
||||
return false;
|
||||
},
|
||||
child: IconTheme(
|
||||
data: theme.iconTheme.copyWith(color: bodyTextColor),
|
||||
child: Scaffold(
|
||||
appBar: PreferredSize(
|
||||
@ -183,7 +188,8 @@ class PlayerView extends HookConsumerWidget {
|
||||
),
|
||||
if (isLocalTrack)
|
||||
Text(
|
||||
TypeConversionUtils.artists_X_String<Artist>(
|
||||
TypeConversionUtils.artists_X_String<
|
||||
Artist>(
|
||||
currentTrack?.artists ?? [],
|
||||
),
|
||||
style: theme.textTheme.bodyMedium!.copyWith(
|
||||
@ -192,7 +198,8 @@ class PlayerView extends HookConsumerWidget {
|
||||
),
|
||||
)
|
||||
else
|
||||
TypeConversionUtils.artists_X_ClickableArtists(
|
||||
TypeConversionUtils
|
||||
.artists_X_ClickableArtists(
|
||||
currentTrack?.artists ?? [],
|
||||
textStyle:
|
||||
theme.textTheme.bodyMedium!.copyWith(
|
||||
@ -243,7 +250,8 @@ class PlayerView extends HookConsumerWidget {
|
||||
BorderRadius.circular(10),
|
||||
),
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: MediaQuery.of(context)
|
||||
maxHeight:
|
||||
MediaQuery.of(context)
|
||||
.size
|
||||
.height *
|
||||
.7,
|
||||
@ -283,8 +291,9 @@ class PlayerView extends HookConsumerWidget {
|
||||
),
|
||||
),
|
||||
constraints: BoxConstraints(
|
||||
maxHeight:
|
||||
MediaQuery.of(context).size.height *
|
||||
maxHeight: MediaQuery.of(context)
|
||||
.size
|
||||
.height *
|
||||
0.8,
|
||||
),
|
||||
builder: (context) =>
|
||||
@ -324,6 +333,7 @@ class PlayerView extends HookConsumerWidget {
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user