Skip to content

Support Scrolling within Floating Overlay #5

Description

@ac-arconomy

Hi - thanks for building a great widget. Are you still supporting this?

I am building for flutter web app - and the floating overlay uses the Positioned widget which means that a scrollable widget as a child does not scroll unless all the constructors for the positioned widget are set.

https://stackoverflow.com/questions/59936098/listview-not-scrolling-in-positioned-widget

I have forked the repo and updated the _Reposition class to set the right and bottom properties of the Positioned constructor to 0 (see below) - although this means that the overlay cannot be scaled from the right or bottom anymore.

  @override
  Widget build(BuildContext context) {
    return StreamBuilder<Offset>(
      initialData: offsetController.state,
      stream: offsetController.stream,
      builder: (context, snapshot) {
        final position = snapshot.data!;
        return Positioned(
          top: position.dy,
          left: position.dx,
          bottom: 0,
          right: 0,
          child: child,
        );
      },
    );
  }

Any suggestions for how to set the right and bottom properties correctly in the _Reposition class so that the overlay will still scale from all 4 sides? I think the solution maybe to pass in the _Side.bottom and _Side.right from the get _entryProcesWidgets call in the floating_overlay_controller?

Many Thanks
Alistair

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions