title: How to populate a List based on a Table and its rows in Dart?
body: <p>I want to populate a list of Objects based on a HTML Table. Let's say I have the following class:</p>
  
  <pre><code>class Employee
  {
    String name;
    String department;
    num salary;
  
    ...methods
  }
  </code></pre>
  
  <p>And in my HTML, I have the following table:</p>
  
  <pre><code>&lt;table class="table" id="employeeTable"&gt;
     &lt;thead&gt;
     &lt;tr&gt;
       &lt;th&gt;Name
       &lt;th&gt;Departament
       &lt;th&gt;Salary  
       &lt;tbody id="employeeTableBody"&gt;
     &lt;tr&gt;
       &lt;td&gt; John
       &lt;td&gt; 1
       &lt;td&gt; 1500
     &lt;tr&gt;
       &lt;td&gt; Mary
       &lt;td&gt; 2
       &lt;td&gt; 2500
                ...etc    
  
  &lt;/table&gt;
  </code></pre>
  
  <p>So, how do I query the table, get its rows, then get its cells to fill my List of Employees (in this case)?</p>
  
  <p>I tried to use something like:</p>
  
  <pre><code>    TableElement table = query("#employeesTable");
      Element tableBody = query("#employeesTableBody");
  </code></pre>
  
  <p>But I couldn't find a proper method in TableElement or Element to return TableRowElement, or maybe the cells of it. I tried to get the children nodes also, but without sucess.</p>
  
  <p>A pseudo-algorithm to fulfil this task would be something like this:</p>
  
  <pre><code>1. Get the table
  2. For each row of the table
  2.a Create a new Employee object based on the value of each cell of the row.
  2.b Append this object to the Employee List.
  3. End
  </code></pre>