onViewChanged property Null safety

DateRangePickerViewChangedCallback? onViewChanged
final

Called when the current visible view or visible date range changes.

The visible date range and the visible view which visible on view when the view changes available in the DateRangePickerViewChangedArgs.

See also:


Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       body: SfDateRangePicker(
         view: DateRangePickerView.month,
         selectionMode: DateRangePickerSelectionMode.multiple,
         showNavigationArrow: true,
         onViewChanged: (DateRangePickerViewChangedArgs args) {
          final PickerDateRange _visibleDateRange = args.visibleDateRange;
          final DateRangePickerView _visibleView = args.view;
         },
       ),
     ),
   );
 }

Implementation

final DateRangePickerViewChangedCallback? onViewChanged;