Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Your `getCardAdapterItem()` function seems to be returning a list of items but is declared as a

function with a return type of `Unit`. To fix this, you need to change the return type to `List<Any>`
and return the `items` list. Here's the corrected version:

```kotlin

fun getCardAdapterItem(): List<Any> {

val items = mutableListOf<Any>()

val selectorDataValue = selectorData.value // Accessing the value of MutableLiveData

selectorDataValue?.apply {

add(GREETINGS)

accountDetails?.accountList?.let {

items.addAll(it)

val loadMore = LoadMore(isMultiCardAccount(), isVisible =


(accountDetails?.accountList?.take(intialaccountcount)?.size ?: 0) > intialaccountcount)

items.add(loadMore)

return items

```

Now, this function returns a list of items of type `Any` as intended. Adjust the code as needed based
on your requirements.

You might also like