Skip to content

Instantly share code, notes, and snippets.

@rullyalves
Last active August 20, 2019 09:38
Show Gist options
  • Select an option

  • Save rullyalves/d58d48915ba66af30061796e8ba38493 to your computer and use it in GitHub Desktop.

Select an option

Save rullyalves/d58d48915ba66af30061796e8ba38493 to your computer and use it in GitHub Desktop.
void main() async {
final behavior = new BehaviorSubject<String>();
// transformando cada letra que o Observable emitir em sua versão maiúscula, usando a função toUpperCase(), transformamos
// uma String, em sua representação em letra maíscula
Observable newStream = behavior
.map((c) => c.toUpperCase());
// ouvindo o Observable
newStream.listen(print);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment