title: How can I tell the dartanalyzer what kind of Element the selected object is?
body: <p>I have the code</p>
  
  <pre><code>if(querySelector('#username').value!="")
  </code></pre>
  
  <p>and it is working. But Darteditor warns me, that the getter 'value' is not defined for the class 'Element'. I know, that what the querySelector returns is an InputElement and therefore, my question is only for reasons of beauty and to remove the warnings. How do I tell the analyzer that it can expect an InputElement?</p>
  
  <p>It is over 2 years since I last used C# but I believe there was a syntax similar to <code>((InputElement) (myvariable).value</code> (I am not at all sure how it looked like.) to tell the Debugger that myvariable is to be treated as an InputElement even when it was defined as an Element. Is there something similar in Dart for my case, so that I could do something like this?</p>
  
  <pre><code>if(((InputElement) querySelector('#username')).value!="")
  </code></pre>
  
  <p>I am sorry, but I did not find anything in google - maybe the wrong search term.
  Thank you in advance :)</p>