fix: settings page scrollbar position

This commit is contained in:
Kingkor Roy Tirtho 2023-11-27 19:39:53 +06:00
parent 722dd86810
commit ee8229020b
2 changed files with 11 additions and 9 deletions

View File

@ -114,8 +114,9 @@ class SearchPage extends HookConsumerWidget {
),
color: theme.scaffoldBackgroundColor,
child: TextField(
autofocus:
queries.none((s) => s.hasPageData && !s.hasPageError),
autofocus: queries
.none((s) => s.hasPageData && !s.hasPageError) &&
!kIsMobile,
decoration: InputDecoration(
prefixIcon: const Icon(SpotubeIcons.search),
hintText: "${context.l10n.search}...",

View File

@ -30,12 +30,13 @@ class SettingsPage extends HookConsumerWidget {
title: Text(context.l10n.settings),
centerTitle: true,
),
body: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Flexible(
child: Container(
body: Scrollbar(
controller: controller,
child: Center(
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 1366),
child: ScrollConfiguration(
behavior: const ScrollBehavior().copyWith(scrollbars: false),
child: ListView(
controller: controller,
children: [
@ -59,7 +60,7 @@ class SettingsPage extends HookConsumerWidget {
),
),
),
],
),
),
),
);