Stefan Oltmann
07/02/2021, 2:03 PMexpect interface Image
expect interface ImageLoader {
fun loadFullImage(photo: Photo): Image
fun loadThumbnailImage(photo: Photo): Image
}
And for Android it should load a "ImageBitmap"
actual interface Image // ???
actual interface ImageLoader {
actual fun loadFullImage(photo: Photo): ImageBitmap
actual fun loadThumbnailImage(photo: Photo): ImageBitmap
}
And for iOS "Image" should be "UIImage" of course.
Is that possible?Osman Saral
07/02/2021, 2:14 PMexpect class Image
//for Android
actual typealias Image = Bitmap
//for iOS
actual typealias Image = UIImage
after that, you can use common Interface functions to return that typealiasStefan Oltmann
07/02/2021, 2:15 PM