listFromJsonArray static method

List<Message> listFromJsonArray(
  1. List array
)

Creates a list of object from a json array

Implementation

static List<Message> listFromJsonArray(List<dynamic> array) {
  return List.generate(
    array.length,
    (i) => Message.fromJson(array[i]),
  );
}