From 64aafa7b108174aba406f91387cfabacfeb5816f Mon Sep 17 00:00:00 2001 From: ZhuchkaTriplesix Date: Sat, 17 Oct 2026 07:00:21 +0300 Subject: [PATCH] ui(settings): fix nested SingleChildScrollView in PreferencesAppearanceSection (#1650) --- .../preferences_appearance_section.dart | 17 +++++++---------- .../preferences_appearance_section_test.dart | 13 +++++++++++++ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/lib/features/settings/preferences_appearance_section.dart b/lib/features/settings/preferences_appearance_section.dart index f4794773..a5c7e115 100644 --- a/lib/features/settings/preferences_appearance_section.dart +++ b/lib/features/settings/preferences_appearance_section.dart @@ -152,12 +152,10 @@ class _PreferencesAppearanceSectionState final themes = c.availableThemes; final refreshingThemes = c.isLoadingAvailableThemes; - return material.SingleChildScrollView( - primary: false, - child: material.Column( - crossAxisAlignment: material.CrossAxisAlignment.start, - children: [ - const Text('Appearance').semiBold().small().foreground(), + return material.Column( + crossAxisAlignment: material.CrossAxisAlignment.start, + children: [ + const Text('Appearance').semiBold().small().foreground(), const material.SizedBox(height: 8), PreferencesFieldRow( label: 'Theme mode', @@ -365,10 +363,9 @@ class _PreferencesAppearanceSectionState 'Install from URL requires HTTPS and optional SHA-256 verification. ' 'VS Code JSON/JSONC (.colors subset) and Querya custom JSON are supported.', ), - ], - ), + ], + ); + }, ); - }, -); } } diff --git a/test/features/settings/preferences_appearance_section_test.dart b/test/features/settings/preferences_appearance_section_test.dart index c03b7600..951b172b 100644 --- a/test/features/settings/preferences_appearance_section_test.dart +++ b/test/features/settings/preferences_appearance_section_test.dart @@ -170,5 +170,18 @@ void main() { expect(ThemeController.instance.themeAnimationEnabled, isTrue); }); + + testWidgets('does not wrap body in inner SingleChildScrollView (#1650)', + (tester) async { + await pumpSection(tester); + + expect( + find.descendant( + of: find.byType(PreferencesAppearanceSection), + matching: find.byType(material.SingleChildScrollView), + ), + findsNothing, + ); + }); }); }