I have a CustomScrollView that I need a fixed text entry field at the bottom. A post here suggestion a Stack with a Positioned Widget which worked great:
Scaffold(
appBar: appBarBuilder == null ? null : appBarBuilder(context),
body: RefreshIndicator(
onRefresh: onRefresh,
child: Stack(
children: <Widget>[
CustomScrollView(
controller: controller,
slivers: <Widget>[
if (showImage)
SliverAppBar(
expandedHeight: showImage ? 100 : 50,
title: showImage ? image : null,
centerTitle: true,
floating: true,
pinned: false,
),
sliverList,
],
),
Positioned(
bottom: 0,
left: 0,
right: 0,
child: TextFormField(),
),
],
),
),
);
Except that the positioned widget overlaps my CustomScrollView. I could add a white background, but I'd rather the CustomScrollView stop short of my TextFormField. How do I do that? Below is the current rendering:
question from:
https://stackoverflow.com/questions/65832903/positioned-widget-overlapping-my-customscrollview 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…