title: Can a function in flutter(Dart) return different data types based on some conditions
body: <p>For example considering the pseudocode</p>
  <pre><code>getResult(){
      List lst=[1,&quot;5&quot;,4];
      String str=&quot;five&quot;;
      if(condition){
          return lst;
      }
      else{
          return str;
      }
  }
  </code></pre>
  <p>can something like this be achieved in flutter.</p>