encode<V> static method

V encode<V>(
  1. SecretServiceResourceScope instance,
  2. Encoder<V> encoder
)

Implementation

static V encode<V>(
  SecretServiceResourceScope instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeString(
    'type',
    instance.type,
  );
  if (instance.user != null) {
    container.encodeString(
      'user',
      instance.user!,
    );
  }
  return container.value;
}