view property Null safety

HijriDatePickerView? view

The current visible HijriDatePickerView of SfHijriDateRangePicker.

Implementation

HijriDatePickerView? get view => _view;
void view=(HijriDatePickerView? value)

Set the HijriDatePickerView for the SfHijriDateRangePicker.

The SfHijriDateRangePicker will display the view sets to this property.

See also:


class MyAppState extends State<MyApp> {
HijriDatePickerController _pickerController = HijriDatePickerController();

 @override
 void initState() {
   _pickerController.view = HijriDatePickerView.year;
   super.initState();
 }

 @override
 Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       body: SfHijriDateRangePicker(
         controller: _pickerController,
         view: HijriDatePickerView.month,
         selectionMode: DateRangePickerSelectionMode.single,
      ),
     ),
   );
 }
}

Implementation

set view(HijriDatePickerView? value) {
  if (_view == value) {
    return;
  }

  _view = value;
  notifyPropertyChangedListeners('view');
}