getChildren method Null safety

  1. @visibleForTesting
List<Widget>? getChildren()

Implementation

@visibleForTesting
List<Widget>? getChildren() {
  final List<Widget> _fittedButtons = [];
  for (var button in buttons) {
    _fittedButtons.add(
      SizedBox(
        width: style?.width,
        height: style?.height,
        child: FittedBox(
          fit: BoxFit.fill,
          child: button,
        ),
      ),
    );
  }

  if (style?.buttonType != AuthButtonType.icon) {
    return _fittedButtons;
  }
  return null;
}