MyLogItem.fromJson constructor

MyLogItem.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory MyLogItem.fromJson(Map<String, dynamic> json) {
  final List? list = json["msg"];
  List<String>? msgs;
  if (null != list) {
    msgs = [];
    for (int i = 0, len = list.length; i < len; ++i) {
      msgs.add(list[i].toString());
    }
  }
  return MyLogItem(
    prefix: json["prefix"],
    msg: msgs,
  );
}