UpdateChatLastMessage.fromMap constructor

UpdateChatLastMessage.fromMap(
  1. Map<String, dynamic> map
)

Implementation

UpdateChatLastMessage.fromMap(Map<String, dynamic> map) {
  extra = map['@extra'];
  client_id = map['@client_id'];
  chat_id = map['chat_id'];
  if (map['last_message'] != null) {
    last_message = TdApiMap.fromMap(map['last_message']) as Message;
  }
  if (map['positions'] != null) {
    positions = [];
    for (var someValue in map['positions']) {
      if (someValue != null) {
        positions?.add(TdApiMap.fromMap(someValue) as ChatPosition);
      }
    }
  }
}