forward property

VoidCallback? forward
getter/setter pair

Moves to the next view programmatically with animation by checking that the next view dates falls between the minimum and maximum date range.

Note: If the current view has the maximum date range, it will not move to the next view.

See also:


class MyApp extends StatefulWidget {
 @override
 MyAppState createState() => MyAppState();
}

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

 @override
 Widget build(BuildContext context) {
   return MaterialApp(
     home: Scaffold(
       appBar: AppBar(
         actions: <Widget>[
           IconButton(
             icon: Icon(Icons.arrow_forward),
             onPressed: () {
               _pickerController.forward!();
             },
           )
         ],
         title: Text('Date Range Picker Demo'),
         leading: IconButton(
           icon: Icon(Icons.arrow_back),
           onPressed: () {
             _pickerController.backward!();
           },
         ),
       ),
       body: SfDateRangePicker(
         controller: _pickerController,
         view: DateRangePickerView.month,
         selectionMode: DateRangePickerSelectionMode.single,
       ),
     ),
   );
 }
}

Implementation

VoidCallback? forward;