title: Include "space" check in email adress flutter
body: <p>Can someone please tell me how to
  add "space" check in email address? I
  have tried email.contains("") bt it didnt
  worked.</p>
  
  <p><a href="https://i.stack.imgur.com/nOhOz.png" rel="nofollow noreferrer">I don't get a error when i type invalid email</a></p>
  
  <pre><code> import 'dart:async';
  
  
  class Validators{
    final validEmail = StreamTransformer&lt;String, String&gt;.fromHandlers(
      handleData: (email, sink){
        if(email.contains('@')){
          sink.add(email);
        }else if(email.contains(" ")){
            sink.addError('Enter a valid email');
        }else{
            sink.addError('Enter a valid email');
  
        }
      }
    );
  
    final validPassword  = StreamTransformer&lt;String, String&gt;.fromHandlers(
      handleData: (password, sink){
        if(password.length &gt; 4){
          sink.add(password);
        }else{
          sink.addError('Enter a valid password');
        }
      }
    );
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/YOrro.png" rel="nofollow noreferrer">I want "invalid email" error to be displayed as this</a></p>