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'),
      'versionMade': versionMade,
      '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,
      'commentLength': commentLength,
      'diskNumberStart': diskNumberStart,
      'internalAttributes':
          internalAttributes.toRadixString(16).padLeft(4, '0'),
      'externalAttributes':
          externalAttributes.toRadixString(16).padLeft(8, '0'),
      'relativeOffset': relativeOffset,
      'filename': filename,
      'extraField': extraField,
      'comment': comment,
      'offset': '$offsetStart - $offsetEnd',
    };