createInstance static method

MesiboMessage createInstance(
  1. List<Object?> result, {
  2. int? mid,
  3. int? refid,
  4. int? rsid,
  5. int? type,
  6. int? flags,
  7. int? status,
  8. int? expiry,
  9. int? origin,
  10. String? title,
  11. String? subtitle,
  12. String? footer,
  13. String? message,
  14. String? filePath,
  15. int? fileType,
  16. int? fileSize,
  17. double? latitude,
  18. double? longitude,
  19. MesiboProfileFlutter? profile,
  20. MesiboProfileFlutter? groupProfile,
  21. MesiboDateTimeFlutter? ts,
})

Implementation

);static final Map<int,MesiboMessage> objMap= HashMap();static MesiboMessage createInstance(List<Object?> result,{int? mid,int? refid,int? rsid,int? type,int? flags,int? status,int? expiry,int? origin,String? title,String? subtitle,String? footer,String? message,String? filePath,int? fileType,int? fileSize,double? latitude,double? longitude,MesiboProfileFlutter? profile,MesiboProfileFlutter? groupProfile,MesiboDateTimeFlutter? ts,}
     ){int hashid= mid!;if(hashid> 0&& objMap.containsKey(hashid)){MesiboMessage msg= objMap[hashid]!;msg.refid= refid!;msg.rsid= rsid!;msg.type= type!;msg.flags= flags!;msg.status= status!;msg.expiry= expiry!;msg.origin= origin!;msg.title= title;msg.subtitle= subtitle;msg.footer= footer;msg.message= message;msg.filePath= filePath;msg.fileType= fileType!;msg.fileSize= fileSize!;msg.latitude= latitude!;msg.longitude= longitude!;msg.ts= ts;return msg;}
 MesiboMessage msg= MesiboMessage(mid: result[0]! as int,refid: result[1]! as int,rsid: result[2]! as int,type: result[3]! as int,flags:
    result[4]! as int,status: result[5]! as int,expiry: result[6]! as int,origin: result[7]! as int,title:
             result[8] as String?,subtitle: result[9] as String?,footer:
   result[10] as String?,message: result[11] as String?,filePath: result[12] as String?,fileType:
            result[13]! as int,fileSize: result[14]! as int,latitude:
           result[15]! as double,longitude: result[16]! as double,profile: result[17]!= null? MesiboProfileFlutter.decode(result[17]! as List<Object?>):
        null,groupProfile: result[18]!= null? MesiboProfileFlutter.decode(result[18]! as List<Object?>):
          null,ts: result[19]!= null? MesiboDateTimeFlutter.decode(result[19]! as List<Object?>):
      null,);if(hashid> 0){objMap[hashid]= msg;}return msg;}