backward property

VoidCallback? backward
getter/setter pair

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

Note: If the current view has the minimum date range, it will not move to the previous 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? backward;