-
Notifications
You must be signed in to change notification settings - Fork 299
Open
Description
I tried to use a custom widget button in confirm, but when i create a new widget with confirm argument, the onConfirm doesnt activate.
Here is the simple example
showPickerArray(BuildContext context) {
Picker(
adapter: PickerDataAdapter<String>(
pickerData: [
[0, 1, 2],
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
],
isArray: true,
),
hideHeader: true,
selecteds: [2, 0, 3],
title: Text(label),
selectedTextStyle: const TextStyle(color: Colors.blue),
cancel: TextButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text(
'Cancelar',
),
),
confirm: TextButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text(
'Confirmar',
),
),
onConfirm: (Picker picker, List value) {
print(value.toString());
print(picker.getSelectedValues());
},
onCancel: () {
print('Cancelado');
},
).showDialog(context);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels