onValueChange property Null safety

(void Function?(String? next, {String? prev})?) onValueChange
final

It is called every-time the widget's value changes.

This property is handy in cases where you want to generate a side-effect on value selection. For example: You want to show a pop-up modal with the valid discount coupon code when a user searches for a product in a SearchController.

Implementation

final void Function(String? next, {String? prev})? onValueChange;