From 1dab572280702a495b2851773bc1dd94c9235470 Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Mon, 9 Mar 2026 18:48:14 -0700 Subject: [PATCH] remove redundant edge borders where blur effect provides separation Co-Authored-By: Claude Opus 4.6 --- lib/screens/home/search/search.dart | 30 ------------------- .../home/top/categories/category_streams.dart | 14 +-------- lib/widgets/settings_page_layout.dart | 8 ----- 3 files changed, 1 insertion(+), 51 deletions(-) diff --git a/lib/screens/home/search/search.dart b/lib/screens/home/search/search.dart index 00c9d256..6c58a1a4 100644 --- a/lib/screens/home/search/search.dart +++ b/lib/screens/home/search/search.dart @@ -43,7 +43,6 @@ class _SearchState extends State { builder: (context) { if (_searchStore.searchText.isEmpty) { if (_searchStore.searchHistory.isEmpty) { - // Keep controller attached so borders stay in sync return CustomScrollView( controller: widget.scrollController, slivers: [ @@ -220,35 +219,6 @@ class _SearchState extends State { } _searchStore.textEditingController.clear(); _searchStore.onSearchTextChanged(''); - // Ensure borders reset: scroll back to top and trigger listeners - if (widget.scrollController.hasClients) { - widget.scrollController.animateTo( - 0, - duration: const Duration( - milliseconds: 150, - ), - curve: Curves.easeOut, - ); - } - // After the frame (when content swaps), re-evaluate border state - WidgetsBinding.instance.addPostFrameCallback(( - _, - ) { - if (widget.scrollController.hasClients) { - // Nudge listeners even if already at zero - final offset = - widget.scrollController.offset; - final target = (offset == 0) - ? 0.01 - : 0.0; - widget.scrollController.jumpTo( - (offset == 0) ? target : 0.0, - ); - if (target == 0.01) { - widget.scrollController.jumpTo(0.0); - } - } - }); }, ) : null, diff --git a/lib/screens/home/top/categories/category_streams.dart b/lib/screens/home/top/categories/category_streams.dart index 99de8693..fd1fc0c2 100644 --- a/lib/screens/home/top/categories/category_streams.dart +++ b/lib/screens/home/top/categories/category_streams.dart @@ -63,18 +63,7 @@ class _CategoryStreamsState extends State { left: MediaQuery.of(context).padding.left, right: MediaQuery.of(context).padding.right, ), - child: Container( - decoration: BoxDecoration( - border: Border( - bottom: BorderSide( - color: theme.colorScheme.outlineVariant.withValues( - alpha: 0.3, - ), - width: 0.5, - ), - ), - ), - child: Column( + child: Column( mainAxisSize: MainAxisSize.min, children: [ // App bar section @@ -144,7 +133,6 @@ class _CategoryStreamsState extends State { ), ], ), - ), ), ), ], diff --git a/lib/widgets/settings_page_layout.dart b/lib/widgets/settings_page_layout.dart index 50864ddb..9b6ebd31 100644 --- a/lib/widgets/settings_page_layout.dart +++ b/lib/widgets/settings_page_layout.dart @@ -1,12 +1,10 @@ import 'package:flutter/material.dart'; import 'package:frosty/utils/context_extensions.dart'; -import 'package:frosty/widgets/animated_scroll_border.dart'; import 'package:frosty/widgets/frosty_scrollbar.dart'; /// A reusable layout for settings pages that handles common functionality: /// - Orientation detection /// - Responsive padding calculations -/// - AnimatedScrollBorder positioning /// - ScrollController management class SettingsPageLayout extends StatefulWidget { final List children; @@ -60,12 +58,6 @@ class _SettingsPageLayoutState extends State { children: widget.children, ), ), - Positioned( - top: borderTop.toDouble(), - left: 0, - right: 0, - child: AnimatedScrollBorder(scrollController: _scrollController), - ), ], );