Skip to content

Compose Extensions bring some useful extensions to Compose Multiplatform, making it easier to provide certain functionalities

License

Notifications You must be signed in to change notification settings

avan1235/compose-extensions

Repository files navigation

Platforms Platforms

Kotlin Compose Maven Central Latest Release Build

License: MIT GitHub Repo stars Fork OpenOTP

Compose Multiplatform Extensions

This repository aims to bring some useful extensions for compose-multiplatform projects, which are self-contained and allow to deploy compose applications to Android, iOS and Desktop platforms.

How to use?

Select the extension that you find useful in your project and put

implementation("in.procyk.compose:extension-name:1.6.10.1")

into your commonMain source set's dependencies block, where extension-name should be replaced with the proper name from the list of available extensions.

See some example in examples project, where every extension is added in build.gradle.kts.

Extensions

  • calendar - calendar compose implementation migrated to Kotlin Multiplatform from ComposeCalendar. See sample usage here.

    implementation("in.procyk.compose:calendar:1.6.10.1")
  • camera-qr - detecting QR codes camera view. See sample usage here.

    implementation("in.procyk.compose:camera-qr:1.6.10.1")
    • for Android Application add to AndroidManifest.xml

      <uses-permission android:name="android.permission.CAMERA"/>
      <uses-feature
          android:name="android.hardware.camera"
          android:required="false"/>
    • for iOS Application add Privacy - Camera Usage Description entry to Info.plist

      <key>NSCameraUsageDescription</key>
      <string></string>
    • for Desktop Application add to build.gradle.kts

      runtimeEntitlementsFile.set(project.file("runtime-entitlements.plist"))
      infoPlist {
          extraKeysRawXml = """
              <key>NSCameraUsageDescription</key>
              <string></string>
          """.trimIndent()
      }

      to your macOS { ... } block and include runtime-entitlements.plist in your project source files

  • camera-permission - ask for camera permission. See sample usage here.

    implementation("in.procyk.compose:camera-permission:1.6.10.1")
  • util - handy functions to work with compose. Explore the directory to see what cool features are available.

    implementation("in.procyk.compose:util:1.6.10.1")