Skip to content

Commit cdd6eb6

Browse files
committed
streambuilder added for body
1 parent 426b74b commit cdd6eb6

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

lib/components/bottom_sheet/gf_bottom_sheet.dart

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,22 @@ class _GFBottomSheetState extends State<GFBottomSheet>
128128
),
129129
),
130130
),
131+
StreamBuilder(
132+
stream: controller.stream,
133+
builder:(context,snapshot) => GestureDetector(
134+
onVerticalDragUpdate: (DragUpdateDetails details){
135+
position = MediaQuery.of(context).size.height- details.globalPosition.dy;
136+
position.isNegative ? Navigator.pop(context) :controller.add(position);
137+
},
138+
behavior: HitTestBehavior.translucent,
139+
child:
140+
Container(
141+
color: Colors.red,
142+
height: snapshot.hasData ? snapshot.data : 100.0,
143+
width: double.infinity,
144+
child: Text('Child'),
145+
)),
146+
),
131147
widget.stickyFooter != null
132148
? AnimatedBuilder(
133149
animation: widget.controller,

0 commit comments

Comments
 (0)