final leaseMap = lease as Map;
await firebaseProfile.createLease(context, lease).then((newLease) {
leaseMap['documentID'] = newLease.id(); // despite this returns an string it fails
});
Unhandled Exception: NoSuchMethodError: Class 'String' has no instance method 'call'. E/flutter ( 9361): Receiver: "ID" E/flutter ( 9361): Tried calling: call()
CodePudding user response:
Try:
leaseMap['documentID'] = newLease.id;
without ()