isLastButton static method

bool isLastButton(
  1. int index,
  2. int length,
  3. TextDirection textDirection
)

Determines if this is the last child that is being laid out.

Implementation

static bool isLastButton(int index, int length, TextDirection textDirection) {
  return (index == length - 1 && textDirection == TextDirection.ltr) ||
      (index == 0 && textDirection == TextDirection.rtl);
}