toJSON method

  1. @override
String? toJSON()
override

Converts the date value to JSON.

Returns:

  • The date value in ISO 8601 string format.

Implementation

@override
String? toJSON() {
  return rawValue?.toUtc().toIso8601String();
}