codegrue / flutter_material_pickers

A flutter package for displaying common picker dialogs.
https://pub.dev/packages/flutter_material_pickers
MIT License
98 stars 61 forks source link

onChanged in showMaterialResponsiveDialog not working #6

Closed fernando-s97 closed 4 years ago

fernando-s97 commented 4 years ago

onChanged isn't invoking the function passed to it. All it does is to close the dialog.

showMaterialResponsiveDialog(
          context: context,
          maxLongSide: 300,
          title: 'Title',
          cancelText: 'cancelText',
          confirmText: 'confirmText',
          onChanged: (_) => print('teste'),
);
codegrue commented 4 years ago

onChanged only happens if returned data is different. I added an onCommitted method that return when the ok button is pressed. Release 1.7.9