From e629b07b54581c0a36762a7e02f980dc3eda1a5e Mon Sep 17 00:00:00 2001 From: Gianluca Bettega Date: Mon, 13 May 2024 20:06:07 -0300 Subject: [PATCH] format --- lib/src/month_picker_dialog.dart | 3 +- lib/src/show_month_picker.dart | 78 ++++++++++++++++---------------- 2 files changed, 41 insertions(+), 40 deletions(-) diff --git a/lib/src/month_picker_dialog.dart b/lib/src/month_picker_dialog.dart index 5a0e831..ea465d7 100644 --- a/lib/src/month_picker_dialog.dart +++ b/lib/src/month_picker_dialog.dart @@ -40,7 +40,8 @@ class MonthPickerDialogState extends State { Widget build(BuildContext context) { final String locale = getLocale(context, selectedLocale: widget.controller.locale); - final bool portrait = widget.controller.forcePortrait || MediaQuery.of(context).orientation == Orientation.portrait; + final bool portrait = widget.controller.forcePortrait || + MediaQuery.of(context).orientation == Orientation.portrait; final Container content = Container( decoration: BoxDecoration( color: widget.controller.backgroundColor ?? diff --git a/lib/src/show_month_picker.dart b/lib/src/show_month_picker.dart index 2ccdd43..8b3b622 100644 --- a/lib/src/show_month_picker.dart +++ b/lib/src/show_month_picker.dart @@ -64,48 +64,48 @@ import '/month_picker_dialog.dart'; /// `blockScrolling:` lets you block the user from scrolling the months/years (default is `true`). /// /// `dialogBorderSide:` lets you define the border side of the dialog (default is `BorderSide.none`). -/// +/// /// `buttonBorder:` lets you define the border of the month/year buttons (default is `const CircleBorder()`). -/// +/// /// `headerTitle:` lets you add a custom title to the header of the dialog (default is `null`). /// -Future showMonthPicker( - {required BuildContext context, - DateTime? initialDate, - DateTime? firstDate, - DateTime? lastDate, - Locale? locale, - bool Function(DateTime)? selectableMonthPredicate, - ButtonStyle? Function(DateTime)? monthStylePredicate, - ButtonStyle? Function(int)? yearStylePredicate, - bool capitalizeFirstLetter = true, - Color? headerColor, - Color? headerTextColor, - Color? selectedMonthBackgroundColor, - Color? selectedMonthTextColor, - Color? unselectedMonthTextColor, - Color? currentMonthTextColor, - double selectedMonthPadding = 0, - Color? backgroundColor, - Widget? confirmWidget, - Widget? cancelWidget, - double? customHeight, - double customWidth = 320, - bool yearFirst = false, - bool dismissible = false, - double roundedCornersRadius = 0, - bool forceSelectedDate = false, - int animationMilliseconds = 450, - bool hideHeaderRow = false, - double? textScaleFactor, - double? arrowSize, - bool forcePortrait = false, - Widget? customDivider, - bool blockScrolling = true, - BorderSide dialogBorderSide = BorderSide.none, - OutlinedBorder buttonBorder = const CircleBorder(), - Widget? headerTitle = null, - }) async { +Future showMonthPicker({ + required BuildContext context, + DateTime? initialDate, + DateTime? firstDate, + DateTime? lastDate, + Locale? locale, + bool Function(DateTime)? selectableMonthPredicate, + ButtonStyle? Function(DateTime)? monthStylePredicate, + ButtonStyle? Function(int)? yearStylePredicate, + bool capitalizeFirstLetter = true, + Color? headerColor, + Color? headerTextColor, + Color? selectedMonthBackgroundColor, + Color? selectedMonthTextColor, + Color? unselectedMonthTextColor, + Color? currentMonthTextColor, + double selectedMonthPadding = 0, + Color? backgroundColor, + Widget? confirmWidget, + Widget? cancelWidget, + double? customHeight, + double customWidth = 320, + bool yearFirst = false, + bool dismissible = false, + double roundedCornersRadius = 0, + bool forceSelectedDate = false, + int animationMilliseconds = 450, + bool hideHeaderRow = false, + double? textScaleFactor, + double? arrowSize, + bool forcePortrait = false, + Widget? customDivider, + bool blockScrolling = true, + BorderSide dialogBorderSide = BorderSide.none, + OutlinedBorder buttonBorder = const CircleBorder(), + Widget? headerTitle = null, +}) async { assert(forceSelectedDate == dismissible || !forceSelectedDate, 'forceSelectedDate can only be used with dismissible = true'); final ThemeData theme = Theme.of(context);