addDeviceDetails method

  1. @override
Future<SpinachUser> addDeviceDetails(
  1. Map<String, dynamic>? body,
  2. String? id
)
override

Implementation

@override
Future<SpinachUser> addDeviceDetails(Map<String, dynamic>? body, String? id) async {
  if (body == null || id == null){
    throw Exception("");
  }
  var res = await _postWithKey("/users/" + id + "/devices", body);
  return SpinachUser.fromJson(jsonDecode(res.body));
}