SimpleYearPickerWidget constructor
const
SimpleYearPickerWidget({
- Key? key,
- required DateTime yearDateTime,
- required dynamic onChangedCallback(),
- int firstYear = 1900,
- int lastYear = 2100,
- Decoration? decoration,
- bool looping = true,
- EdgeInsetsGeometry padding = EdgeInsets.zero,
- double width = 400,
- double height = 350,
- double? yearWidth,
- double yearHeight = 250,
- Decoration? pickerDecoration,
- Color pickerBackgroundColor = Colors.white,
- double itemHeight = 60,
- Alignment textAlignment = Alignment.center,
- TextStyle? textStyle,
- double buttonHeight = 60,
- double todayButtonWidth = 200,
- Color todayButtonColor = Colors.white,
- Decoration? todayButtonDecoration,
- String todayButtonText = 'TODAY',
- TextStyle? todayButtonTextStyle = const TextStyle(color: Colors.black),
- double doneButtonWidth = 200,
- Color doneButtonColor = Colors.white,
- Decoration? doneButtonDecoration,
- String doneButtonText = 'DONE',
- TextStyle? doneButtonTextStyle = const TextStyle(color: Colors.black),
Implementation
const SimpleYearPickerWidget({
super.key,
required this.yearDateTime,
required this.onChangedCallback,
this.firstYear = 1900,
this.lastYear = 2100,
this.decoration,
this.looping = true,
this.padding = EdgeInsets.zero,
this.width = 400,
this.height = 350,
this.yearWidth,
this.yearHeight = 250,
this.pickerDecoration,
this.pickerBackgroundColor = Colors.white,
this.itemHeight = 60,
this.textAlignment = Alignment.center,
this.textStyle,
this.buttonHeight = 60,
this.todayButtonWidth = 200,
this.todayButtonColor = Colors.white,
this.todayButtonDecoration,
this.todayButtonText = 'TODAY',
this.todayButtonTextStyle = const TextStyle(color: Colors.black),
this.doneButtonWidth = 200,
this.doneButtonColor = Colors.white,
this.doneButtonDecoration,
this.doneButtonText = 'DONE',
this.doneButtonTextStyle = const TextStyle(color: Colors.black),
});