toJson method

Map<String, dynamic> toJson()

Produces a Map that can be serialized to JSON.

Implementation

Map<String, dynamic> toJson() {
  final sdkInfo = sdk?.toJson();
  return {
    if (sdkInfo?.isNotEmpty ?? false) 'sdk_info': sdkInfo,
    if (_images?.isNotEmpty ?? false)
      'images': _images!
          .map((e) => e.toJson())
          .where((element) => element.isNotEmpty)
          .toList(growable: false)
  };
}