Skip to content

Instantly share code, notes, and snippets.

@devjaime
Created March 21, 2021 06:17
Show Gist options
  • Select an option

  • Save devjaime/850ff1e403239990da0cc81b501b71a1 to your computer and use it in GitHub Desktop.

Select an option

Save devjaime/850ff1e403239990da0cc81b501b71a1 to your computer and use it in GitHub Desktop.
La clase Stream también viene con algunos constructores útiles. Éstos son los más comunes
Stream.fromIterable([1, 2, 3]);
Stream.value(10);
Stream.empty();
Stream.error(Exception('ups! algo salio mal'));
Stream.fromFuture(Future.delayed(Duration(seconds: 1), () => 42));
Stream.periodic(Duration(seconds: 1), (index) => index);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment