toJSON method

  1. @override
dynamic toJSON(
  1. Observable? object,
  2. SerializationContext context
)

Implementation

@override
dynamic toJSON(Observable<dynamic>? object, SerializationContext context) {
  return object!.value is String ? object.value : object.value.toString();
}