title: how can we use extends in function?
body: <pre><code>Future dioGet&lt;T extends BaseModel&gt;(String path,T model)async{  
  ...asdsasa  
  }  
  
  
  
  abstract class BaseModel&lt;T&gt;{  
    Map&lt;String,dynamic&gt; toJson();  
    T fromJson(Map&lt;String,Object&gt; json);  
  }  
  </code></pre>
  <p>In the dioGet function above, (T extends BaseModel).What does this do?</p>
  <p>does the function return a BaseModel object?</p>
  <p>or, the object that will come to the function needs to be extends from BaseModel?</p>
  <p>What is T?</p>