listToJson<T> function

List? listToJson<T>(
  1. List? list,
  2. Object? toJson(
    1. T
    )
)

Implementation

List<dynamic>? listToJson<T>(List<dynamic>? list, Object? Function(T) toJson) =>
    list?.map((e) => toJson(e)).toList();