From 870292551e18e55c6f05eadafb35cd49d3cccdb0 Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 12 Jun 2023 15:07:57 +0200 Subject: [PATCH 1/3] feat: update to sdk version 3 --- example/example.dart | 2 +- lib/src/generic_dropdown.dart | 4 ++-- lib/src/generic_dropdown_config_provider.dart | 2 +- pubspec.yaml | 4 ++-- storybook/ios/Runner.xcodeproj/project.pbxproj | 1 + storybook/pubspec.yaml | 4 ++-- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/example/example.dart b/example/example.dart index 2a241ed..8f6d6da 100644 --- a/example/example.dart +++ b/example/example.dart @@ -1,7 +1,7 @@ import 'package:flutter/material.dart'; import 'package:generic_dropdown_widget/generic_dropdown_widget.dart'; -class Dropdown extends StatelessWidget { +final class Dropdown extends StatelessWidget { const Dropdown({super.key}); @override diff --git a/lib/src/generic_dropdown.dart b/lib/src/generic_dropdown.dart index 3978794..5e9b0b2 100644 --- a/lib/src/generic_dropdown.dart +++ b/lib/src/generic_dropdown.dart @@ -78,7 +78,7 @@ enum DropdownDirection { /// content. The [contentBuilder] receives a "repaint" and a /// "close" callbacks, which can help updating the content /// or closing the content entirely. -class GenericDropdown extends StatefulWidget { +final class GenericDropdown extends StatefulWidget { /// The anchor of the dropdown. Defines /// on which point of the toggle the content /// will be anchored. Defaults to [DropdownAnchor.bottomLeft]. @@ -132,7 +132,7 @@ class GenericDropdown extends StatefulWidget { State createState() => _GenericDropdownState(); } -class _GenericDropdownState extends State { +final class _GenericDropdownState extends State { var _isOpen = false; OverlayEntry? _overlayEntry; diff --git a/lib/src/generic_dropdown_config_provider.dart b/lib/src/generic_dropdown_config_provider.dart index 20e8046..4647119 100644 --- a/lib/src/generic_dropdown_config_provider.dart +++ b/lib/src/generic_dropdown_config_provider.dart @@ -12,7 +12,7 @@ import 'package:flutter/widgets.dart'; /// at the wrong position. With this config, the dropdown can /// utilize the root storybook as root screen key to calculate /// the position of the content. -class GenericDropdownConfigProvider extends InheritedWidget { +final class GenericDropdownConfigProvider extends InheritedWidget { /// The key of the root screen that contains the dropdown. /// The screen is used to calculate the relative position /// of the content overlay to the toggle. diff --git a/pubspec.yaml b/pubspec.yaml index ad7724d..34d251e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,8 +7,8 @@ issue_tracker: https://github.com/smartive/flutter-generic-dropdown-widget/issue repository: https://github.com/smartive/flutter-generic-dropdown-widget.git environment: - sdk: '>=2.19.3 <3.0.0' - flutter: '>=1.17.0' + sdk: ">=3.0.0 <4.0.0" + flutter: ">=1.17.0" dependencies: flutter: diff --git a/storybook/ios/Runner.xcodeproj/project.pbxproj b/storybook/ios/Runner.xcodeproj/project.pbxproj index fe3d67b..cec4031 100644 --- a/storybook/ios/Runner.xcodeproj/project.pbxproj +++ b/storybook/ios/Runner.xcodeproj/project.pbxproj @@ -176,6 +176,7 @@ files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( diff --git a/storybook/pubspec.yaml b/storybook/pubspec.yaml index dc4fc8b..5d168b0 100644 --- a/storybook/pubspec.yaml +++ b/storybook/pubspec.yaml @@ -1,10 +1,10 @@ name: example description: A new Flutter project. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=2.19.3 <3.0.0' + sdk: ">=3.0.0 <4.0.0" dependencies: flutter: From 619ef9431d85e266246b63c31cf914e0474a65b1 Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 12 Jun 2023 15:25:59 +0200 Subject: [PATCH 2/3] fix: pubspec yml formatting --- pubspec.yaml | 2 +- storybook/ios/Runner.xcodeproj/project.pbxproj | 1 - storybook/pubspec.yaml | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index 34d251e..e360884 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ issue_tracker: https://github.com/smartive/flutter-generic-dropdown-widget/issue repository: https://github.com/smartive/flutter-generic-dropdown-widget.git environment: - sdk: ">=3.0.0 <4.0.0" + sdk: '>=3.0.0 <4.0.0' flutter: ">=1.17.0" dependencies: diff --git a/storybook/ios/Runner.xcodeproj/project.pbxproj b/storybook/ios/Runner.xcodeproj/project.pbxproj index cec4031..fe3d67b 100644 --- a/storybook/ios/Runner.xcodeproj/project.pbxproj +++ b/storybook/ios/Runner.xcodeproj/project.pbxproj @@ -176,7 +176,6 @@ files = ( ); inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( diff --git a/storybook/pubspec.yaml b/storybook/pubspec.yaml index 5d168b0..13fe64d 100644 --- a/storybook/pubspec.yaml +++ b/storybook/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=3.0.0 <4.0.0" + sdk: '>=3.0.0 <4.0.0' dependencies: flutter: From de20f66a5a243964930b6b45f448bbb06d20a9db Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 12 Jun 2023 15:45:10 +0200 Subject: [PATCH 3/3] fix: change " to ^ --- pubspec.yaml | 2 +- storybook/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.yaml b/pubspec.yaml index e360884..4d433da 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -8,7 +8,7 @@ repository: https://github.com/smartive/flutter-generic-dropdown-widget.git environment: sdk: '>=3.0.0 <4.0.0' - flutter: ">=1.17.0" + flutter: '>=1.17.0' dependencies: flutter: diff --git a/storybook/pubspec.yaml b/storybook/pubspec.yaml index 13fe64d..82c79a4 100644 --- a/storybook/pubspec.yaml +++ b/storybook/pubspec.yaml @@ -1,6 +1,6 @@ name: example description: A new Flutter project. -publish_to: "none" # Remove this line if you wish to publish to pub.dev +publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: