Open natebot13 opened 3 years ago
This looks like a bug in the admin interop package:
class TransactionResult<T> {
TransactionResult._(this.aborted, this.data);
final bool aborted;
final T data;
static TransactionResult abort = new TransactionResult._(true, null);
static TransactionResult<T> success<T>(T data) =>
new TransactionResult._(false, data);
}
The abort field should really be closer to
static TransactionResult<T> abort = new TransactionResult<T>._(true, null);
Though I'm not sure if this is a valid use of generics. Might need to be changed into a static method the same way as success
.
I'm running into a compile issue with this code. The
transaction.abort
line gives an error saying:The return type 'TransactionResult<dynamic>' isn't a 'TransactionResult<Map<String, dynamic>>', as required by the closure's context.
Am I allowed to specify the transaction type?