encode<T> static method

Object? encode<T>(
  1. T value, {
  2. Encodable<T>? using,
  3. bool isHumanReadable = true,
  4. List<CustomTypeDelegate> customTypes = const [],
})

Implementation

static Object? encode<T>(
  T value, {
  Encodable<T>? using,
  bool isHumanReadable = true,
  List<CustomTypeDelegate> customTypes = const [],
}) {
  final encoder = StandardEncoder(isHumanReadable, customTypes);
  encoder.encodeObject(value, using: using);
  return encoder._value;
}