isLastButton static method
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);
}