android appWindow related bug in Home fix

This commit is contained in:
Kingkor Roy Tirtho 2022-03-21 21:28:26 +06:00
parent f6969d678a
commit 8dea8dc051
3 changed files with 27 additions and 28 deletions

View File

@ -162,12 +162,7 @@ class Home extends HookConsumerWidget {
}; };
}, [localStorage]); }, [localStorage]);
return SafeArea( final titleBarContents = Row(
child: Scaffold(
body: Column(
children: [
WindowTitleBarBox(
child: Row(
children: [ children: [
Expanded( Expanded(
child: Row( child: Row(
@ -176,18 +171,24 @@ class Home extends HookConsumerWidget {
constraints: BoxConstraints( constraints: BoxConstraints(
maxWidth: titleBarDragMaxWidth.toDouble(), maxWidth: titleBarDragMaxWidth.toDouble(),
), ),
color: Theme.of(context) color: Theme.of(context).navigationRailTheme.backgroundColor,
.navigationRailTheme
.backgroundColor,
child: MoveWindow(), child: MoveWindow(),
), ),
Expanded(child: MoveWindow()), Expanded(child: MoveWindow()),
if (!Platform.isMacOS) const TitleBarActionButtons(), if (!Platform.isMacOS && !Platform.isAndroid && !Platform.isIOS)
const TitleBarActionButtons(),
], ],
)) ))
], ],
), );
),
return SafeArea(
child: Scaffold(
body: Column(
children: [
Platform.isAndroid || Platform.isIOS
? titleBarContents
: WindowTitleBarBox(child: titleBarContents),
Expanded( Expanded(
child: Row( child: Row(
children: [ children: [

View File

@ -2,9 +2,7 @@ import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart'; import 'package:go_router/go_router.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:spotify/spotify.dart'; import 'package:spotify/spotify.dart';
import 'package:spotube/components/Playlist/PlaylistView.dart';
import 'package:spotube/components/Shared/PlaybuttonCard.dart'; import 'package:spotube/components/Shared/PlaybuttonCard.dart';
import 'package:spotube/components/Shared/SpotubePageRoute.dart';
import 'package:spotube/helpers/image-to-url-string.dart'; import 'package:spotube/helpers/image-to-url-string.dart';
import 'package:spotube/hooks/useBreakpointValue.dart'; import 'package:spotube/hooks/useBreakpointValue.dart';
import 'package:spotube/provider/Playback.dart'; import 'package:spotube/provider/Playback.dart';

View File

@ -79,16 +79,16 @@ BreakpointUtils useBreakpoints() {
width <= 1920 && width <= 1920 &&
breakpoint.value != Breakpoints.xl) { breakpoint.value != Breakpoints.xl) {
breakpoint.value = Breakpoints.xl; breakpoint.value = Breakpoints.xl;
} else if (width > 768 && } else if (width > 800 &&
width <= 1366 && width <= 1366 &&
breakpoint.value != Breakpoints.lg) { breakpoint.value != Breakpoints.lg) {
breakpoint.value = Breakpoints.lg; breakpoint.value = Breakpoints.lg;
} else if (width > 360 && } else if (width > 414 &&
width <= 768 && width <= 800 &&
breakpoint.value != Breakpoints.md) { breakpoint.value != Breakpoints.md) {
breakpoint.value = Breakpoints.md; breakpoint.value = Breakpoints.md;
} else if (width >= 250 && } else if (width >= 250 &&
width <= 360 && width <= 414 &&
breakpoint.value != Breakpoints.sm) { breakpoint.value != Breakpoints.sm) {
breakpoint.value = Breakpoints.sm; breakpoint.value = Breakpoints.sm;
} }