remove redundant edge borders where blur effect provides separation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
872362d5a6
commit
1dab572280
3 changed files with 1 additions and 51 deletions
|
|
@ -43,7 +43,6 @@ class _SearchState extends State<Search> {
|
|||
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<Search> {
|
|||
}
|
||||
_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,
|
||||
|
|
|
|||
|
|
@ -63,18 +63,7 @@ class _CategoryStreamsState extends State<CategoryStreams> {
|
|||
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<CategoryStreams> {
|
|||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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<Widget> children;
|
||||
|
|
@ -60,12 +58,6 @@ class _SettingsPageLayoutState extends State<SettingsPageLayout> {
|
|||
children: widget.children,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
top: borderTop.toDouble(),
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: AnimatedScrollBorder(scrollController: _scrollController),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue