view property
HijriDatePickerView?
get
view
The current visible HijriDatePickerView of SfHijriDateRangePicker.
Implementation
HijriDatePickerView? get view => _view;
set
view
(HijriDatePickerView? value)
Set the HijriDatePickerView for the SfHijriDateRangePicker.
The SfHijriDateRangePicker will display the view sets to this property.
See also:
- SfHijriDateRangePicker.view, which used to display the required view on the date range picker initially.
- SfHijriDateRangePicker.onViewChanged, the callback which notifies when the current view visible date changed on the date range picker.
- HijriDatePickerView, to know more about the available view options in the hijri date range picker.
- Knowledge base: How to do programmatic navigation
- Knowledge base: How to programmatically navigate to adjacent dates
- Knowledge base: How to programmatically navigate
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');
}