toJSON method

  1. @override
List<Map<String, dynamic>>? toJSON()
override

Converts the list of T objects to JSON.

Returns:

  • A list of JSON maps representing the T objects.

Implementation

@override
List<Map<String, dynamic>>? toJSON() {
  return rawValue?.map((element) => element.toJSON()).toList();
}