Skip to content

Commit 8d68939

Browse files
committed
narrow [nfc]: Reorder ApiNarrowWith to be later, since more specific
As suggested by Greg: #1662 (comment)
1 parent 6fcc009 commit 8d68939

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

lib/api/model/narrow.dart

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -173,22 +173,6 @@ class ApiNarrowPmWith extends ApiNarrowDm {
173173
ApiNarrowPmWith._(super.operand, {super.negated});
174174
}
175175

176-
/// An [ApiNarrowElement] with the 'with' operator.
177-
///
178-
/// If part of [ApiNarrow] use [resolveApiNarrowForServer].
179-
class ApiNarrowWith extends ApiNarrowElement {
180-
@override String get operator => 'with';
181-
182-
@override final int operand;
183-
184-
ApiNarrowWith(this.operand, {super.negated});
185-
186-
factory ApiNarrowWith.fromJson(Map<String, dynamic> json) => ApiNarrowWith(
187-
json['operand'] as int,
188-
negated: json['negated'] as bool? ?? false,
189-
);
190-
}
191-
192176
class ApiNarrowIs extends ApiNarrowElement {
193177
@override String get operator => 'is';
194178

@@ -229,6 +213,22 @@ enum IsOperand {
229213
String toJson() => toString();
230214
}
231215

216+
/// An [ApiNarrowElement] with the 'with' operator.
217+
///
218+
/// If part of [ApiNarrow] use [resolveApiNarrowForServer].
219+
class ApiNarrowWith extends ApiNarrowElement {
220+
@override String get operator => 'with';
221+
222+
@override final int operand;
223+
224+
ApiNarrowWith(this.operand, {super.negated});
225+
226+
factory ApiNarrowWith.fromJson(Map<String, dynamic> json) => ApiNarrowWith(
227+
json['operand'] as int,
228+
negated: json['negated'] as bool? ?? false,
229+
);
230+
}
231+
232232
class ApiNarrowMessageId extends ApiNarrowElement {
233233
@override String get operator => 'id';
234234

0 commit comments

Comments
 (0)