prefer_initializing_formals (#8797)
This commit is contained in:
committed by
GitHub
parent
f8238185cc
commit
a9ba0e2f88
@@ -161,9 +161,8 @@ class ByValueKey extends SerializableFinder {
|
||||
final String finderType = 'ByValueKey';
|
||||
|
||||
/// Creates a finder given the key value.
|
||||
ByValueKey(dynamic keyValue)
|
||||
: this.keyValue = keyValue,
|
||||
this.keyValueString = '$keyValue',
|
||||
ByValueKey(this.keyValue)
|
||||
: this.keyValueString = '$keyValue',
|
||||
this.keyValueType = '${keyValue.runtimeType}' {
|
||||
if (!_supportedKeyValueTypes.contains(keyValue.runtimeType))
|
||||
throw _createInvalidKeyValueTypeError('$keyValue.runtimeType');
|
||||
|
||||
@@ -22,9 +22,8 @@ class MatchResult {
|
||||
: hasMatched = true,
|
||||
mismatchDescription = null;
|
||||
|
||||
MatchResult._mismatched(String mismatchDescription)
|
||||
: hasMatched = false,
|
||||
mismatchDescription = mismatchDescription;
|
||||
MatchResult._mismatched(this.mismatchDescription)
|
||||
: hasMatched = false;
|
||||
|
||||
/// Whether the match succeeded.
|
||||
final bool hasMatched;
|
||||
|
||||
@@ -184,8 +184,6 @@ class TimedEvent {
|
||||
final Duration duration;
|
||||
|
||||
/// Creates a timed event given begin and end timestamps in microseconds.
|
||||
TimedEvent(int beginTimeMicros, int endTimeMicros)
|
||||
: this.beginTimeMicros = beginTimeMicros,
|
||||
this.endTimeMicros = endTimeMicros,
|
||||
this.duration = new Duration(microseconds: endTimeMicros - beginTimeMicros);
|
||||
TimedEvent(this.beginTimeMicros, this.endTimeMicros)
|
||||
: this.duration = new Duration(microseconds: endTimeMicros - beginTimeMicros);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user