diff --git a/lib/date_picker.dart b/lib/date_picker.dart index 18770b3..bdb42ad 100644 --- a/lib/date_picker.dart +++ b/lib/date_picker.dart @@ -125,6 +125,8 @@ class DatePicker { String? cancelText, bool looping: false, bool reverse: false, + double? dividerHeight, + double? dividerThickness, }) { DateTime? _selectedDate = initialDate; final List listButtonActions = [ @@ -189,6 +191,8 @@ class DatePicker { _selectedDate = date; }), looping: looping, + dividerHeight: dividerHeight, + dividerThickness: dividerThickness, ), ), actions: diff --git a/lib/widget/date_picker_widget.dart b/lib/widget/date_picker_widget.dart index 3e1cf36..07ba224 100644 --- a/lib/widget/date_picker_widget.dart +++ b/lib/widget/date_picker_widget.dart @@ -26,6 +26,8 @@ class DatePickerWidget extends StatefulWidget { this.onChange, this.onConfirm, this.looping: false, + this.dividerHeight = 1, + this.dividerThickness = 2, }) : super(key: key) { DateTime minTime = firstDate ?? DateTime.parse(DATE_PICKER_MIN_DATETIME); DateTime maxTime = lastDate ?? DateTime.parse(DATE_PICKER_MAX_DATETIME); @@ -36,6 +38,8 @@ class DatePickerWidget extends StatefulWidget { final String? dateFormat; final DateTimePickerLocale? locale; final DateTimePickerTheme? pickerTheme; + final double? dividerHeight; + final double? dividerThickness; final DateVoidCallback? onCancel; final DateValueCallback? onChange, onConfirm; @@ -227,8 +231,8 @@ class _DatePickerWidgetState extends State { child: Divider( color: widget.pickerTheme!.dividerColor ?? widget.pickerTheme!.itemTextStyle.color, - height: 1, - thickness: 2, + height: widget.dividerHeight, + thickness: widget.dividerThickness, ), ), SizedBox(width: MediaQuery.of(context).size.width * 0.02) @@ -246,8 +250,8 @@ class _DatePickerWidgetState extends State { child: Divider( color: widget.pickerTheme!.dividerColor ?? widget.pickerTheme!.itemTextStyle.color, - height: 1, - thickness: 2, + height: widget.dividerHeight, + thickness: widget.dividerThickness, ), ), SizedBox(width: MediaQuery.of(context).size.width * 0.02), diff --git a/pubspec.yaml b/pubspec.yaml index c242702..389335f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_holo_date_picker description: A Flutter package of Datepicker that looks like Holo Theme in Android. -version: 1.0.6 +version: 1.0.7 homepage: https://github.com/kfiross/flutter_holo_date_picker environment: