LCOV - code coverage report
Current view: top level - lib/src/utils - file_send_request_credentials.dart (source / functions) Hit Total Coverage
Test: merged.info Lines: 6 13 46.2 %
Date: 2024-09-27 11:38:01 Functions: 0 0 -

          Line data    Source code
       1             : /*
       2             :  *   Famedly Matrix SDK
       3             :  *   Copyright (C) 2019, 2020, 2021 Famedly GmbH
       4             :  *
       5             :  *   This program is free software: you can redistribute it and/or modify
       6             :  *   it under the terms of the GNU Affero General Public License as
       7             :  *   published by the Free Software Foundation, either version 3 of the
       8             :  *   License, or (at your option) any later version.
       9             :  *
      10             :  *   This program is distributed in the hope that it will be useful,
      11             :  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
      12             :  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
      13             :  *   GNU Affero General Public License for more details.
      14             :  *
      15             :  *   You should have received a copy of the GNU Affero General Public License
      16             :  *   along with this program.  If not, see <https://www.gnu.org/licenses/>.
      17             :  */
      18             : 
      19             : class FileSendRequestCredentials {
      20             :   final String? inReplyTo;
      21             :   final String? editEventId;
      22             :   final int? shrinkImageMaxDimension;
      23             :   final Map<String, dynamic>? extraContent;
      24             : 
      25           3 :   const FileSendRequestCredentials({
      26             :     this.inReplyTo,
      27             :     this.editEventId,
      28             :     this.shrinkImageMaxDimension,
      29             :     this.extraContent,
      30             :   });
      31             : 
      32           0 :   factory FileSendRequestCredentials.fromJson(Map<String, dynamic> json) =>
      33           0 :       FileSendRequestCredentials(
      34           0 :         inReplyTo: json['in_reply_to'],
      35           0 :         editEventId: json['edit_event_id'],
      36           0 :         shrinkImageMaxDimension: json['shrink_image_max_dimension'],
      37           0 :         extraContent: json['extra_content'],
      38             :       );
      39             : 
      40           6 :   Map<String, dynamic> toJson() => {
      41           3 :         if (inReplyTo != null) 'in_reply_to': inReplyTo,
      42           3 :         if (editEventId != null) 'edit_event_id': editEventId,
      43           3 :         if (shrinkImageMaxDimension != null)
      44           0 :           'shrink_image_max_dimension': shrinkImageMaxDimension,
      45           3 :         if (extraContent != null) 'extra_content': extraContent,
      46             :       };
      47             : }

Generated by: LCOV version 1.14