title: passing interface as a argument in between usecases and repositories
body: <p>I want to pass <code>interface</code> as a request in my use cases and repositories while following the clean architecture in <code>flutter</code></p>
  <p>hence my method signature is as follows for <code>usecases</code> and <code>respositories</code> respectively.</p>
  <pre><code>Future&lt;Either&lt;Failure, ResponseData&gt;&gt; call(IRequest params) // use case
  Future&lt;Either&lt;Failure, ResponseData&gt;&gt; updateUserProfile(IRequest request); // repository
  </code></pre>
  <p>Now request <code>entities</code> and <code>models</code> are as follows</p>
  <pre><code>//Entity
  class UserProfileRequestData  implements IRequest{
  
  
    late final int id;
    late final String first_name;
    late final String last_name;
    
     UserProfileRequestData(
        {required this.id,
        required this.first_name,
        required this.last_name});
        
   @override
    Object toRequest() {
      // TODO: implement toRequest
      throw UnimplementedError();
    }
  }
  
  //Model
  class UserProfileRequestDataModel extends UserProfileRequestData implements IRequest {
  
       UserProfileRequestDataModel({
          required int id,
          required String first_name,
          required String last_name,}):super( id: id,
              first_name: first_name,
              last_name: last_name,);
              
       Map&lt;String, dynamic&gt; toJson() {
      return {
        &quot;first_name&quot;: first_name,
        &quot;last_name&quot;: last_name,
        &quot;id&quot;: id,
        };
     }
      @override
    Map&lt;String, dynamic&gt; toRequest() =&gt; toJson();
  
  
  }
  </code></pre>
  <p>Now, what I am expecting is whenever the user passes <code>UserProfileRequestData</code> as an entity from UI and in repository if I execture <code>request.toRequest()</code> then it should call <code>UserProfileRequestDataModel</code>'s  <code>toRequest()</code> function and not the parent class one.</p>
  <p>here is the sample code <a href="https://gist.github.com/ntimesc/9bb5ef756dba1f0613c122818b7a49e4" rel="nofollow noreferrer">for this problem statement</a></p>