info: padding at the sliver level, to improve overscroll feedback look
This commit is contained in:
parent
f5f13527fa
commit
dc397ea29b
1 changed files with 29 additions and 18 deletions
|
@ -38,6 +38,8 @@ class InfoPageState extends State<InfoPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
const horizontalPadding = EdgeInsets.symmetric(horizontal: 8);
|
||||||
|
|
||||||
return MediaQueryDataProvider(
|
return MediaQueryDataProvider(
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
@ -58,15 +60,15 @@ class InfoPageState extends State<InfoPage> {
|
||||||
final mqViewInsetsBottom = mq.item2;
|
final mqViewInsetsBottom = mq.item2;
|
||||||
final split = mqWidth > 400;
|
final split = mqWidth > 400;
|
||||||
|
|
||||||
return Padding(
|
return CustomScrollView(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
|
||||||
child: CustomScrollView(
|
|
||||||
slivers: [
|
slivers: [
|
||||||
const SliverPadding(
|
const SliverPadding(
|
||||||
padding: EdgeInsets.only(top: 8),
|
padding: EdgeInsets.only(top: 8),
|
||||||
),
|
),
|
||||||
if (split && entry.hasGps)
|
if (split && entry.hasGps)
|
||||||
SliverToBoxAdapter(
|
SliverPadding(
|
||||||
|
padding: horizontalPadding,
|
||||||
|
sliver: SliverToBoxAdapter(
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
@ -75,9 +77,12 @@ class InfoPageState extends State<InfoPage> {
|
||||||
Expanded(child: LocationSection(entry: entry, showTitle: false)),
|
Expanded(child: LocationSection(entry: entry, showTitle: false)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
SliverList(
|
SliverPadding(
|
||||||
|
padding: horizontalPadding,
|
||||||
|
sliver: SliverList(
|
||||||
delegate: SliverChildListDelegate(
|
delegate: SliverChildListDelegate(
|
||||||
[
|
[
|
||||||
BasicSection(entry: entry),
|
BasicSection(entry: entry),
|
||||||
|
@ -85,13 +90,19 @@ class InfoPageState extends State<InfoPage> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
XmpTagSectionSliver(collection: widget.collection, entry: entry),
|
),
|
||||||
MetadataSectionSliver(entry: entry, columnCount: split ? 2 : 1),
|
SliverPadding(
|
||||||
|
padding: horizontalPadding,
|
||||||
|
sliver: XmpTagSectionSliver(collection: widget.collection, entry: entry),
|
||||||
|
),
|
||||||
|
SliverPadding(
|
||||||
|
padding: horizontalPadding,
|
||||||
|
sliver: MetadataSectionSliver(entry: entry, columnCount: split ? 2 : 1),
|
||||||
|
),
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
padding: EdgeInsets.only(bottom: 8 + mqViewInsetsBottom),
|
padding: EdgeInsets.only(bottom: 8 + mqViewInsetsBottom),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue