We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
empty()
1 parent cad5947 commit 22be3a4Copy full SHA for 22be3a4
lib/api/route/messages.dart
@@ -150,6 +150,17 @@ class GetMessagesResult {
150
required this.messages,
151
});
152
153
+ /// An example empty result, for use in tests.
154
+ GetMessagesResult.empty() :
155
+ // this `anchor` was observed empirically;
156
+ // also, it's not representative of all requests.
157
+ anchor = 10000000000000000,
158
+ foundNewest = true,
159
+ foundOldest = true,
160
+ foundAnchor = false,
161
+ historyLimited = false, // not representative of all requests
162
+ messages = [];
163
+
164
factory GetMessagesResult.fromJson(Map<String, dynamic> json) =>
165
_$GetMessagesResultFromJson(json);
166
0 commit comments