diff --git a/lib/grouped_list.dart b/lib/grouped_list.dart index f2669a9..b96876c 100644 --- a/lib/grouped_list.dart +++ b/lib/grouped_list.dart @@ -213,7 +213,7 @@ class GroupedListView extends StatefulWidget { /// Additionally at least one of [itemBuilder] or [indexedItemBuilder] and one /// of [groupSeparatorBuilder] or [groupHeaderBuilder] must be provieded. const GroupedListView({ - Key? key, + super.key, required this.elements, required this.groupBy, this.groupComparator, @@ -252,8 +252,7 @@ class GroupedListView extends StatefulWidget { }) : assert(itemBuilder != null || indexedItemBuilder != null || interdependentItemBuilder != null), - assert(groupSeparatorBuilder != null || groupHeaderBuilder != null), - super(key: key); + assert(groupSeparatorBuilder != null || groupHeaderBuilder != null); @override State createState() => _GroupedListViewState(); diff --git a/lib/sliver_grouped_list.dart b/lib/sliver_grouped_list.dart index f4be91c..3f52e1b 100644 --- a/lib/sliver_grouped_list.dart +++ b/lib/sliver_grouped_list.dart @@ -69,7 +69,7 @@ class SliverGroupedListView extends StatefulWidget { /// Creates a [SliverGroupedListView] const SliverGroupedListView({ - Key? key, + super.key, required this.elements, required this.groupBy, this.groupComparator, @@ -83,8 +83,7 @@ class SliverGroupedListView extends StatefulWidget { this.separator = const SizedBox.shrink(), this.footer, }) : assert(itemBuilder != null || indexedItemBuilder != null), - assert(groupSeparatorBuilder != null || groupHeaderBuilder != null), - super(key: key); + assert(groupSeparatorBuilder != null || groupHeaderBuilder != null); @override State createState() => _SliverGroupedListViewState(); diff --git a/pubspec.yaml b/pubspec.yaml index 29f4a3a..c4e1cc3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,4 +15,4 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.3 \ No newline at end of file + flutter_lints: ">=2.0.3 <4.0.0" \ No newline at end of file