TestStep class Null safety

Describes a single step in a test. A test step is required to have an id which is the human-readable key for the test step. It has an optional image that is a capture of the widget for reference. Finally, it has an optional set of values that configure the step.



TestStep({required String id, Uint8List? image, Map<String, dynamic>? values})


hashCode int
The hash code for this object. [...]
read-only, inherited
id String
Human readable identifer for the test step.
image Uint8List?
Optional image that shows an example of the widget involved with the step.
key String
Guaranteed unique key for the step. This is meant for internal use to ensure widgets that represent the widget can be correctly, and uniquely, identified by Flutter's widget builder. This is not meant for external consumption as it is guaranteed to be unique with every object instance.
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
values Map<String, dynamic>?
The map of key / value pairs that are utilized by the step. This map will be different based on the step's id.


copyWith({String? id, Uint8List? image, Map<String, dynamic>? values}) TestStep
Copies the current test step with the values provided. The values from the original object will only be overwritten by any values from non-null passed in objects. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toJson() Map<String, dynamic>
Returns a JSON-compatible representation of the internal data structure. For the returned format, see the fromDynamic function.
toString() String
Returns the string encoded JSON representation for this class. This will remove all null values and empty collections from the returned string.


operator ==(Object other) bool
The equality operator. [...]

Static Methods

fromDynamic(dynamic map, {bool ignoreImages = false}) TestStep
Converts a JSON-like object to a TestStep. Whie this accepts a dynamic, that is because different frameworks provide different types of JSON-like objects. So long as the given map implements the [] operator, this will work. A value of null will result in null being returned and an object that does not suppor the [] operator will result in an exception being thrown. [...]