0ceafcb6d7
Remove the 840 px Search reading cap (results column and bar pill) so both fill the pane at Fold and wide widths. Add a width test for the stage page at 880 and 1400 and deep-link/query flags to the search probe entry.
36 lines
1.2 KiB
Dart
36 lines
1.2 KiB
Dart
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<Widget> 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(),
|
|
],
|
|
);
|
|
}
|
|
}
|