onCancel property Null safety

VoidCallback? onCancel
final

Called whenever the cancel button tapped on date range picker. It reset the selected values to confirmed selected values.

See also:


Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(
          title: Text('Date Range Picker'),
        ),
        body: Container(
            child: SfDateRangePicker(
          showActionButtons: true,
          onCancel: () {
            Navigator.pop(context);
          },
        )));
  }

Implementation

final VoidCallback? onCancel;