ClientList.fromResult constructor

ClientList.fromResult(
  1. List<String> result
)

Implementation

factory ClientList.fromResult(List<String> result) {
  List<ClientInfo> _list = result
      .where((line) => line.isNotEmpty) // 过滤空行
      .map((line) => _parseClientInfo(line))
      .toList(growable: false);

  return ClientList(list: _list);
}