Prepare packages
(minus tools,framework) for use_super_parameters
(#100510)
This commit is contained in:
parent
ca2d60e8e2
commit
3e406c6781
@ -2,7 +2,7 @@ name: flutter_test_private
|
|||||||
description: Tests private interfaces of the flutter
|
description: Tests private interfaces of the flutter
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0-0 <3.0.0"
|
sdk: ">=2.17.0-0 <3.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
# To update these, use "flutter update-packages --force-upgrade".
|
# To update these, use "flutter update-packages --force-upgrade".
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: animated_icons_private_test
|
name: animated_icons_private_test
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0-0 <3.0.0"
|
sdk: ">=2.17.0-0 <3.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
# To update these, use "flutter update-packages --force-upgrade".
|
# To update these, use "flutter update-packages --force-upgrade".
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
import 'deserialization_factory.dart';
|
|
||||||
import 'enum_util.dart';
|
import 'enum_util.dart';
|
||||||
import 'find.dart';
|
import 'find.dart';
|
||||||
import 'message.dart';
|
import 'message.dart';
|
||||||
@ -25,20 +24,19 @@ EnumIndex<DiagnosticsType> _diagnosticsTypeIndex = EnumIndex<DiagnosticsType>(Di
|
|||||||
/// [diagnosticsType].
|
/// [diagnosticsType].
|
||||||
class GetDiagnosticsTree extends CommandWithTarget {
|
class GetDiagnosticsTree extends CommandWithTarget {
|
||||||
/// Creates a [GetDiagnosticsTree] Flutter Driver command.
|
/// Creates a [GetDiagnosticsTree] Flutter Driver command.
|
||||||
GetDiagnosticsTree(SerializableFinder finder, this.diagnosticsType, {
|
GetDiagnosticsTree(super.finder, this.diagnosticsType, {
|
||||||
this.subtreeDepth = 0,
|
this.subtreeDepth = 0,
|
||||||
this.includeProperties = true,
|
this.includeProperties = true,
|
||||||
Duration? timeout,
|
super.timeout,
|
||||||
}) : assert(subtreeDepth != null),
|
}) : assert(subtreeDepth != null),
|
||||||
assert(includeProperties != null),
|
assert(includeProperties != null);
|
||||||
super(finder, timeout: timeout);
|
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
GetDiagnosticsTree.deserialize(Map<String, String> json, DeserializeFinderFactory finderFactory)
|
GetDiagnosticsTree.deserialize(super.json, super.finderFactory)
|
||||||
: subtreeDepth = int.parse(json['subtreeDepth']!),
|
: subtreeDepth = int.parse(json['subtreeDepth']!),
|
||||||
includeProperties = json['includeProperties'] == 'true',
|
includeProperties = json['includeProperties'] == 'true',
|
||||||
diagnosticsType = _diagnosticsTypeIndex.lookupBySimpleName(json['diagnosticsType']!),
|
diagnosticsType = _diagnosticsTypeIndex.lookupBySimpleName(json['diagnosticsType']!),
|
||||||
super.deserialize(json, finderFactory);
|
super.deserialize();
|
||||||
|
|
||||||
/// How many levels of children to include in the JSON result.
|
/// How many levels of children to include in the JSON result.
|
||||||
///
|
///
|
||||||
|
@ -23,14 +23,14 @@ DriverError _createInvalidKeyValueTypeError(String invalidType) {
|
|||||||
/// and add more keys to the returned map.
|
/// and add more keys to the returned map.
|
||||||
abstract class CommandWithTarget extends Command {
|
abstract class CommandWithTarget extends Command {
|
||||||
/// Constructs this command given a [finder].
|
/// Constructs this command given a [finder].
|
||||||
CommandWithTarget(this.finder, {Duration? timeout}) : super(timeout: timeout) {
|
CommandWithTarget(this.finder, {super.timeout}) {
|
||||||
assert(finder != null, '$runtimeType target cannot be null');
|
assert(finder != null, '$runtimeType target cannot be null');
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
CommandWithTarget.deserialize(Map<String, String> json, DeserializeFinderFactory finderFactory)
|
CommandWithTarget.deserialize(super.json, DeserializeFinderFactory finderFactory)
|
||||||
: finder = finderFactory.deserializeFinder(json),
|
: finder = finderFactory.deserializeFinder(json),
|
||||||
super.deserialize(json);
|
super.deserialize();
|
||||||
|
|
||||||
/// Locates the object or objects targeted by this command.
|
/// Locates the object or objects targeted by this command.
|
||||||
final SerializableFinder finder;
|
final SerializableFinder finder;
|
||||||
@ -54,11 +54,10 @@ class WaitFor extends CommandWithTarget {
|
|||||||
/// appear within the [timeout] amount of time.
|
/// appear within the [timeout] amount of time.
|
||||||
///
|
///
|
||||||
/// If [timeout] is not specified, the command defaults to no timeout.
|
/// If [timeout] is not specified, the command defaults to no timeout.
|
||||||
WaitFor(SerializableFinder finder, {Duration? timeout})
|
WaitFor(super.finder, {super.timeout});
|
||||||
: super(finder, timeout: timeout);
|
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
WaitFor.deserialize(Map<String, String> json, DeserializeFinderFactory finderFactory) : super.deserialize(json, finderFactory);
|
WaitFor.deserialize(super.json, super.finderFactory) : super.deserialize();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get kind => 'waitFor';
|
String get kind => 'waitFor';
|
||||||
@ -70,11 +69,10 @@ class WaitForAbsent extends CommandWithTarget {
|
|||||||
/// disappear within the [timeout] amount of time.
|
/// disappear within the [timeout] amount of time.
|
||||||
///
|
///
|
||||||
/// If [timeout] is not specified, the command defaults to no timeout.
|
/// If [timeout] is not specified, the command defaults to no timeout.
|
||||||
WaitForAbsent(SerializableFinder finder, {Duration? timeout})
|
WaitForAbsent(super.finder, {super.timeout});
|
||||||
: super(finder, timeout: timeout);
|
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
WaitForAbsent.deserialize(Map<String, String> json, DeserializeFinderFactory finderFactory) : super.deserialize(json, finderFactory);
|
WaitForAbsent.deserialize(super.json, super.finderFactory) : super.deserialize();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get kind => 'waitForAbsent';
|
String get kind => 'waitForAbsent';
|
||||||
@ -86,13 +84,12 @@ class WaitForTappable extends CommandWithTarget {
|
|||||||
/// be tappable within the [timeout] amount of time.
|
/// be tappable within the [timeout] amount of time.
|
||||||
///
|
///
|
||||||
/// If [timeout] is not specified, the command defaults to no timeout.
|
/// If [timeout] is not specified, the command defaults to no timeout.
|
||||||
WaitForTappable(SerializableFinder finder, {Duration? timeout})
|
WaitForTappable(super.finder, {super.timeout});
|
||||||
: super(finder, timeout: timeout);
|
|
||||||
|
|
||||||
/// Deserialized this command from the value generated by [serialize].
|
/// Deserialized this command from the value generated by [serialize].
|
||||||
WaitForTappable.deserialize(
|
WaitForTappable.deserialize(
|
||||||
Map<String, String> json, DeserializeFinderFactory finderFactory)
|
super.json, super.finderFactory)
|
||||||
: super.deserialize(json, finderFactory);
|
: super.deserialize();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get kind => 'waitForTappable';
|
String get kind => 'waitForTappable';
|
||||||
@ -408,11 +405,11 @@ class Ancestor extends SerializableFinder {
|
|||||||
class GetSemanticsId extends CommandWithTarget {
|
class GetSemanticsId extends CommandWithTarget {
|
||||||
|
|
||||||
/// Creates a command which finds a Widget and then looks up the semantic id.
|
/// Creates a command which finds a Widget and then looks up the semantic id.
|
||||||
GetSemanticsId(SerializableFinder finder, {Duration? timeout}) : super(finder, timeout: timeout);
|
GetSemanticsId(super.finder, {super.timeout});
|
||||||
|
|
||||||
/// Creates a command from a JSON map.
|
/// Creates a command from a JSON map.
|
||||||
GetSemanticsId.deserialize(Map<String, String> json, DeserializeFinderFactory finderFactory)
|
GetSemanticsId.deserialize(super.json, super.finderFactory)
|
||||||
: super.deserialize(json, finderFactory);
|
: super.deserialize();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get kind => 'get_semantics_id';
|
String get kind => 'get_semantics_id';
|
||||||
|
@ -7,12 +7,12 @@ import 'message.dart';
|
|||||||
/// A Flutter Driver command that enables or disables the FrameSync mechanism.
|
/// A Flutter Driver command that enables or disables the FrameSync mechanism.
|
||||||
class SetFrameSync extends Command {
|
class SetFrameSync extends Command {
|
||||||
/// Creates a command to toggle the FrameSync mechanism.
|
/// Creates a command to toggle the FrameSync mechanism.
|
||||||
const SetFrameSync(this.enabled, { Duration? timeout }) : super(timeout: timeout);
|
const SetFrameSync(this.enabled, { super.timeout });
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
SetFrameSync.deserialize(Map<String, String> params)
|
SetFrameSync.deserialize(super.params)
|
||||||
: enabled = params['enabled']!.toLowerCase() == 'true',
|
: enabled = params['enabled']!.toLowerCase() == 'true',
|
||||||
super.deserialize(params);
|
super.deserialize();
|
||||||
|
|
||||||
/// Whether frameSync should be enabled or disabled.
|
/// Whether frameSync should be enabled or disabled.
|
||||||
final bool enabled;
|
final bool enabled;
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
import 'deserialization_factory.dart';
|
|
||||||
import 'enum_util.dart';
|
import 'enum_util.dart';
|
||||||
import 'find.dart';
|
import 'find.dart';
|
||||||
import 'message.dart';
|
import 'message.dart';
|
||||||
@ -34,12 +33,12 @@ EnumIndex<OffsetType> _offsetTypeIndex = EnumIndex<OffsetType>(OffsetType.values
|
|||||||
/// to device pixels via [dart:ui.FlutterView.devicePixelRatio].
|
/// to device pixels via [dart:ui.FlutterView.devicePixelRatio].
|
||||||
class GetOffset extends CommandWithTarget {
|
class GetOffset extends CommandWithTarget {
|
||||||
/// The `finder` looks for an element to get its rect.
|
/// The `finder` looks for an element to get its rect.
|
||||||
GetOffset(SerializableFinder finder, this.offsetType, { Duration? timeout }) : super(finder, timeout: timeout);
|
GetOffset(super.finder, this.offsetType, { super.timeout });
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
GetOffset.deserialize(Map<String, String> json, DeserializeFinderFactory finderFactory)
|
GetOffset.deserialize(super.json, super.finderFactory)
|
||||||
: offsetType = _offsetTypeIndex.lookupBySimpleName(json['offsetType']!),
|
: offsetType = _offsetTypeIndex.lookupBySimpleName(json['offsetType']!),
|
||||||
super.deserialize(json, finderFactory);
|
super.deserialize();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, String> serialize() => super.serialize()..addAll(<String, String>{
|
Map<String, String> serialize() => super.serialize()..addAll(<String, String>{
|
||||||
|
@ -2,16 +2,15 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
import 'deserialization_factory.dart';
|
|
||||||
import 'find.dart';
|
import 'find.dart';
|
||||||
|
|
||||||
/// A Flutter Driver command that taps on a target widget located by [finder].
|
/// A Flutter Driver command that taps on a target widget located by [finder].
|
||||||
class Tap extends CommandWithTarget {
|
class Tap extends CommandWithTarget {
|
||||||
/// Creates a tap command to tap on a widget located by [finder].
|
/// Creates a tap command to tap on a widget located by [finder].
|
||||||
Tap(SerializableFinder finder, { Duration? timeout }) : super(finder, timeout: timeout);
|
Tap(super.finder, { super.timeout });
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
Tap.deserialize(Map<String, String> json, DeserializeFinderFactory finderFactory) : super.deserialize(json, finderFactory);
|
Tap.deserialize(super.json, super.finderFactory) : super.deserialize();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get kind => 'tap';
|
String get kind => 'tap';
|
||||||
@ -22,21 +21,21 @@ class Scroll extends CommandWithTarget {
|
|||||||
/// Creates a scroll command that will attempt to scroll a scrollable view by
|
/// Creates a scroll command that will attempt to scroll a scrollable view by
|
||||||
/// dragging a widget located by the given [finder].
|
/// dragging a widget located by the given [finder].
|
||||||
Scroll(
|
Scroll(
|
||||||
SerializableFinder finder,
|
super.finder,
|
||||||
this.dx,
|
this.dx,
|
||||||
this.dy,
|
this.dy,
|
||||||
this.duration,
|
this.duration,
|
||||||
this.frequency, {
|
this.frequency, {
|
||||||
Duration? timeout,
|
super.timeout,
|
||||||
}) : super(finder, timeout: timeout);
|
});
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
Scroll.deserialize(Map<String, String> json, DeserializeFinderFactory finderFactory)
|
Scroll.deserialize(super.json, super.finderFactory)
|
||||||
: dx = double.parse(json['dx']!),
|
: dx = double.parse(json['dx']!),
|
||||||
dy = double.parse(json['dy']!),
|
dy = double.parse(json['dy']!),
|
||||||
duration = Duration(microseconds: int.parse(json['duration']!)),
|
duration = Duration(microseconds: int.parse(json['duration']!)),
|
||||||
frequency = int.parse(json['frequency']!),
|
frequency = int.parse(json['frequency']!),
|
||||||
super.deserialize(json, finderFactory);
|
super.deserialize();
|
||||||
|
|
||||||
/// Delta X offset per move event.
|
/// Delta X offset per move event.
|
||||||
final double dx;
|
final double dx;
|
||||||
@ -67,12 +66,12 @@ class Scroll extends CommandWithTarget {
|
|||||||
class ScrollIntoView extends CommandWithTarget {
|
class ScrollIntoView extends CommandWithTarget {
|
||||||
/// Creates this command given a [finder] used to locate the widget to be
|
/// Creates this command given a [finder] used to locate the widget to be
|
||||||
/// scrolled into view.
|
/// scrolled into view.
|
||||||
ScrollIntoView(SerializableFinder finder, { this.alignment = 0.0, Duration? timeout }) : super(finder, timeout: timeout);
|
ScrollIntoView(super.finder, { this.alignment = 0.0, super.timeout });
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
ScrollIntoView.deserialize(Map<String, String> json, DeserializeFinderFactory finderFactory)
|
ScrollIntoView.deserialize(super.json, super.finderFactory)
|
||||||
: alignment = double.parse(json['alignment']!),
|
: alignment = double.parse(json['alignment']!),
|
||||||
super.deserialize(json, finderFactory);
|
super.deserialize();
|
||||||
|
|
||||||
/// How the widget should be aligned.
|
/// How the widget should be aligned.
|
||||||
///
|
///
|
||||||
|
@ -8,10 +8,10 @@ import 'message.dart';
|
|||||||
/// A Flutter Driver command that requests an application health check.
|
/// A Flutter Driver command that requests an application health check.
|
||||||
class GetHealth extends Command {
|
class GetHealth extends Command {
|
||||||
/// Create a health check command.
|
/// Create a health check command.
|
||||||
const GetHealth({ Duration? timeout }) : super(timeout: timeout);
|
const GetHealth({ super.timeout });
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
GetHealth.deserialize(Map<String, String> json) : super.deserialize(json);
|
GetHealth.deserialize(super.json) : super.deserialize();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get kind => 'get_health';
|
String get kind => 'get_health';
|
||||||
|
@ -7,10 +7,10 @@ import 'message.dart';
|
|||||||
/// A Flutter Driver command that requests a string representation of the layer tree.
|
/// A Flutter Driver command that requests a string representation of the layer tree.
|
||||||
class GetLayerTree extends Command {
|
class GetLayerTree extends Command {
|
||||||
/// Create a command to request a string representation of the layer tree.
|
/// Create a command to request a string representation of the layer tree.
|
||||||
const GetLayerTree({ Duration? timeout }) : super(timeout: timeout);
|
const GetLayerTree({ super.timeout });
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
GetLayerTree.deserialize(Map<String, String> json) : super.deserialize(json);
|
GetLayerTree.deserialize(super.json) : super.deserialize();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get kind => 'get_layer_tree';
|
String get kind => 'get_layer_tree';
|
||||||
|
@ -7,10 +7,10 @@ import 'message.dart';
|
|||||||
/// A Flutter Driver command that requests a string representation of the render tree.
|
/// A Flutter Driver command that requests a string representation of the render tree.
|
||||||
class GetRenderTree extends Command {
|
class GetRenderTree extends Command {
|
||||||
/// Create a command to request a string representation of the render tree.
|
/// Create a command to request a string representation of the render tree.
|
||||||
const GetRenderTree({ Duration? timeout }) : super(timeout: timeout);
|
const GetRenderTree({ super.timeout });
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
GetRenderTree.deserialize(Map<String, String> json) : super.deserialize(json);
|
GetRenderTree.deserialize(super.json) : super.deserialize();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get kind => 'get_render_tree';
|
String get kind => 'get_render_tree';
|
||||||
|
@ -8,12 +8,12 @@ import 'message.dart';
|
|||||||
/// string response.
|
/// string response.
|
||||||
class RequestData extends Command {
|
class RequestData extends Command {
|
||||||
/// Create a command that sends a message.
|
/// Create a command that sends a message.
|
||||||
const RequestData(this.message, { Duration? timeout }) : super(timeout: timeout);
|
const RequestData(this.message, { super.timeout });
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
RequestData.deserialize(Map<String, String> params)
|
RequestData.deserialize(super.params)
|
||||||
: message = params['message'],
|
: message = params['message'],
|
||||||
super.deserialize(params);
|
super.deserialize();
|
||||||
|
|
||||||
/// The message being sent from the test to the application.
|
/// The message being sent from the test to the application.
|
||||||
final String? message;
|
final String? message;
|
||||||
|
@ -7,12 +7,12 @@ import 'message.dart';
|
|||||||
/// A Flutter Driver command that enables or disables semantics.
|
/// A Flutter Driver command that enables or disables semantics.
|
||||||
class SetSemantics extends Command {
|
class SetSemantics extends Command {
|
||||||
/// Creates a command that enables or disables semantics.
|
/// Creates a command that enables or disables semantics.
|
||||||
const SetSemantics(this.enabled, { Duration? timeout }) : super(timeout: timeout);
|
const SetSemantics(this.enabled, { super.timeout });
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
SetSemantics.deserialize(Map<String, String> params)
|
SetSemantics.deserialize(super.params)
|
||||||
: enabled = params['enabled']!.toLowerCase() == 'true',
|
: enabled = params['enabled']!.toLowerCase() == 'true',
|
||||||
super.deserialize(params);
|
super.deserialize();
|
||||||
|
|
||||||
/// Whether semantics should be enabled (true) or disabled (false).
|
/// Whether semantics should be enabled (true) or disabled (false).
|
||||||
final bool enabled;
|
final bool enabled;
|
||||||
|
@ -2,17 +2,16 @@
|
|||||||
// Use of this source code is governed by a BSD-style license that can be
|
// Use of this source code is governed by a BSD-style license that can be
|
||||||
// found in the LICENSE file.
|
// found in the LICENSE file.
|
||||||
|
|
||||||
import 'deserialization_factory.dart';
|
|
||||||
import 'find.dart';
|
import 'find.dart';
|
||||||
import 'message.dart';
|
import 'message.dart';
|
||||||
|
|
||||||
/// A Flutter Driver command that reads the text from a given element.
|
/// A Flutter Driver command that reads the text from a given element.
|
||||||
class GetText extends CommandWithTarget {
|
class GetText extends CommandWithTarget {
|
||||||
/// [finder] looks for an element that contains a piece of text.
|
/// [finder] looks for an element that contains a piece of text.
|
||||||
GetText(SerializableFinder finder, { Duration? timeout }) : super(finder, timeout: timeout);
|
GetText(super.finder, { super.timeout });
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
GetText.deserialize(Map<String, String> json, DeserializeFinderFactory finderFactory) : super.deserialize(json, finderFactory);
|
GetText.deserialize(super.json, super.finderFactory) : super.deserialize();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get kind => 'get_text';
|
String get kind => 'get_text';
|
||||||
@ -40,12 +39,12 @@ class GetTextResult extends Result {
|
|||||||
/// A Flutter Driver command that enters text into the currently focused widget.
|
/// A Flutter Driver command that enters text into the currently focused widget.
|
||||||
class EnterText extends Command {
|
class EnterText extends Command {
|
||||||
/// Creates a command that enters text into the currently focused widget.
|
/// Creates a command that enters text into the currently focused widget.
|
||||||
const EnterText(this.text, { Duration? timeout }) : super(timeout: timeout);
|
const EnterText(this.text, { super.timeout });
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
EnterText.deserialize(Map<String, String> json)
|
EnterText.deserialize(super.json)
|
||||||
: text = json['text']!,
|
: text = json['text']!,
|
||||||
super.deserialize(json);
|
super.deserialize();
|
||||||
|
|
||||||
/// The text extracted by the [GetText] command.
|
/// The text extracted by the [GetText] command.
|
||||||
final String text;
|
final String text;
|
||||||
@ -62,12 +61,12 @@ class EnterText extends Command {
|
|||||||
/// A Flutter Driver command that enables and disables text entry emulation.
|
/// A Flutter Driver command that enables and disables text entry emulation.
|
||||||
class SetTextEntryEmulation extends Command {
|
class SetTextEntryEmulation extends Command {
|
||||||
/// Creates a command that enables and disables text entry emulation.
|
/// Creates a command that enables and disables text entry emulation.
|
||||||
const SetTextEntryEmulation(this.enabled, { Duration? timeout }) : super(timeout: timeout);
|
const SetTextEntryEmulation(this.enabled, { super.timeout });
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
SetTextEntryEmulation.deserialize(Map<String, String> json)
|
SetTextEntryEmulation.deserialize(super.json)
|
||||||
: enabled = json['enabled'] == 'true',
|
: enabled = json['enabled'] == 'true',
|
||||||
super.deserialize(json);
|
super.deserialize();
|
||||||
|
|
||||||
/// Whether text entry emulation should be enabled.
|
/// Whether text entry emulation should be enabled.
|
||||||
final bool enabled;
|
final bool enabled;
|
||||||
|
@ -11,17 +11,16 @@ class WaitForCondition extends Command {
|
|||||||
/// Creates a command that waits for the given [condition] is met.
|
/// Creates a command that waits for the given [condition] is met.
|
||||||
///
|
///
|
||||||
/// The [condition] argument must not be null.
|
/// The [condition] argument must not be null.
|
||||||
const WaitForCondition(this.condition, {Duration? timeout})
|
const WaitForCondition(this.condition, {super.timeout})
|
||||||
: assert(condition != null),
|
: assert(condition != null);
|
||||||
super(timeout: timeout);
|
|
||||||
|
|
||||||
/// Deserializes this command from the value generated by [serialize].
|
/// Deserializes this command from the value generated by [serialize].
|
||||||
///
|
///
|
||||||
/// The [json] argument cannot be null.
|
/// The [json] argument cannot be null.
|
||||||
WaitForCondition.deserialize(Map<String, String> json)
|
WaitForCondition.deserialize(super.json)
|
||||||
: assert(json != null),
|
: assert(json != null),
|
||||||
condition = _deserialize(json),
|
condition = _deserialize(json),
|
||||||
super.deserialize(json);
|
super.deserialize();
|
||||||
|
|
||||||
/// The condition that this command shall wait for.
|
/// The condition that this command shall wait for.
|
||||||
final SerializableWaitCondition condition;
|
final SerializableWaitCondition condition;
|
||||||
|
@ -3,7 +3,7 @@ description: Integration and performance test API for Flutter applications
|
|||||||
homepage: https://flutter.dev
|
homepage: https://flutter.dev
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0-0 <3.0.0"
|
sdk: ">=2.17.0-0 <3.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
file: 6.1.2
|
file: 6.1.2
|
||||||
|
@ -5,13 +5,12 @@
|
|||||||
import 'package:flutter_driver/flutter_driver.dart';
|
import 'package:flutter_driver/flutter_driver.dart';
|
||||||
|
|
||||||
class StubNestedCommand extends CommandWithTarget {
|
class StubNestedCommand extends CommandWithTarget {
|
||||||
StubNestedCommand(SerializableFinder finder, this.times, {Duration? timeout})
|
StubNestedCommand(super.finder, this.times, {super.timeout});
|
||||||
: super(finder, timeout: timeout);
|
|
||||||
|
|
||||||
StubNestedCommand.deserialize(
|
StubNestedCommand.deserialize(
|
||||||
Map<String, String> json, DeserializeFinderFactory finderFactory)
|
super.json, super.finderFactory)
|
||||||
: times = int.parse(json['times']!),
|
: times = int.parse(json['times']!),
|
||||||
super.deserialize(json, finderFactory);
|
super.deserialize();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, String> serialize() {
|
Map<String, String> serialize() {
|
||||||
@ -25,12 +24,11 @@ class StubNestedCommand extends CommandWithTarget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class StubProberCommand extends CommandWithTarget {
|
class StubProberCommand extends CommandWithTarget {
|
||||||
StubProberCommand(SerializableFinder finder, this.times, {Duration? timeout})
|
StubProberCommand(super.finder, this.times, {super.timeout});
|
||||||
: super(finder, timeout: timeout);
|
|
||||||
|
|
||||||
StubProberCommand.deserialize(Map<String, String> json, DeserializeFinderFactory finderFactory)
|
StubProberCommand.deserialize(super.json, super.finderFactory)
|
||||||
: times = int.parse(json['times']!),
|
: times = int.parse(json['times']!),
|
||||||
super.deserialize(json, finderFactory);
|
super.deserialize();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Map<String, String> serialize() {
|
Map<String, String> serialize() {
|
||||||
|
@ -212,18 +212,12 @@ class FlutterPostSubmitFileComparator extends FlutterGoldenFileComparator {
|
|||||||
/// The [fs] and [platform] parameters are useful in tests, where the default
|
/// The [fs] and [platform] parameters are useful in tests, where the default
|
||||||
/// file system and platform can be replaced by mock instances.
|
/// file system and platform can be replaced by mock instances.
|
||||||
FlutterPostSubmitFileComparator(
|
FlutterPostSubmitFileComparator(
|
||||||
final Uri basedir,
|
super.basedir,
|
||||||
final SkiaGoldClient skiaClient, {
|
super.skiaClient, {
|
||||||
final FileSystem fs = const LocalFileSystem(),
|
super.fs,
|
||||||
final Platform platform = const LocalPlatform(),
|
super.platform,
|
||||||
String? namePrefix,
|
super.namePrefix,
|
||||||
}) : super(
|
});
|
||||||
basedir,
|
|
||||||
skiaClient,
|
|
||||||
fs: fs,
|
|
||||||
platform: platform,
|
|
||||||
namePrefix: namePrefix,
|
|
||||||
);
|
|
||||||
|
|
||||||
/// Creates a new [FlutterPostSubmitFileComparator] that mirrors the relative
|
/// Creates a new [FlutterPostSubmitFileComparator] that mirrors the relative
|
||||||
/// path resolution of the default [goldenFileComparator].
|
/// path resolution of the default [goldenFileComparator].
|
||||||
@ -293,18 +287,12 @@ class FlutterPreSubmitFileComparator extends FlutterGoldenFileComparator {
|
|||||||
/// The [fs] and [platform] parameters are useful in tests, where the default
|
/// The [fs] and [platform] parameters are useful in tests, where the default
|
||||||
/// file system and platform can be replaced by mock instances.
|
/// file system and platform can be replaced by mock instances.
|
||||||
FlutterPreSubmitFileComparator(
|
FlutterPreSubmitFileComparator(
|
||||||
final Uri basedir,
|
super.basedir,
|
||||||
final SkiaGoldClient skiaClient, {
|
super.skiaClient, {
|
||||||
final FileSystem fs = const LocalFileSystem(),
|
super.fs,
|
||||||
final Platform platform = const LocalPlatform(),
|
super.platform,
|
||||||
final String? namePrefix,
|
super.namePrefix,
|
||||||
}) : super(
|
});
|
||||||
basedir,
|
|
||||||
skiaClient,
|
|
||||||
fs: fs,
|
|
||||||
platform: platform,
|
|
||||||
namePrefix: namePrefix,
|
|
||||||
);
|
|
||||||
|
|
||||||
/// Creates a new [FlutterPreSubmitFileComparator] that mirrors the
|
/// Creates a new [FlutterPreSubmitFileComparator] that mirrors the
|
||||||
/// relative path resolution of the default [goldenFileComparator].
|
/// relative path resolution of the default [goldenFileComparator].
|
||||||
@ -383,11 +371,11 @@ class FlutterSkippingFileComparator extends FlutterGoldenFileComparator {
|
|||||||
/// Creates a [FlutterSkippingFileComparator] that will skip tests that
|
/// Creates a [FlutterSkippingFileComparator] that will skip tests that
|
||||||
/// are not in the right environment for golden file testing.
|
/// are not in the right environment for golden file testing.
|
||||||
FlutterSkippingFileComparator(
|
FlutterSkippingFileComparator(
|
||||||
final Uri basedir,
|
super.basedir,
|
||||||
final SkiaGoldClient skiaClient,
|
super.skiaClient,
|
||||||
this.reason, {
|
this.reason, {
|
||||||
String? namePrefix,
|
super.namePrefix,
|
||||||
}) : super(basedir, skiaClient, namePrefix: namePrefix);
|
});
|
||||||
|
|
||||||
/// Describes the reason for using the [FlutterSkippingFileComparator].
|
/// Describes the reason for using the [FlutterSkippingFileComparator].
|
||||||
///
|
///
|
||||||
@ -466,16 +454,11 @@ class FlutterLocalFileComparator extends FlutterGoldenFileComparator with LocalC
|
|||||||
/// The [fs] and [platform] parameters are useful in tests, where the default
|
/// The [fs] and [platform] parameters are useful in tests, where the default
|
||||||
/// file system and platform can be replaced by mock instances.
|
/// file system and platform can be replaced by mock instances.
|
||||||
FlutterLocalFileComparator(
|
FlutterLocalFileComparator(
|
||||||
final Uri basedir,
|
super.basedir,
|
||||||
final SkiaGoldClient skiaClient, {
|
super.skiaClient, {
|
||||||
final FileSystem fs = const LocalFileSystem(),
|
super.fs,
|
||||||
final Platform platform = const LocalPlatform(),
|
super.platform,
|
||||||
}) : super(
|
});
|
||||||
basedir,
|
|
||||||
skiaClient,
|
|
||||||
fs: fs,
|
|
||||||
platform: platform,
|
|
||||||
);
|
|
||||||
|
|
||||||
/// Creates a new [FlutterLocalFileComparator] that mirrors the
|
/// Creates a new [FlutterLocalFileComparator] that mirrors the
|
||||||
/// relative path resolution of the default [goldenFileComparator].
|
/// relative path resolution of the default [goldenFileComparator].
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: flutter_goldens
|
name: flutter_goldens
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0-0 <3.0.0"
|
sdk: ">=2.17.0-0 <3.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
# To update these, use "flutter update-packages --force-upgrade".
|
# To update these, use "flutter update-packages --force-upgrade".
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: flutter_goldens_client
|
name: flutter_goldens_client
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0-0 <3.0.0"
|
sdk: ">=2.17.0-0 <3.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
# To update these, use "flutter update-packages --force-upgrade".
|
# To update these, use "flutter update-packages --force-upgrade".
|
||||||
|
@ -85,7 +85,7 @@ class _DummyLocalizationsDelegate extends LocalizationsDelegate<DummyLocalizatio
|
|||||||
class DummyLocalizations { }
|
class DummyLocalizations { }
|
||||||
|
|
||||||
class LocalizationTracker extends StatefulWidget {
|
class LocalizationTracker extends StatefulWidget {
|
||||||
const LocalizationTracker({Key? key}) : super(key: key);
|
const LocalizationTracker({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<StatefulWidget> createState() => LocalizationTrackerState();
|
State<StatefulWidget> createState() => LocalizationTrackerState();
|
||||||
|
@ -8,11 +8,10 @@ import 'package:flutter_test/flutter_test.dart';
|
|||||||
|
|
||||||
class _TimePickerLauncher extends StatelessWidget {
|
class _TimePickerLauncher extends StatelessWidget {
|
||||||
const _TimePickerLauncher({
|
const _TimePickerLauncher({
|
||||||
Key? key,
|
|
||||||
this.onChanged,
|
this.onChanged,
|
||||||
required this.locale,
|
required this.locale,
|
||||||
this.entryMode = TimePickerEntryMode.dial,
|
this.entryMode = TimePickerEntryMode.dial,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final ValueChanged<TimeOfDay?>? onChanged;
|
final ValueChanged<TimeOfDay?>? onChanged;
|
||||||
final Locale locale;
|
final Locale locale;
|
||||||
|
@ -167,7 +167,7 @@ Widget buildFrame({
|
|||||||
}
|
}
|
||||||
|
|
||||||
class SyncLoadTest extends StatefulWidget {
|
class SyncLoadTest extends StatefulWidget {
|
||||||
const SyncLoadTest({Key? key}) : super(key: key);
|
const SyncLoadTest({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
SyncLoadTestState createState() => SyncLoadTestState();
|
SyncLoadTestState createState() => SyncLoadTestState();
|
||||||
|
@ -322,8 +322,8 @@ class _AnimationSheetRecorder extends StatefulWidget {
|
|||||||
required this.child,
|
required this.child,
|
||||||
required this.size,
|
required this.size,
|
||||||
required this.allLayers,
|
required this.allLayers,
|
||||||
Key? key,
|
super.key,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final _RecordedHandler? handleRecorded;
|
final _RecordedHandler? handleRecorded;
|
||||||
final Widget child;
|
final Widget child;
|
||||||
@ -375,10 +375,9 @@ class _AnimationSheetRecorderState extends State<_AnimationSheetRecorder> {
|
|||||||
// If `callback` is null, `_PostFrameCallbacker` is equivalent to a proxy box.
|
// If `callback` is null, `_PostFrameCallbacker` is equivalent to a proxy box.
|
||||||
class _PostFrameCallbacker extends SingleChildRenderObjectWidget {
|
class _PostFrameCallbacker extends SingleChildRenderObjectWidget {
|
||||||
const _PostFrameCallbacker({
|
const _PostFrameCallbacker({
|
||||||
Key? key,
|
super.child,
|
||||||
Widget? child,
|
|
||||||
this.callback,
|
this.callback,
|
||||||
}) : super(key: key, child: child);
|
});
|
||||||
|
|
||||||
final FrameCallback? callback;
|
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.
|
// positioned from top left to bottom right in a row-major order.
|
||||||
class _CellSheet extends StatelessWidget {
|
class _CellSheet extends StatelessWidget {
|
||||||
_CellSheet({
|
_CellSheet({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.cellSize,
|
required this.cellSize,
|
||||||
required this.children,
|
required this.children,
|
||||||
}) : assert(cellSize != null),
|
}) : assert(cellSize != null),
|
||||||
assert(children != null && children.isNotEmpty),
|
assert(children != null && children.isNotEmpty);
|
||||||
super(key: key);
|
|
||||||
|
|
||||||
final Size cellSize;
|
final Size cellSize;
|
||||||
final List<Widget> children;
|
final List<Widget> children;
|
||||||
@ -511,7 +509,7 @@ class _RenderRootableRepaintBoundary extends RenderRepaintBoundary {
|
|||||||
// A [RepaintBoundary], except that its render object has a `fullscreenToImage` method.
|
// A [RepaintBoundary], except that its render object has a `fullscreenToImage` method.
|
||||||
class _RootableRepaintBoundary extends SingleChildRenderObjectWidget {
|
class _RootableRepaintBoundary extends SingleChildRenderObjectWidget {
|
||||||
/// Creates a widget that isolates repaints.
|
/// Creates a widget that isolates repaints.
|
||||||
const _RootableRepaintBoundary({ Key? key, Widget? child }) : super(key: key, child: child);
|
const _RootableRepaintBoundary({ super.key, super.child });
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_RenderRootableRepaintBoundary createRenderObject(BuildContext context) => _RenderRootableRepaintBoundary();
|
_RenderRootableRepaintBoundary createRenderObject(BuildContext context) => _RenderRootableRepaintBoundary();
|
||||||
|
@ -1841,10 +1841,10 @@ class _LiveTestPointerRecord {
|
|||||||
|
|
||||||
class _LiveTestRenderView extends RenderView {
|
class _LiveTestRenderView extends RenderView {
|
||||||
_LiveTestRenderView({
|
_LiveTestRenderView({
|
||||||
required ViewConfiguration configuration,
|
required super.configuration,
|
||||||
required this.onNeedPaint,
|
required this.onNeedPaint,
|
||||||
required ui.FlutterView window,
|
required super.window,
|
||||||
}) : super(configuration: configuration, window: window);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TestViewConfiguration get configuration => super.configuration as TestViewConfiguration;
|
TestViewConfiguration get configuration => super.configuration as TestViewConfiguration;
|
||||||
|
@ -1246,7 +1246,7 @@ abstract class WidgetController {
|
|||||||
/// This is used, for instance, by [FlutterDriver].
|
/// This is used, for instance, by [FlutterDriver].
|
||||||
class LiveWidgetController extends WidgetController {
|
class LiveWidgetController extends WidgetController {
|
||||||
/// Creates a widget controller that uses the given binding.
|
/// Creates a widget controller that uses the given binding.
|
||||||
LiveWidgetController(WidgetsBinding binding) : super(binding);
|
LiveWidgetController(super.binding);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<void> pump([Duration? duration]) async {
|
Future<void> pump([Duration? duration]) async {
|
||||||
|
@ -584,7 +584,7 @@ abstract class ChainedFinder extends Finder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _FirstFinder extends ChainedFinder {
|
class _FirstFinder extends ChainedFinder {
|
||||||
_FirstFinder(Finder parent) : super(parent);
|
_FirstFinder(super.parent);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get description => '${parent.description} (ignoring all but first)';
|
String get description => '${parent.description} (ignoring all but first)';
|
||||||
@ -596,7 +596,7 @@ class _FirstFinder extends ChainedFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _LastFinder extends ChainedFinder {
|
class _LastFinder extends ChainedFinder {
|
||||||
_LastFinder(Finder parent) : super(parent);
|
_LastFinder(super.parent);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get description => '${parent.description} (ignoring all but last)';
|
String get description => '${parent.description} (ignoring all but last)';
|
||||||
@ -608,7 +608,7 @@ class _LastFinder extends ChainedFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _IndexFinder extends ChainedFinder {
|
class _IndexFinder extends ChainedFinder {
|
||||||
_IndexFinder(Finder parent, this.index) : super(parent);
|
_IndexFinder(super.parent, this.index);
|
||||||
|
|
||||||
final int index;
|
final int index;
|
||||||
|
|
||||||
@ -622,7 +622,7 @@ class _IndexFinder extends ChainedFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _HitTestableFinder extends ChainedFinder {
|
class _HitTestableFinder extends ChainedFinder {
|
||||||
_HitTestableFinder(Finder parent, this.alignment) : super(parent);
|
_HitTestableFinder(super.parent, this.alignment);
|
||||||
|
|
||||||
final Alignment alignment;
|
final Alignment alignment;
|
||||||
|
|
||||||
@ -651,7 +651,7 @@ class _HitTestableFinder extends ChainedFinder {
|
|||||||
abstract class MatchFinder extends Finder {
|
abstract class MatchFinder extends Finder {
|
||||||
/// Initializes a predicate-based Finder. Used by subclasses to initialize the
|
/// Initializes a predicate-based Finder. Used by subclasses to initialize the
|
||||||
/// [skipOffstage] property.
|
/// [skipOffstage] property.
|
||||||
MatchFinder({ bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
MatchFinder({ super.skipOffstage });
|
||||||
|
|
||||||
/// Returns true if the given element matches the pattern.
|
/// Returns true if the given element matches the pattern.
|
||||||
///
|
///
|
||||||
@ -667,8 +667,8 @@ abstract class MatchFinder extends Finder {
|
|||||||
abstract class _MatchTextFinder extends MatchFinder {
|
abstract class _MatchTextFinder extends MatchFinder {
|
||||||
_MatchTextFinder({
|
_MatchTextFinder({
|
||||||
this.findRichText = false,
|
this.findRichText = false,
|
||||||
bool skipOffstage = true,
|
super.skipOffstage,
|
||||||
}) : super(skipOffstage: skipOffstage);
|
});
|
||||||
|
|
||||||
/// Whether standalone [RichText] widgets should be found or not.
|
/// Whether standalone [RichText] widgets should be found or not.
|
||||||
///
|
///
|
||||||
@ -729,9 +729,9 @@ abstract class _MatchTextFinder extends MatchFinder {
|
|||||||
class _TextFinder extends _MatchTextFinder {
|
class _TextFinder extends _MatchTextFinder {
|
||||||
_TextFinder(
|
_TextFinder(
|
||||||
this.text, {
|
this.text, {
|
||||||
bool findRichText = false,
|
super.findRichText,
|
||||||
bool skipOffstage = true,
|
super.skipOffstage,
|
||||||
}) : super(findRichText: findRichText, skipOffstage: skipOffstage);
|
});
|
||||||
|
|
||||||
final String text;
|
final String text;
|
||||||
|
|
||||||
@ -747,9 +747,9 @@ class _TextFinder extends _MatchTextFinder {
|
|||||||
class _TextContainingFinder extends _MatchTextFinder {
|
class _TextContainingFinder extends _MatchTextFinder {
|
||||||
_TextContainingFinder(
|
_TextContainingFinder(
|
||||||
this.pattern, {
|
this.pattern, {
|
||||||
bool findRichText = false,
|
super.findRichText,
|
||||||
bool skipOffstage = true,
|
super.skipOffstage,
|
||||||
}) : super(findRichText: findRichText, skipOffstage: skipOffstage);
|
});
|
||||||
|
|
||||||
final Pattern pattern;
|
final Pattern pattern;
|
||||||
|
|
||||||
@ -763,7 +763,7 @@ class _TextContainingFinder extends _MatchTextFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _KeyFinder extends MatchFinder {
|
class _KeyFinder extends MatchFinder {
|
||||||
_KeyFinder(this.key, { bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
_KeyFinder(this.key, { super.skipOffstage });
|
||||||
|
|
||||||
final Key key;
|
final Key key;
|
||||||
|
|
||||||
@ -777,7 +777,7 @@ class _KeyFinder extends MatchFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _WidgetSubtypeFinder<T extends Widget> extends MatchFinder {
|
class _WidgetSubtypeFinder<T extends Widget> extends MatchFinder {
|
||||||
_WidgetSubtypeFinder({ bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
_WidgetSubtypeFinder({ super.skipOffstage });
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get description => 'is "$T"';
|
String get description => 'is "$T"';
|
||||||
@ -789,7 +789,7 @@ class _WidgetSubtypeFinder<T extends Widget> extends MatchFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _WidgetTypeFinder extends MatchFinder {
|
class _WidgetTypeFinder extends MatchFinder {
|
||||||
_WidgetTypeFinder(this.widgetType, { bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
_WidgetTypeFinder(this.widgetType, { super.skipOffstage });
|
||||||
|
|
||||||
final Type widgetType;
|
final Type widgetType;
|
||||||
|
|
||||||
@ -803,7 +803,7 @@ class _WidgetTypeFinder extends MatchFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _WidgetImageFinder extends MatchFinder {
|
class _WidgetImageFinder extends MatchFinder {
|
||||||
_WidgetImageFinder(this.image, { bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
_WidgetImageFinder(this.image, { super.skipOffstage });
|
||||||
|
|
||||||
final ImageProvider image;
|
final ImageProvider image;
|
||||||
|
|
||||||
@ -823,7 +823,7 @@ class _WidgetImageFinder extends MatchFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _WidgetIconFinder extends MatchFinder {
|
class _WidgetIconFinder extends MatchFinder {
|
||||||
_WidgetIconFinder(this.icon, { bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
_WidgetIconFinder(this.icon, { super.skipOffstage });
|
||||||
|
|
||||||
final IconData icon;
|
final IconData icon;
|
||||||
|
|
||||||
@ -838,7 +838,7 @@ class _WidgetIconFinder extends MatchFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _ElementTypeFinder extends MatchFinder {
|
class _ElementTypeFinder extends MatchFinder {
|
||||||
_ElementTypeFinder(this.elementType, { bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
_ElementTypeFinder(this.elementType, { super.skipOffstage });
|
||||||
|
|
||||||
final Type elementType;
|
final Type elementType;
|
||||||
|
|
||||||
@ -852,7 +852,7 @@ class _ElementTypeFinder extends MatchFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _WidgetFinder extends MatchFinder {
|
class _WidgetFinder extends MatchFinder {
|
||||||
_WidgetFinder(this.widget, { bool skipOffstage = true }) : super(skipOffstage: skipOffstage);
|
_WidgetFinder(this.widget, { super.skipOffstage });
|
||||||
|
|
||||||
final Widget widget;
|
final Widget widget;
|
||||||
|
|
||||||
@ -866,9 +866,8 @@ class _WidgetFinder extends MatchFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _WidgetPredicateFinder extends MatchFinder {
|
class _WidgetPredicateFinder extends MatchFinder {
|
||||||
_WidgetPredicateFinder(this.predicate, { String? description, bool skipOffstage = true })
|
_WidgetPredicateFinder(this.predicate, { String? description, super.skipOffstage })
|
||||||
: _description = description,
|
: _description = description;
|
||||||
super(skipOffstage: skipOffstage);
|
|
||||||
|
|
||||||
final WidgetPredicate predicate;
|
final WidgetPredicate predicate;
|
||||||
final String? _description;
|
final String? _description;
|
||||||
@ -883,9 +882,8 @@ class _WidgetPredicateFinder extends MatchFinder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _ElementPredicateFinder extends MatchFinder {
|
class _ElementPredicateFinder extends MatchFinder {
|
||||||
_ElementPredicateFinder(this.predicate, { String? description, bool skipOffstage = true })
|
_ElementPredicateFinder(this.predicate, { String? description, super.skipOffstage })
|
||||||
: _description = description,
|
: _description = description;
|
||||||
super(skipOffstage: skipOffstage);
|
|
||||||
|
|
||||||
final ElementPredicate predicate;
|
final ElementPredicate predicate;
|
||||||
final String? _description;
|
final String? _description;
|
||||||
@ -904,8 +902,8 @@ class _DescendantFinder extends Finder {
|
|||||||
this.ancestor,
|
this.ancestor,
|
||||||
this.descendant, {
|
this.descendant, {
|
||||||
this.matchRoot = false,
|
this.matchRoot = false,
|
||||||
bool skipOffstage = true,
|
super.skipOffstage,
|
||||||
}) : super(skipOffstage: skipOffstage);
|
});
|
||||||
|
|
||||||
final Finder ancestor;
|
final Finder ancestor;
|
||||||
final Finder descendant;
|
final Finder descendant;
|
||||||
|
@ -498,9 +498,9 @@ Future<void> expectLater(
|
|||||||
/// For convenience, instances of this class (such as the one provided by
|
/// For convenience, instances of this class (such as the one provided by
|
||||||
/// `testWidgets`) can be used as the `vsync` for `AnimationController` objects.
|
/// `testWidgets`) can be used as the `vsync` for `AnimationController` objects.
|
||||||
class WidgetTester extends WidgetController implements HitTestDispatcher, TickerProvider {
|
class WidgetTester extends WidgetController implements HitTestDispatcher, TickerProvider {
|
||||||
WidgetTester._(TestWidgetsFlutterBinding binding) : super(binding) {
|
WidgetTester._(super.binding) {
|
||||||
if (binding is LiveTestWidgetsFlutterBinding)
|
if (binding is LiveTestWidgetsFlutterBinding)
|
||||||
binding.deviceEventDispatcher = this;
|
(binding as LiveTestWidgetsFlutterBinding).deviceEventDispatcher = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The description string of the test currently being run.
|
/// 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);
|
typedef _TickerDisposeCallback = void Function(_TestTicker ticker);
|
||||||
|
|
||||||
class _TestTicker extends Ticker {
|
class _TestTicker extends Ticker {
|
||||||
_TestTicker(TickerCallback onTick, this._onDispose) : super(onTick);
|
_TestTicker(super.onTick, this._onDispose);
|
||||||
|
|
||||||
final _TickerDisposeCallback _onDispose;
|
final _TickerDisposeCallback _onDispose;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
name: flutter_test
|
name: flutter_test
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0-0 <3.0.0"
|
sdk: ">=2.17.0-0 <3.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
# To update these, use "flutter update-packages --force-upgrade".
|
# To update these, use "flutter update-packages --force-upgrade".
|
||||||
|
@ -399,7 +399,7 @@ Widget _boilerplate(Widget child) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class SimpleCustomSemanticsWidget extends LeafRenderObjectWidget {
|
class SimpleCustomSemanticsWidget extends LeafRenderObjectWidget {
|
||||||
const SimpleCustomSemanticsWidget(this.label, {Key? key}) : super(key: key);
|
const SimpleCustomSemanticsWidget(this.label, {super.key});
|
||||||
|
|
||||||
final String label;
|
final String label;
|
||||||
|
|
||||||
@ -431,9 +431,8 @@ class SimpleCustomSemanticsRenderObject extends RenderBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class SimpleGenericWidget<T> extends StatelessWidget {
|
class SimpleGenericWidget<T> extends StatelessWidget {
|
||||||
const SimpleGenericWidget({required Widget child, Key? key})
|
const SimpleGenericWidget({required Widget child, super.key})
|
||||||
: _child = child,
|
: _child = child;
|
||||||
super(key: key);
|
|
||||||
|
|
||||||
final Widget _child;
|
final Widget _child;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import 'package:flutter/scheduler.dart';
|
|||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
|
|
||||||
class CountButton extends StatefulWidget {
|
class CountButton extends StatefulWidget {
|
||||||
const CountButton({Key? key}) : super(key: key);
|
const CountButton({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<CountButton> createState() => _CountButtonState();
|
State<CountButton> createState() => _CountButtonState();
|
||||||
@ -30,7 +30,7 @@ class _CountButtonState extends State<CountButton> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class AnimateSample extends StatefulWidget {
|
class AnimateSample extends StatefulWidget {
|
||||||
const AnimateSample({Key? key}) : super(key: key);
|
const AnimateSample({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<AnimateSample> createState() => _AnimateSampleState();
|
State<AnimateSample> createState() => _AnimateSampleState();
|
||||||
|
@ -731,7 +731,7 @@ class _FakeSemanticsNode extends SemanticsNode {
|
|||||||
|
|
||||||
@immutable
|
@immutable
|
||||||
class _CustomColor extends Color {
|
class _CustomColor extends Color {
|
||||||
const _CustomColor(int value, {this.isEqual}) : super(value);
|
const _CustomColor(super.value, {this.isEqual});
|
||||||
final bool? isEqual;
|
final bool? isEqual;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -72,7 +72,7 @@ void main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _RestorableWidget extends StatefulWidget {
|
class _RestorableWidget extends StatefulWidget {
|
||||||
const _RestorableWidget({Key? key, this.restorationId}) : super(key: key);
|
const _RestorableWidget({this.restorationId});
|
||||||
|
|
||||||
final String? restorationId;
|
final String? restorationId;
|
||||||
|
|
||||||
|
@ -783,7 +783,7 @@ class FakeMatcher extends AsyncMatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _SingleTickerTest extends StatefulWidget {
|
class _SingleTickerTest extends StatefulWidget {
|
||||||
const _SingleTickerTest({Key? key}) : super(key: key);
|
const _SingleTickerTest();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_SingleTickerTestState createState() => _SingleTickerTestState();
|
_SingleTickerTestState createState() => _SingleTickerTestState();
|
||||||
|
@ -152,11 +152,10 @@ class PathUrlStrategy extends HashUrlStrategy {
|
|||||||
/// The [PlatformLocation] parameter is useful for testing to mock out browser
|
/// The [PlatformLocation] parameter is useful for testing to mock out browser
|
||||||
/// interactions.
|
/// interactions.
|
||||||
PathUrlStrategy([
|
PathUrlStrategy([
|
||||||
PlatformLocation platformLocation = const BrowserPlatformLocation(),
|
super.platformLocation,
|
||||||
]) : _basePath = stripTrailingSlash(extractPathname(checkBaseHref(
|
]) : _basePath = stripTrailingSlash(extractPathname(checkBaseHref(
|
||||||
platformLocation.getBaseHref(),
|
platformLocation.getBaseHref(),
|
||||||
))),
|
)));
|
||||||
super(platformLocation);
|
|
||||||
|
|
||||||
final String _basePath;
|
final String _basePath;
|
||||||
|
|
||||||
|
@ -92,8 +92,7 @@ class PathUrlStrategy extends HashUrlStrategy {
|
|||||||
///
|
///
|
||||||
/// The [PlatformLocation] parameter is useful for testing to mock out browser
|
/// The [PlatformLocation] parameter is useful for testing to mock out browser
|
||||||
/// interations.
|
/// interations.
|
||||||
PathUrlStrategy([PlatformLocation? platformLocation])
|
PathUrlStrategy([super.platformLocation]);
|
||||||
: super(platformLocation);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String getPath() => '';
|
String getPath() => '';
|
||||||
|
@ -3,7 +3,7 @@ description: Library to register Flutter Web plugins
|
|||||||
homepage: https://flutter.dev
|
homepage: https://flutter.dev
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0-0 <3.0.0"
|
sdk: ">=2.17.0-0 <3.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
|
@ -10,7 +10,7 @@ flutter:
|
|||||||
pluginClass: IntegrationTestPlugin
|
pluginClass: IntegrationTestPlugin
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.12.0 <3.0.0"
|
sdk: ">=2.17.0-0 <3.0.0"
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user