toJson method

dynamic toJson()

Converts the current value to JSON.

This method assumes that the generic type T has a toJson method defined.

Implementation

dynamic toJson() => (value as dynamic)?.toJson();