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..4d433da 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: '>=2.19.3 <3.0.0' + sdk: '>=3.0.0 <4.0.0' flutter: '>=1.17.0' dependencies: diff --git a/storybook/pubspec.yaml b/storybook/pubspec.yaml index dc4fc8b..82c79a4 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: '>=2.19.3 <3.0.0' + sdk: '>=3.0.0 <4.0.0' dependencies: flutter: