Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Macacoazul01 committed May 13, 2024
1 parent a1a9949 commit e629b07
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 40 deletions.
3 changes: 2 additions & 1 deletion lib/src/month_picker_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class MonthPickerDialogState extends State<MonthPickerDialog> {
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 ??
Expand Down
78 changes: 39 additions & 39 deletions lib/src/show_month_picker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<DateTime?> 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<DateTime?> 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);
Expand Down

0 comments on commit e629b07

Please sign in to comment.