@@ -11,15 +11,13 @@ class WaitForCondition extends Command {
1111 /// Creates a command that waits for the given [condition] is met.
1212 ///
1313 /// The [condition] argument must not be null.
14- const WaitForCondition (this .condition, {super .timeout})
15- : assert (condition != null );
14+ const WaitForCondition (this .condition, {super .timeout});
1615
1716 /// Deserializes this command from the value generated by [serialize] .
1817 ///
1918 /// The [json] argument cannot be null.
2019 WaitForCondition .deserialize (super .json)
21- : assert (json != null ),
22- condition = _deserialize (json),
20+ : condition = _deserialize (json),
2321 super .deserialize ();
2422
2523 /// The condition that this command shall wait for.
@@ -94,7 +92,6 @@ class NoTransientCallbacks extends SerializableWaitCondition {
9492 ///
9593 /// The [json] argument must not be null.
9694 factory NoTransientCallbacks .deserialize (Map <String , String > json) {
97- assert (json != null );
9895 if (json['conditionName' ] != 'NoTransientCallbacksCondition' ) {
9996 throw SerializationException ('Error occurred during deserializing the NoTransientCallbacksCondition JSON string: $json ' );
10097 }
@@ -115,7 +112,6 @@ class NoPendingFrame extends SerializableWaitCondition {
115112 ///
116113 /// The [json] argument must not be null.
117114 factory NoPendingFrame .deserialize (Map <String , String > json) {
118- assert (json != null );
119115 if (json['conditionName' ] != 'NoPendingFrameCondition' ) {
120116 throw SerializationException ('Error occurred during deserializing the NoPendingFrameCondition JSON string: $json ' );
121117 }
@@ -136,7 +132,6 @@ class FirstFrameRasterized extends SerializableWaitCondition {
136132 ///
137133 /// The [json] argument must not be null.
138134 factory FirstFrameRasterized .deserialize (Map <String , String > json) {
139- assert (json != null );
140135 if (json['conditionName' ] != 'FirstFrameRasterizedCondition' ) {
141136 throw SerializationException ('Error occurred during deserializing the FirstFrameRasterizedCondition JSON string: $json ' );
142137 }
@@ -160,7 +155,6 @@ class NoPendingPlatformMessages extends SerializableWaitCondition {
160155 ///
161156 /// The [json] argument must not be null.
162157 factory NoPendingPlatformMessages .deserialize (Map <String , String > json) {
163- assert (json != null );
164158 if (json['conditionName' ] != 'NoPendingPlatformMessagesCondition' ) {
165159 throw SerializationException ('Error occurred during deserializing the NoPendingPlatformMessagesCondition JSON string: $json ' );
166160 }
@@ -176,15 +170,13 @@ class CombinedCondition extends SerializableWaitCondition {
176170 /// Creates a [CombinedCondition] condition.
177171 ///
178172 /// The [conditions] argument must not be null.
179- const CombinedCondition (this .conditions)
180- : assert (conditions != null );
173+ const CombinedCondition (this .conditions);
181174
182175 /// Factory constructor to parse a [CombinedCondition] instance from the
183176 /// given JSON map.
184177 ///
185178 /// The [jsonMap] argument must not be null.
186179 factory CombinedCondition .deserialize (Map <String , String > jsonMap) {
187- assert (jsonMap != null );
188180 if (jsonMap['conditionName' ] != 'CombinedCondition' ) {
189181 throw SerializationException ('Error occurred during deserializing the CombinedCondition JSON string: $jsonMap ' );
190182 }
@@ -210,7 +202,6 @@ class CombinedCondition extends SerializableWaitCondition {
210202 final Map <String , String > jsonMap = super .serialize ();
211203 final List <Map <String , String >> jsonConditions = conditions.map (
212204 (SerializableWaitCondition condition) {
213- assert (condition != null );
214205 return condition.serialize ();
215206 }).toList ();
216207 jsonMap['conditions' ] = json.encode (jsonConditions);
@@ -222,7 +213,6 @@ class CombinedCondition extends SerializableWaitCondition {
222213///
223214/// The [json] argument must not be null.
224215SerializableWaitCondition _deserialize (Map <String , String > json) {
225- assert (json != null );
226216 final String conditionName = json['conditionName' ]! ;
227217 switch (conditionName) {
228218 case 'NoTransientCallbacksCondition' :
0 commit comments