LCOV - code coverage report
Current view: top level - lib\data\local\entity\chatwoot_message.g.dart - chatwoot_message.g.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 33 64 51.6 %
Date: Thu Jul 15 17:16:16 2021 Functions: 0 0 -

          Line data    Source code
       1             : // GENERATED CODE - DO NOT MODIFY BY HAND
       2             : 
       3             : part of 'chatwoot_message.dart';
       4             : 
       5             : // **************************************************************************
       6             : // TypeAdapterGenerator
       7             : // **************************************************************************
       8             : 
       9             : class ChatwootMessageAdapter extends TypeAdapter<ChatwootMessage> {
      10             :   @override
      11             :   final int typeId = 2;
      12             : 
      13           0 :   @override
      14             :   ChatwootMessage read(BinaryReader reader) {
      15           0 :     final numOfFields = reader.readByte();
      16           0 :     final fields = <int, dynamic>{
      17           0 :       for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
      18             :     };
      19           0 :     return ChatwootMessage(
      20           0 :       id: fields[0] as int,
      21           0 :       content: fields[1] as String?,
      22           0 :       messageType: fields[2] as int?,
      23           0 :       contentType: fields[3] as String?,
      24           0 :       contentAttributes: fields[4] as dynamic,
      25           0 :       createdAt: fields[5] as String,
      26           0 :       conversationId: fields[6] as int?,
      27           0 :       attachments: (fields[7] as List?)?.cast<dynamic>(),
      28           0 :       sender: fields[8] as ChatwootEventMessageUser?,
      29             :     );
      30             :   }
      31             : 
      32           1 :   @override
      33             :   void write(BinaryWriter writer, ChatwootMessage obj) {
      34             :     writer
      35           1 :       ..writeByte(9)
      36           1 :       ..writeByte(0)
      37           2 :       ..write(obj.id)
      38           1 :       ..writeByte(1)
      39           2 :       ..write(obj.content)
      40           1 :       ..writeByte(2)
      41           2 :       ..write(obj.messageType)
      42           1 :       ..writeByte(3)
      43           2 :       ..write(obj.contentType)
      44           1 :       ..writeByte(4)
      45           2 :       ..write(obj.contentAttributes)
      46           1 :       ..writeByte(5)
      47           2 :       ..write(obj.createdAt)
      48           1 :       ..writeByte(6)
      49           2 :       ..write(obj.conversationId)
      50           1 :       ..writeByte(7)
      51           2 :       ..write(obj.attachments)
      52           1 :       ..writeByte(8)
      53           2 :       ..write(obj.sender);
      54             :   }
      55             : 
      56           0 :   @override
      57           0 :   int get hashCode => typeId.hashCode;
      58             : 
      59           0 :   @override
      60             :   bool operator ==(Object other) =>
      61             :       identical(this, other) ||
      62           0 :       other is ChatwootMessageAdapter &&
      63           0 :           runtimeType == other.runtimeType &&
      64           0 :           typeId == other.typeId;
      65             : }
      66             : 
      67             : // **************************************************************************
      68             : // JsonSerializableGenerator
      69             : // **************************************************************************
      70             : 
      71           4 : ChatwootMessage _$ChatwootMessageFromJson(Map<String, dynamic> json) {
      72           4 :   return ChatwootMessage(
      73           8 :     id: idFromJson(json['id']),
      74           4 :     content: json['content'] as String?,
      75           8 :     messageType: messageTypeFromJson(json['message_type']),
      76           4 :     contentType: json['content_type'] as String?,
      77           4 :     contentAttributes: json['content_attributes'],
      78           8 :     createdAt: createdAtFromJson(json['created_at']),
      79           8 :     conversationId: idFromJson(json['conversation_id']),
      80           4 :     attachments: json['attachments'] as List<dynamic>?,
      81           4 :     sender: json['sender'] == null
      82             :         ? null
      83           4 :         : ChatwootEventMessageUser.fromJson(
      84           4 :             json['sender'] as Map<String, dynamic>),
      85             :   );
      86             : }
      87             : 
      88           0 : Map<String, dynamic> _$ChatwootMessageToJson(ChatwootMessage instance) =>
      89           0 :     <String, dynamic>{
      90           0 :       'id': instance.id,
      91           0 :       'content': instance.content,
      92           0 :       'message_type': instance.messageType,
      93           0 :       'content_type': instance.contentType,
      94           0 :       'content_attributes': instance.contentAttributes,
      95           0 :       'created_at': instance.createdAt,
      96           0 :       'conversation_id': instance.conversationId,
      97           0 :       'attachments': instance.attachments,
      98           0 :       'sender': instance.sender?.toJson(),
      99             :     };

Generated by: LCOV version 1.15.alpha0w