I am trying to add two shops to a mutable list like so:
private var _shopList = MutableLiveData<List<Shop>>()
var shopList: LiveData<List<Shop>> = ()
get() = _shopList
// This function will get the arrayList items
fun getArrayList(): MutableLiveData<List<Shop>>
{
// Here we need to get the data
val shop1 = Shop("AOB", "Lat and Long","LA")
val shop2 = Shop("Peach", "Lat and Long","Vegas")
_shopList.add(shop1)
_shopList.add(shop2)
return _shopList
}
However it says the add function is not referenced?