ButtonGroupData.horizontalIndex constructor

ButtonGroupData.horizontalIndex(
  1. int index,
  2. int length
)

Creates group data for a button at index in a horizontal group of length buttons.

Returns:

Implementation

factory ButtonGroupData.horizontalIndex(int index, int length) {
  if (length <= 1) {
    return none;
  } else {
    if (index == 0) {
      return horizontalStart;
    } else if (index == length - 1) {
      return horizontalEnd;
    } else {
      return zero;
    }
  }
}