2

I'm trying to build a screen where there is a fixed widget at the top of the screen and another widget which is fixed to the bottom of the screen and in between is a scrollable widget.

I want to have the content inside the scrollable widget scroll underneath the two fixed widgets (both with a transparent blur), to indicate that there is more content underneath.

Here is an image of what I am trying to do.

An image of a layout

I am currently using a Stack for this, however I am having to manually adjust the padding in the SingleChildScrollView to offset for the top and bottom widgets, but I would like to have this be much more flexible and have the widgets be any size and not have to update the padding.

I've found other examples where the bottom widget is part of the scrollable content but that isn't quite what I am looking for.

Does anyone know of a way to do this, without having to manually provide the padding?

Tomer Shetah
  • 8,413
  • 7
  • 27
  • 35
guranga
  • 31
  • 1
  • 5
  • Just guessing, [StackWidget](https://api.flutter.dev/flutter/widgets/Stack-class.html) with [this](https://stackoverflow.com/questions/43550853/how-do-i-do-the-frosted-glass-effect-in-flutter). Your SingleChildScrollView would have to be 100% height (otherwise the top/bottom widgets wouldn't be able to indicate there's anything underneath them) and you will have to offset the scroll to account for the height of the top and bottom widgets, so it sounds like you're almost there. – Adam Jenkins Jan 20 '21 at 16:23
  • Yeah I think that is what I have currently, the issue I have is that I am manually having to set an offset for the top and bottom widgets. However, I would like to have these top and bottom widgets determine their own size (e.g. using a `Column` for these widgets). – guranga Jan 20 '21 at 16:43

0 Answers0