saveFcm method

Future<Map<String, dynamic>> saveFcm(
  1. Map body
)

Implementation

Future<Map<String, dynamic>> saveFcm(
  Map body,
) async {
  var response = await http.post(
      Uri.parse(
          '$dataBaseUrl/api/notification/v1/orgs/$org/users/$username/register-fcm-token/'),
      headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Token $token',
      },
      body: json.encode(body));

  return json.decode(response.body);
}