dialogButtons method
List<Widget>
dialogButtons(
- AppModel app,
- BuildContext context, {
- required List<
String> labels, - required List<
VoidCallback?> functions,
override
Implementation
@override
List<Widget> dialogButtons(AppModel app, BuildContext context,
{required List<String> labels, required List<VoidCallback?> functions}) {
if (labels.length != functions.length) {
throw Exception(
'Amount of labels of buttons does not correspond functions');
}
var buttons = <Widget>[];
for (var i = 0; i < labels.length; i++) {
var label = labels[i];
var function = functions[i];
buttons
.add(dialogButton(app, context, onPressed: function, label: label));
}
return buttons;
}