offlineOperations property

  1. @protected
  2. @visibleForTesting
Set<OfflineOperation<T>> offlineOperations
inherited

Implementation

@protected
@visibleForTesting
Set<OfflineOperation<T>> get offlineOperations {
  final node = graph._getNode(_offlineAdapterKey);
  return (node ?? {}).entries.where((e) {
    // extract type from e.g. _offline:users#4:findOne
    return e.key.split(':')[1].startsWith(internalType);
  }).map((e) {
    // get first edge value
    final map = json.decode(e.value.first) as Map<String, dynamic>;
    return OfflineOperation.fromJson(map, this);
  }).toSet();
}