getButtons method

List<ZetaGroupButton> getButtons()

Returns ZetaGroupButtons with there appropriate styling.

Implementation

List<ZetaGroupButton> getButtons() {
  final List<ZetaGroupButton> mappedButtons = [];

  for (final (index, button) in buttons.indexed) {
    mappedButtons.add(
      button.copyWith(
        isLarge: isLarge,
        isInverse: isInverse,
        isFinal: index == buttons.length - 1,
        isInitial: index == 0,
      ),
    );
  }

  return mappedButtons;
}