Document constructor

Document({
  1. required String blockId,
  2. required SerializerStrategy serializer,
  3. required WsChannel ws,
  4. CryptoStrategy? crypto,
  5. CacheStrategy? cache,
  6. SecretKey? secretKey,
  7. SmartCache? smartCache,
  8. bool local = false,
  9. void onMutate()?,
  10. Future<void> onSet(
    1. Map<String, dynamic>
    )?,
})

Implementation

Document({
  required String blockId,
  required SerializerStrategy serializer,
  required WsChannel ws,
  CryptoStrategy? crypto,
  CacheStrategy? cache,
  SecretKey? secretKey,
  SmartCache? smartCache,
  bool local = false,
  void Function()? onMutate,
  Future<void> Function(Map<String, dynamic>)? onSet,
}) : _blockId = blockId,
     _serializer = serializer,
     _ws = ws,
     _crypto = crypto,
     _cache = cache,
     _secretKey = secretKey,
     _smartCache = smartCache,
     _local = local,
     _onMutate = onMutate,
     _onSet = onSet;