🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

consume

Helper function to consume parts of TransferableContent in Android by splitting it to ClipData.Item parts.

consume

Source set: Android
public fun TransferableContent.consume(
    predicate: (ClipData.Item) -> Boolean
): TransferableContent?

Helper function to consume parts of TransferableContent in Android by splitting it to ClipData.Item parts. Use this function in contentReceiver modifier's onReceive callback to easily separate remaining parts from incoming TransferableContent.

Parameters

predicate Decides whether to consume or leave the given item out. Return true to indicate that this particular item was processed here, it shouldn't be passed further down the content receiver chain. Return false to keep it in the returned TransferableContent.

Return

Remaining parts of this TransferableContent.