import 'package:flutter/widgets.dart'; import '../../../ui/adaptive/floating_bar_layout.dart'; /// The bar's own side inset, so the column starts under the title pill. const double kSearchContentInset = 12; /// Search's scroll view: it runs behind the floating top bar (the first item /// starts below the bar's height, read from the media padding), ends clear of /// a floating tab bar, and spans each sliver across the whole pane between /// the bar's own side insets, at every width. class SearchScrollView extends StatelessWidget { const SearchScrollView({super.key, required this.slivers}); final List slivers; @override Widget build(BuildContext context) { final padding = MediaQuery.paddingOf(context); return CustomScrollView( slivers: [ SliverToBoxAdapter(child: SizedBox(height: padding.top + 4)), for (final sliver in slivers) SliverPadding( padding: EdgeInsetsDirectional.only( start: kSearchContentInset + padding.left, end: kSearchContentInset + padding.right, ), sliver: sliver, ), const SliverFloatingBarClearance(), ], ); } }