save method
Implementation
Future<X> save(X toSave) async {
if (toSave.mkey?.mxid != null) {
await this.update(this.keyToId(toSave.mkey)!, toSave);
return await this.load(keyToId(toSave.mkey)!);
} else {
return await this.create(toSave);
}
}