toJson method

Object? toJson()

Encodes the union payload.

Implementation

Object? toJson() => value.toObject();