MutableStateFlow for methods (or how to make an observable function)?

When I tried it last time, it was quite inconvenient.