toJson method

  1. @override
Map<String, dynamic> toJson()
override

Serializes the object to its JSON representation.

Implementation

@override
Map<String, dynamic> toJson() => {
      'signature': signature.toRadixString(16).padLeft(4, '0'),
      'versionToExtract': versionToExtract,
      'generalFlag': generalFlag.toRadixString(16).padLeft(4, '0'),
      'compressionMethod':
          compressionMethod.toRadixString(16).padLeft(4, '0'),
      'lastModTime': lastModTime.toRadixString(16).padLeft(4, '0'),
      'lastModDate': lastModDate.toRadixString(16).padLeft(4, '0'),
      'crc32': crc32.toRadixString(16).padLeft(8, '0'),
      'compressedSize': compressedSize,
      'uncompressedSize': uncompressedSize,
      'filenameSize': filenameSize,
      'extraFieldSize': extraFieldSize,
      'filename': filename,
      'extraField': extraField,
      'offset': '$offsetStart - $offsetEnd',
    };