Write constructor

Write({
  1. Map<String, dynamic>? putItem,
  2. Map<String, dynamic>? deleteKey,
})

Implementation

Write({this.putItem, this.deleteKey}) {
  if (!(putItem == null || deleteKey == null)) {
    throw ArgumentError('Either putItem or deleteKey has to be null,'
        " both can't be set in the same Write object");
  }

  if (putItem == null && deleteKey == null) {
    throw ArgumentError('Either putItem or deleteKey has to be non null');
  }
}