Advertisement
Guest User

Untitled

a guest
Aug 24th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. void main() async {
  2.  
  3. final behavior = new BehaviorSubject<String>();
  4.  
  5. // transformando cada letra que o Observable emitir em sua versão maiúscula, usando a função toUpperCase(), transformamos
  6. // uma String, em sua representação em letra maíscula
  7.  
  8.  
  9. Observable newStream = behavior
  10. .map((c) => c.toUpperCase());
  11.  
  12. // ouvindo o Observable
  13.  
  14. newStream.listen(print);
  15.  
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement