getOffsetX method

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

Calculates x-offset for start-aligned FloatingActionButtonLocations.

Implementation

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