toAtNotification method

AtNotification toAtNotification(
  1. String response
)

Converts String response into AtNotification type.

Implementation

AtNotification toAtNotification(String response) {
  response = response.toString().replaceAll(RegExp('[|]'), '');
  response = response.replaceAll('notification:', '').trim();
  return AtNotification.fromJson(jsonDecode(response));
}