encode<V> static method

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

Implementation

static V encode<V>(
  TestHelpersTestClock instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  container.encodeDateTime(
    'created',
    instance.created,
  );
  container.encodeDateTime(
    'deletes_after',
    instance.deletesAfter,
  );
  container.encodeDateTime(
    'frozen_time',
    instance.frozenTime,
  );
  container.encodeString(
    'id',
    instance.id,
  );
  container.encodeBool(
    'livemode',
    instance.livemode,
  );
  if (instance.name != null) {
    container.encodeString(
      'name',
      instance.name!,
    );
  }
  container.encodeString(
    'object',
    'test_helpers.test_clock',
  );
  container.encodeString(
    'status',
    instance.status,
  );
  return container.value;
}