Skip to content

Commit

Permalink
style: use_super_parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
xuelongqy committed Apr 29, 2024
1 parent b96aeb1 commit 690294d
Show file tree
Hide file tree
Showing 35 changed files with 445 additions and 844 deletions.
4 changes: 2 additions & 2 deletions lib/src/easy_paging.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ abstract class EasyPaging<DataType, ItemType> extends StatefulWidget {
final WidgetBuilder? emptyWidgetBuilder;

const EasyPaging({
Key? key,
super.key,
this.useDefaultPhysics = false,
this.controller,
this.spring,
Expand All @@ -87,7 +87,7 @@ abstract class EasyPaging<DataType, ItemType> extends StatefulWidget {
this.itemBuilder,
this.refreshOnStartWidgetBuilder,
this.emptyWidgetBuilder,
}) : super(key: key);
});

@override
EasyPagingState<DataType, ItemType> createState();
Expand Down
16 changes: 7 additions & 9 deletions lib/src/easy_refresh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ class _InheritedEasyRefresh extends InheritedWidget {
final EasyRefreshData data;

const _InheritedEasyRefresh({
Key? key,
super.key,
required this.data,
required Widget child,
}) : super(key: key, child: child);
required super.child,
});

@override
bool updateShouldNotify(covariant _InheritedEasyRefresh oldWidget) =>
Expand Down Expand Up @@ -179,7 +179,7 @@ class EasyRefresh extends StatefulWidget {
ERScrollBehavior(physics);

const EasyRefresh({
Key? key,
super.key,
required this.child,
this.controller,
this.header,
Expand Down Expand Up @@ -207,11 +207,10 @@ class EasyRefresh extends StatefulWidget {
assert(callRefreshOverOffset > 0,
'callRefreshOverOffset must be greater than 0.'),
assert(callLoadOverOffset > 0,
'callLoadOverOffset must be greater than 0.'),
super(key: key);
'callLoadOverOffset must be greater than 0.');

const EasyRefresh.builder({
Key? key,
super.key,
required this.childBuilder,
this.controller,
this.header,
Expand Down Expand Up @@ -239,8 +238,7 @@ class EasyRefresh extends StatefulWidget {
assert(callRefreshOverOffset > 0,
'callRefreshOverOffset must be greater than 0.'),
assert(callLoadOverOffset > 0,
'callLoadOverOffset must be greater than 0.'),
super(key: key);
'callLoadOverOffset must be greater than 0.');

@override
State<StatefulWidget> createState() => _EasyRefreshState();
Expand Down
Loading

0 comments on commit 690294d

Please sign in to comment.