Package 

Interface ConsumerScope

  • All Implemented Interfaces:
    pro.respawn.flowmvi.api.IntentReceiver

    @Stable()@Deprecated(message = This interface is no longer needed. Use the new subscribe extension instead) 
    public interface ConsumerScope<I extends MVIIntent, A extends MVIAction>
     implements IntentReceiver<I>
                        

    An interface for the scope that provides send and consume functions inside your composable

    • Method Summary

      Modifier and Type Method Description
      abstract Unit consume(SuspendFunction2<CoroutineScope, A, Unit> onAction) Collect MVIActions that come from the Store.
      Unit consume() Collect MVIStates emitted by the Store Does not subscribe to MVIActions, unlike the other overload
      • Methods inherited from class pro.respawn.flowmvi.android.compose.ConsumerScope

        emit, intent, send
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • consume

         abstract Unit consume(SuspendFunction2<CoroutineScope, A, Unit> onAction)

        Collect MVIActions that come from the Store. Should only be called once per screen. Even if you do not have any Actions in your store you still must call this function to subscribe to the store

      • consume

         Unit consume()

        Collect MVIStates emitted by the Store Does not subscribe to MVIActions, unlike the other overload