flowOf() creates a Flow that emits the objects that you pass into flowOf().

flowOf() is useful for tests, error conditions, or other cases where you need a Flow (because an API calls for it) but you already have the data to be provided to that Flow.

You can learn more about this in:
Run Edit