buildActions method

  1. @override
  2. @protected
List<Widget> buildActions()
override

Implementation

@override
@protected
List<Widget> buildActions() {
  if (widget.actions == null) {
    return [];
  }
  var actions = <Widget>[];
  var bottomActions = <Widget>[];

  for (var value in widget.actions!) {
    if (value.bottom == true) {
      bottomActions.add(Expanded(child: wrap(value)));
    } else {
      actions.add(wrap(value));
    }
  }
  var actionWidgets = <Widget>[];
  actionWidgets.add(AntdColumn(
      style: const AntdFlexStyle(mainAxisSize: MainAxisSize.min),
      children: actions));
  if (bottomActions.isNotEmpty) {
    actionWidgets.add(AntdRow(
      children: bottomActions,
    ));
  }
  return actionWidgets;
}