Skip to content

v0.4.0

Compare
Choose a tag to compare
@MohamedRejeb MohamedRejeb released this 04 Mar 06:26
· 215 commits to main since this release
225d63f

🚀 Features

All

calf-file-picker

calf-permissions

🐛 Fixes

calf-file-picker

  • Trigger onResult when nothing is selected on Android by @bmc08gt in #58
  • iOS Image picker callbacks on the main thread by @iruizmar in #55

📦 Dependencies

❌ Breaking changes

calf-file-picker

  • In Android KmpFile is wrapper around Uri instead of File.
  • KmpFile extension functions now require a PlatformContext that you can get from LocalPlatformContext.current
  • KmpFile.readByteArray is changed to a suspend function.
val context = LocalPlatformContext.current

val singlePickerLauncher =
    rememberFilePickerLauncher(
        onResult = { files ->
            scope.launch {
                files.forEach {
                    try {
                        it.readByteArray(context).toImageBitmap()
                    } catch (e: Exception) {
                        e.printStackTrace()
                    }
                }
            }
        },
    )

New Contributors

Full Changelog: v0.3.1...v0.4.0