toJson method

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

Object to Map serializer

Implementation

@override
Map<String, dynamic> toJson() {
  return {
    '@type': 'localFile',
    if (extra != null) '@extra': extra,
    'path': path,
    'can_be_downloaded': can_be_downloaded,
    'can_be_deleted': can_be_deleted,
    'is_downloading_active': is_downloading_active,
    'is_downloading_completed': is_downloading_completed,
    'download_offset': download_offset,
    'downloaded_prefix_size': downloaded_prefix_size,
    'downloaded_size': downloaded_size
  };
}