sendTest method
Future<PushTestSendResult>
sendTest({
- required PushTestSendBody body,
- String? authorization,
override
Implementation
@override
Future<PushTestSendResult> sendTest({
required PushTestSendBody body,
String? authorization,
}) async {
final response = await _client.request(
method: 'POST',
path: '/dashboard/push/test',
headers: {'authorization': authorization},
body: body,
);
final _body = await response.transform(utf8.decoder).join();
if (jsonDecode(_body) case {'data': final Map data}) {
return PushTestSendResult.fromJson(Map.from((data as Map)));
}
throw Exception('Invalid response');
}