From 8688cb9e80d6336bd23026525dde02f3105387f0 Mon Sep 17 00:00:00 2001 From: Gianluca Bettega Date: Sat, 14 Dec 2024 11:35:36 -0300 Subject: [PATCH] 5.2.0 --- CHANGELOG.md | 5 +++++ lib/src/month_picker_widgets/button_bar.dart | 2 +- lib/src/month_picker_widgets/header/header_arrows.dart | 4 ++-- lib/src/month_selector/month_selector.dart | 1 + lib/src/year_selector/year_selector.dart | 1 + pubspec.yaml | 6 +++--- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69b3c9c..eb83a1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 5.2.0 - 2024-12-14 +- Bumped intl to `0.20.0`. Fixes [#107](https://github.com/Macacoazul01/month_picker_dialog/issues/107). +- Bumped flutter_lints to `5.0.0`. +- Fixed flutter `3.27.0` deprecations. + ## 5.1.3 - 2024-09-07 - Fixed [#106](https://github.com/Macacoazul01/month_picker_dialog/issues/106). - Updated android sample. diff --git a/lib/src/month_picker_widgets/button_bar.dart b/lib/src/month_picker_widgets/button_bar.dart index 6ce5f3b..a98764f 100644 --- a/lib/src/month_picker_widgets/button_bar.dart +++ b/lib/src/month_picker_widgets/button_bar.dart @@ -19,7 +19,7 @@ class PickerButtonBar extends StatelessWidget { ? TextScaler.linear(controller .monthPickerDialogSettings.dialogSettings.textScaleFactor!) : null; - return ButtonBar( + return OverflowBar( children: [ TextButton( onPressed: () => controller.cancelFunction(context), diff --git a/lib/src/month_picker_widgets/header/header_arrows.dart b/lib/src/month_picker_widgets/header/header_arrows.dart index 5a2bfdc..1e54ca4 100644 --- a/lib/src/month_picker_widgets/header/header_arrows.dart +++ b/lib/src/month_picker_widgets/header/header_arrows.dart @@ -27,7 +27,7 @@ class HeaderArrows extends StatelessWidget { IconButton( icon: Icon( previousIcon ?? Icons.keyboard_arrow_up, - color: upState ? arrowcolors : arrowcolors!.withOpacity(0.5), + color: upState ? arrowcolors : arrowcolors!.withValues(alpha: 0.5), size: arrowSize, ), onPressed: upState ? onUpButtonPressed : null, @@ -35,7 +35,7 @@ class HeaderArrows extends StatelessWidget { IconButton( icon: Icon( nextIcon ?? Icons.keyboard_arrow_down, - color: downState ? arrowcolors : arrowcolors!.withOpacity(0.5), + color: downState ? arrowcolors : arrowcolors!.withValues(alpha: 0.5), size: arrowSize, ), onPressed: downState ? onDownButtonPressed : null, diff --git a/lib/src/month_selector/month_selector.dart b/lib/src/month_selector/month_selector.dart index 6e80be2..fb69cc1 100644 --- a/lib/src/month_selector/month_selector.dart +++ b/lib/src/month_selector/month_selector.dart @@ -87,6 +87,7 @@ class MonthSelectorState extends State { Future.delayed( Duration.zero, () { + // ignore: use_build_context_synchronously Provider.of(context, listen: false).changePage( 0, widget.controller.localFirstDate == null diff --git a/lib/src/year_selector/year_selector.dart b/lib/src/year_selector/year_selector.dart index 2042a36..91c12bf 100644 --- a/lib/src/year_selector/year_selector.dart +++ b/lib/src/year_selector/year_selector.dart @@ -90,6 +90,7 @@ class YearSelectorState extends State { Future.delayed( Duration.zero, () { + // ignore: use_build_context_synchronously Provider.of(context, listen: false).changePage( widget.controller.localFirstDate == null ? widget.controller.yearPageController!.page!.toInt() * 12 + 11 diff --git a/pubspec.yaml b/pubspec.yaml index 6b4ed72..9c32e45 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: month_picker_dialog description: Internationalized dialog for picking a single month from an infinite list of years. -version: 5.1.3 +version: 5.2.0 homepage: https://github.com/hmkrivoj/month_picker_dialog environment: @@ -10,10 +10,10 @@ dependencies: flutter: sdk: flutter provider: ^6.1.2 - intl: ^0.19.0 + intl: ^0.20.0 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^4.0.0 + flutter_lints: ^5.0.0 flutter: