Prepare packages (minus tools,framework) for use_super_parameters (#100510)
This commit is contained in:
committed by
GitHub
parent
ca2d60e8e2
commit
3e406c6781
@@ -322,8 +322,8 @@ class _AnimationSheetRecorder extends StatefulWidget {
|
||||
required this.child,
|
||||
required this.size,
|
||||
required this.allLayers,
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
super.key,
|
||||
});
|
||||
|
||||
final _RecordedHandler? handleRecorded;
|
||||
final Widget child;
|
||||
@@ -375,10 +375,9 @@ class _AnimationSheetRecorderState extends State<_AnimationSheetRecorder> {
|
||||
// If `callback` is null, `_PostFrameCallbacker` is equivalent to a proxy box.
|
||||
class _PostFrameCallbacker extends SingleChildRenderObjectWidget {
|
||||
const _PostFrameCallbacker({
|
||||
Key? key,
|
||||
Widget? child,
|
||||
super.child,
|
||||
this.callback,
|
||||
}) : super(key: key, child: child);
|
||||
});
|
||||
|
||||
final FrameCallback? callback;
|
||||
|
||||
@@ -452,12 +451,11 @@ Future<ui.Image> _collateFrames(List<ui.Image> frames, Size frameSize, int cells
|
||||
// positioned from top left to bottom right in a row-major order.
|
||||
class _CellSheet extends StatelessWidget {
|
||||
_CellSheet({
|
||||
Key? key,
|
||||
super.key,
|
||||
required this.cellSize,
|
||||
required this.children,
|
||||
}) : assert(cellSize != null),
|
||||
assert(children != null && children.isNotEmpty),
|
||||
super(key: key);
|
||||
assert(children != null && children.isNotEmpty);
|
||||
|
||||
final Size cellSize;
|
||||
final List<Widget> children;
|
||||
@@ -511,7 +509,7 @@ class _RenderRootableRepaintBoundary extends RenderRepaintBoundary {
|
||||
// A [RepaintBoundary], except that its render object has a `fullscreenToImage` method.
|
||||
class _RootableRepaintBoundary extends SingleChildRenderObjectWidget {
|
||||
/// Creates a widget that isolates repaints.
|
||||
const _RootableRepaintBoundary({ Key? key, Widget? child }) : super(key: key, child: child);
|
||||
const _RootableRepaintBoundary({ super.key, super.child });
|
||||
|
||||
@override
|
||||
_RenderRootableRepaintBoundary createRenderObject(BuildContext context) => _RenderRootableRepaintBoundary();
|
||||
|
||||
@@ -1841,10 +1841,10 @@ class _LiveTestPointerRecord {
|
||||
|
||||
class _LiveTestRenderView extends RenderView {
|
||||
_LiveTestRenderView({
|
||||
required ViewConfiguration configuration,
|
||||
required super.configuration,
|
||||
required this.onNeedPaint,
|
||||
required ui.FlutterView window,
|
||||
}) : super(configuration: configuration, window: window);
|
||||
required super.window,
|
||||
});
|
||||
|
||||
@override
|
||||
TestViewConfiguration get configuration => super.configuration as TestViewConfiguration;
|
||||
|
||||
@@ -1246,7 +1246,7 @@ abstract class WidgetController {
|
||||
/// This is used, for instance, by [FlutterDriver].
|
||||
class LiveWidgetController extends WidgetController {
|
||||
/// Creates a widget controller that uses the given binding.
|
||||
LiveWidgetController(WidgetsBinding binding) : super(binding);
|
||||
LiveWidgetController(super.binding);
|
||||
|
||||
@override
|
||||
Future<void> pump([Duration? duration]) async {
|
||||
|
||||
@@ -584,7 +584,7 @@ abstract class ChainedFinder extends Finder {
|
||||
}
|
||||
|
||||
class _FirstFinder extends ChainedFinder {
|
||||
_FirstFinder(Finder parent) : super(parent);
|
||||
_FirstFinder(super.parent);
|
||||
|
||||
@override
|
||||
String get description => '${parent.description} (ignoring all but first)';
|
||||
@@ -596,7 +596,7 @@ class _FirstFinder extends ChainedFinder {
|
||||
}
|
||||
|
||||
class _LastFinder extends ChainedFinder {
|
||||
_LastFinder(Finder parent) : super(parent);
|
||||
_LastFinder(super.parent);
|
||||
|
||||
@override
|
||||
String get description => '${parent.description} (ignoring all but last)';
|
||||
@@ -608,7 +608,7 @@ class _LastFinder extends ChainedFinder {
|
||||
}
|
||||
|
||||
class _IndexFinder extends ChainedFinder {
|
||||
_IndexFinder(Finder parent, this.index) : super(parent);
|
||||
_IndexFinder(super.parent, this.index);
|
||||
|
||||
final int index;
|
||||
|
||||
@@ -622,7 +622,7 @@ class _IndexFinder extends ChainedFinder {
|
||||
}
|
||||
|
||||
class _HitTestableFinder extends ChainedFinder {
|
||||
_HitTestableFinder(Finder parent, this.alignment) : super(parent);
|
||||
_HitTestableFinder(super.parent, this.alignment);
|
||||
|
||||
final Alignment alignment;
|
||||
|
||||
@@ -651,7 +651,7 @@ class _HitTestableFinder extends ChainedFinder {
|
||||
abstract class MatchFinder extends Finder {
|
||||
/// Initializes a predicate-based Finder. Used by subclasses to initialize the
|
||||
/// [skipOffstage] property.
|
||||
MatchFinder({ bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
||||
MatchFinder({ super.skipOffstage });
|
||||
|
||||
/// Returns true if the given element matches the pattern.
|
||||
///
|
||||
@@ -667,8 +667,8 @@ abstract class MatchFinder extends Finder {
|
||||
abstract class _MatchTextFinder extends MatchFinder {
|
||||
_MatchTextFinder({
|
||||
this.findRichText = false,
|
||||
bool skipOffstage = true,
|
||||
}) : super(skipOffstage: skipOffstage);
|
||||
super.skipOffstage,
|
||||
});
|
||||
|
||||
/// Whether standalone [RichText] widgets should be found or not.
|
||||
///
|
||||
@@ -729,9 +729,9 @@ abstract class _MatchTextFinder extends MatchFinder {
|
||||
class _TextFinder extends _MatchTextFinder {
|
||||
_TextFinder(
|
||||
this.text, {
|
||||
bool findRichText = false,
|
||||
bool skipOffstage = true,
|
||||
}) : super(findRichText: findRichText, skipOffstage: skipOffstage);
|
||||
super.findRichText,
|
||||
super.skipOffstage,
|
||||
});
|
||||
|
||||
final String text;
|
||||
|
||||
@@ -747,9 +747,9 @@ class _TextFinder extends _MatchTextFinder {
|
||||
class _TextContainingFinder extends _MatchTextFinder {
|
||||
_TextContainingFinder(
|
||||
this.pattern, {
|
||||
bool findRichText = false,
|
||||
bool skipOffstage = true,
|
||||
}) : super(findRichText: findRichText, skipOffstage: skipOffstage);
|
||||
super.findRichText,
|
||||
super.skipOffstage,
|
||||
});
|
||||
|
||||
final Pattern pattern;
|
||||
|
||||
@@ -763,7 +763,7 @@ class _TextContainingFinder extends _MatchTextFinder {
|
||||
}
|
||||
|
||||
class _KeyFinder extends MatchFinder {
|
||||
_KeyFinder(this.key, { bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
||||
_KeyFinder(this.key, { super.skipOffstage });
|
||||
|
||||
final Key key;
|
||||
|
||||
@@ -777,7 +777,7 @@ class _KeyFinder extends MatchFinder {
|
||||
}
|
||||
|
||||
class _WidgetSubtypeFinder<T extends Widget> extends MatchFinder {
|
||||
_WidgetSubtypeFinder({ bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
||||
_WidgetSubtypeFinder({ super.skipOffstage });
|
||||
|
||||
@override
|
||||
String get description => 'is "$T"';
|
||||
@@ -789,7 +789,7 @@ class _WidgetSubtypeFinder<T extends Widget> extends MatchFinder {
|
||||
}
|
||||
|
||||
class _WidgetTypeFinder extends MatchFinder {
|
||||
_WidgetTypeFinder(this.widgetType, { bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
||||
_WidgetTypeFinder(this.widgetType, { super.skipOffstage });
|
||||
|
||||
final Type widgetType;
|
||||
|
||||
@@ -803,7 +803,7 @@ class _WidgetTypeFinder extends MatchFinder {
|
||||
}
|
||||
|
||||
class _WidgetImageFinder extends MatchFinder {
|
||||
_WidgetImageFinder(this.image, { bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
||||
_WidgetImageFinder(this.image, { super.skipOffstage });
|
||||
|
||||
final ImageProvider image;
|
||||
|
||||
@@ -823,7 +823,7 @@ class _WidgetImageFinder extends MatchFinder {
|
||||
}
|
||||
|
||||
class _WidgetIconFinder extends MatchFinder {
|
||||
_WidgetIconFinder(this.icon, { bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
||||
_WidgetIconFinder(this.icon, { super.skipOffstage });
|
||||
|
||||
final IconData icon;
|
||||
|
||||
@@ -838,7 +838,7 @@ class _WidgetIconFinder extends MatchFinder {
|
||||
}
|
||||
|
||||
class _ElementTypeFinder extends MatchFinder {
|
||||
_ElementTypeFinder(this.elementType, { bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
||||
_ElementTypeFinder(this.elementType, { super.skipOffstage });
|
||||
|
||||
final Type elementType;
|
||||
|
||||
@@ -852,7 +852,7 @@ class _ElementTypeFinder extends MatchFinder {
|
||||
}
|
||||
|
||||
class _WidgetFinder extends MatchFinder {
|
||||
_WidgetFinder(this.widget, { bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
||||
_WidgetFinder(this.widget, { super.skipOffstage });
|
||||
|
||||
final Widget widget;
|
||||
|
||||
@@ -866,9 +866,8 @@ class _WidgetFinder extends MatchFinder {
|
||||
}
|
||||
|
||||
class _WidgetPredicateFinder extends MatchFinder {
|
||||
_WidgetPredicateFinder(this.predicate, { String? description, bool skipOffstage = true })
|
||||
: _description = description,
|
||||
super(skipOffstage: skipOffstage);
|
||||
_WidgetPredicateFinder(this.predicate, { String? description, super.skipOffstage })
|
||||
: _description = description;
|
||||
|
||||
final WidgetPredicate predicate;
|
||||
final String? _description;
|
||||
@@ -883,9 +882,8 @@ class _WidgetPredicateFinder extends MatchFinder {
|
||||
}
|
||||
|
||||
class _ElementPredicateFinder extends MatchFinder {
|
||||
_ElementPredicateFinder(this.predicate, { String? description, bool skipOffstage = true })
|
||||
: _description = description,
|
||||
super(skipOffstage: skipOffstage);
|
||||
_ElementPredicateFinder(this.predicate, { String? description, super.skipOffstage })
|
||||
: _description = description;
|
||||
|
||||
final ElementPredicate predicate;
|
||||
final String? _description;
|
||||
@@ -904,8 +902,8 @@ class _DescendantFinder extends Finder {
|
||||
this.ancestor,
|
||||
this.descendant, {
|
||||
this.matchRoot = false,
|
||||
bool skipOffstage = true,
|
||||
}) : super(skipOffstage: skipOffstage);
|
||||
super.skipOffstage,
|
||||
});
|
||||
|
||||
final Finder ancestor;
|
||||
final Finder descendant;
|
||||
|
||||
@@ -498,9 +498,9 @@ Future<void> expectLater(
|
||||
/// For convenience, instances of this class (such as the one provided by
|
||||
/// `testWidgets`) can be used as the `vsync` for `AnimationController` objects.
|
||||
class WidgetTester extends WidgetController implements HitTestDispatcher, TickerProvider {
|
||||
WidgetTester._(TestWidgetsFlutterBinding binding) : super(binding) {
|
||||
WidgetTester._(super.binding) {
|
||||
if (binding is LiveTestWidgetsFlutterBinding)
|
||||
binding.deviceEventDispatcher = this;
|
||||
(binding as LiveTestWidgetsFlutterBinding).deviceEventDispatcher = this;
|
||||
}
|
||||
|
||||
/// The description string of the test currently being run.
|
||||
@@ -1106,7 +1106,7 @@ class WidgetTester extends WidgetController implements HitTestDispatcher, Ticker
|
||||
typedef _TickerDisposeCallback = void Function(_TestTicker ticker);
|
||||
|
||||
class _TestTicker extends Ticker {
|
||||
_TestTicker(TickerCallback onTick, this._onDispose) : super(onTick);
|
||||
_TestTicker(super.onTick, this._onDispose);
|
||||
|
||||
final _TickerDisposeCallback _onDispose;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: flutter_test
|
||||
|
||||
environment:
|
||||
sdk: ">=2.12.0-0 <3.0.0"
|
||||
sdk: ">=2.17.0-0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
# To update these, use "flutter update-packages --force-upgrade".
|
||||
|
||||
@@ -399,7 +399,7 @@ Widget _boilerplate(Widget child) {
|
||||
}
|
||||
|
||||
class SimpleCustomSemanticsWidget extends LeafRenderObjectWidget {
|
||||
const SimpleCustomSemanticsWidget(this.label, {Key? key}) : super(key: key);
|
||||
const SimpleCustomSemanticsWidget(this.label, {super.key});
|
||||
|
||||
final String label;
|
||||
|
||||
@@ -431,9 +431,8 @@ class SimpleCustomSemanticsRenderObject extends RenderBox {
|
||||
}
|
||||
|
||||
class SimpleGenericWidget<T> extends StatelessWidget {
|
||||
const SimpleGenericWidget({required Widget child, Key? key})
|
||||
: _child = child,
|
||||
super(key: key);
|
||||
const SimpleGenericWidget({required Widget child, super.key})
|
||||
: _child = child;
|
||||
|
||||
final Widget _child;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
class CountButton extends StatefulWidget {
|
||||
const CountButton({Key? key}) : super(key: key);
|
||||
const CountButton({super.key});
|
||||
|
||||
@override
|
||||
State<CountButton> createState() => _CountButtonState();
|
||||
@@ -30,7 +30,7 @@ class _CountButtonState extends State<CountButton> {
|
||||
}
|
||||
|
||||
class AnimateSample extends StatefulWidget {
|
||||
const AnimateSample({Key? key}) : super(key: key);
|
||||
const AnimateSample({super.key});
|
||||
|
||||
@override
|
||||
State<AnimateSample> createState() => _AnimateSampleState();
|
||||
|
||||
@@ -731,7 +731,7 @@ class _FakeSemanticsNode extends SemanticsNode {
|
||||
|
||||
@immutable
|
||||
class _CustomColor extends Color {
|
||||
const _CustomColor(int value, {this.isEqual}) : super(value);
|
||||
const _CustomColor(super.value, {this.isEqual});
|
||||
final bool? isEqual;
|
||||
|
||||
@override
|
||||
|
||||
@@ -72,7 +72,7 @@ void main() {
|
||||
}
|
||||
|
||||
class _RestorableWidget extends StatefulWidget {
|
||||
const _RestorableWidget({Key? key, this.restorationId}) : super(key: key);
|
||||
const _RestorableWidget({this.restorationId});
|
||||
|
||||
final String? restorationId;
|
||||
|
||||
|
||||
@@ -783,7 +783,7 @@ class FakeMatcher extends AsyncMatcher {
|
||||
}
|
||||
|
||||
class _SingleTickerTest extends StatefulWidget {
|
||||
const _SingleTickerTest({Key? key}) : super(key: key);
|
||||
const _SingleTickerTest();
|
||||
|
||||
@override
|
||||
_SingleTickerTestState createState() => _SingleTickerTestState();
|
||||
|
||||
Reference in New Issue
Block a user