getAccount method
Implementation
@override
Future<Account> getAccount(model.Session session) async {
_session = session;
final res = await _api.nakamaGetAccount();
final acc = Account();
// Some workaround here while protobuf expects the vars map to not be null
acc.mergeFromProto3Json((res.body!.copyWith(
devices: res.body!.devices!
.map((e) => e.copyWith(
vars: e.vars ?? {},
))
.toList(),
)).toJson());
return acc;
}