getOffset method

  1. @override
Offset getOffset(
  1. ScaffoldPrelayoutGeometry scaffoldGeometry
)
override

Places the FloatingActionButton based on the Scaffold's layout.

This uses a ScaffoldPrelayoutGeometry, which the Scaffold constructs during its layout phase after it has laid out every widget it can lay out except the FloatingActionButton. The Scaffold uses the Offset returned from this method to position the FloatingActionButton and complete its layout.

Implementation

@override
Offset getOffset(ScaffoldPrelayoutGeometry scaffoldGeometry) {
  final Offset baseOffset = baseLocation.getOffset(scaffoldGeometry);
  return baseOffset + offset;
}