getOffsetX method

  1. @override
double getOffsetX(
  1. ScaffoldPrelayoutGeometry scaffoldGeometry,
  2. double adjustment
)
override

Calculates x-offset for end-aligned FloatingActionButtonLocations.

Implementation

@override
double getOffsetX(ScaffoldPrelayoutGeometry scaffoldGeometry, double adjustment) {
  return switch (scaffoldGeometry.textDirection) {
    TextDirection.rtl => StandardFabLocation._leftOffsetX(scaffoldGeometry, adjustment),
    TextDirection.ltr => StandardFabLocation._rightOffsetX(scaffoldGeometry, adjustment),
  };
}