Did anyone ever do a kmm image picker? For my use case its enough if it works for iOS and Android (KMM Project with Compose Multiplatform). I guess I can easily enough implement an image picker via expect/actual that triggers the platform image picker.. consuming the result (showing the picked images in a list for example, storing a reference to the images that have been picked etc) could be kind of a little more tricky I guess.
Is there maybe a sample or library I could use as a guide?
@AlexFileKit could be an option to easily pick images.
Like Peekaboo, it leverage native UI on Android and iOS for image and video selection. It targets Android & iOS (and more) and we can access returned file information from the common code like bytes, path, file name, extension, size through an utility object called PlatformFile. From PlatformFile, we have still access to the underling file (Uri on Android and NSURL on iOS). If you want to extends the capacities of PlatformFile, it's easy as creating an extension function on it.
And here are some examples: a filekit sample, GeminiKMP from joreilly, an extension of PlatformFile in supabase sample
👍 2
❤️ 1
a
Alex
08/19/2024, 8:19 AM
Looks very cool @Vincent! I will check it out, thank you!