Stream.periodic
source: https://api.flutter.dev/flutter/dart-async/Stream/Stream.periodic.html
Let's look at this:
This is how you define a stream that emits values of type T (StreamStream.periodic
. It takes the positional argument of type Duration and an optional argument, which is the function that returns a type computationCount
as an argument.