Coder Social home page Coder Social logo

alexzhirkevich / compose-cupertino Goto Github PK

View Code? Open in Web Editor NEW
936.0 18.0 33.0 3.48 MB

Compose Multiplatform UI components for iOS (Cupertino Widgets)

License: Apache License 2.0

Kotlin 99.86% Shell 0.02% Ruby 0.04% Swift 0.04% HTML 0.04%
compose compose-ios compose-multiplatform cupertino-widgets ios sf-symbols

compose-cupertino's Introduction

Compose Cupertino

compose-mp-version kotlin-version

badge-iOS badge-Android badge-JVM badge-macOS badge-web

Compose.Cuepertino.mp4

Compose Cupertino is a Kotlin Multiplatform library for the Compose Multiplatform UI framework. It provides various UI components for making native-looking iOS applications, including

  • cupertino - Compose Multiplatform implementation of iOS-like Cupertino theme and widgets, based on compose.foundation. Inspired by compose.material3 and SwiftUI APIs;
  • cupertino-native - UIKit native wrappers for Cupertino Widgets. Allows to seamlessly use some UIKit widgets for iOS and their equivalents from cupertino for other platforms;
  • cupertino-adaptive - adaptive theme and wrappers for Cupertino and Material3 widgets. Allows to seamlessly use both widgets from shared code with correct content color and font style;
  • cupertino-icons-extended - more than 800 most used monochrome Apple SF Symbols as Compose ImageVectors. These symbols are copyrighted. Please read licence agreement first. If you don't need these icons for platform other than iOS, you can use ios bundled icons using converters from cupertino-native.
  • cupertino-decompose - iOS-like swipe-back animation for the 'predictive back' navigation feature of the Decompose library + NativeChildren wrapper over UINavigationController. Provides native-feeling or truly native page transitions and swipe gestures.

Installation

Maven Central

Important

The project is in the experimental phase. All APIs can change incompatibly or be dropped without the deprecation cycle!

Add the dependency to your build.gradle.kts file.

Module Dependency
cupertino io.github.alexzhirkevich:cupertino:<version>
cupertino-native io.github.alexzhirkevich:cupertino-native:<version>
cupertino-adaptive io.github.alexzhirkevich:cupertino-adaptive:<version>
cupertino-decompose io.github.alexzhirkevich:cupertino-decompose:<version>
cupertino-icons-extended io.github.alexzhirkevich:cupertino-icons-extended:<version>

Usage

To use iOS-like widgets with Compose Cupertino and view available components, see Cupertino.

To use widgets that change based on the platform (looking like either Material You or iOS) and view available components, see Adaptive.

License

Copyright (c) 2023 Compose Cupertino project and open source contributors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0
    
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

compose-cupertino's People

Contributors

alexzhirkevich avatar brucemcrooster avatar jacobras avatar lavmee avatar mohamedrejeb avatar overpas avatar sebastianaigner avatar teewhydope avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compose-cupertino's Issues

Bug in CupertinoTimePickerState on Android Emulator

I have to report a minor glitch:

For some reason the CupertinoTimePickerState changes it values on the first time the CupertinoTimePicker is shown. It decreases hours and minutes down by one.

Interestingly this does not happen on JVM Desktop and it couldn't reproduce it on a real device. As far as I can see this happens only on Android Emulator (running Android 14).

I tried changing locale and timezone, but that did not help.

Maybe you want to see if it could happen on a real device, too.

android_emulator.mov
jvm_desktop.mov

No indication effect

Is it possible to not provide any Indication effect to components selectively? With material's ripple effect I'm able to do so through the use of a custom NoRippleEffect like this

private object NoRippleTheme : RippleTheme {
    @Composable
    override fun defaultColor() = Color.Unspecified

    @Composable
    override fun rippleAlpha(): RippleAlpha = RippleAlpha(0.0f,0.0f,0.0f,0.0f)
}

And then

CompositionLocalProvider(LocalRippleTheme provides NoRippleTheme) {
    content()
}

Is it possible to achieve something similar with the Cupertino Indication?
I tried doing it this way

internal class NoIndication: Indication {
    @Composable
    override fun rememberUpdatedInstance(interactionSource: InteractionSource): IndicationInstance {
        return remember {
            object : IndicationInstance {
                override fun ContentDrawScope.drawIndication() {
                    drawRect(
                        color = Color.Unspecified
                    )

                    drawContent()
                }
            }
        }
    }
}

But it didn't work for me unfortunately

Navigation title animation problems

Since version 0.1.0-alpha04 it seems that the animations of CupertinoNavigationTitle and CupertinoTopAppBar.title are deferred/flickering. I've adapted SectionsScreen.kt for providing a simple example. The corresponding changes can be found in this patch file: Demonstrate_navigation_title_animation.patch

The following animation problems can be seen in the attached video:

  • During the page change animation the CupertinoTopAppBar.title is displayed and CupertinoNavigationTitle is hidden.
  • When the animation ends CupertinoTopAppBar.title gets hidden and CupertinoNavigationTitle gets visible.
  • When scrolling behind the transluent CupertinoTopAppBar, then the divider seems to be nervous. On fast scrolling, the page titles get visible above the TopAppBar.
Bildschirmaufnahme.2024-04-08.um.17.23.36.mov

Crash at start on Android

Hello,

First of all thank you for this repository which is excellent.

I can't make it running on all my Android, either physical or simulators. It crashes at start. It works fine on iOS.

Here is the problem :

Process: com.myapplication.MyApplication, PID: 31222 java.lang.NoSuchMethodError: No virtual method textFieldColors-l59Burw(JJJJJLandroidx/compose/foundation/text/selection/TextSelectionColors;JJJJJJJJJJJJJJJJJJJJJJLandroidx/compose/runtime/Composer;IIII)Landroidx/compose/material3/TextFieldColors; in class Landroidx/compose/material3/TextFieldDefaults; or its super classes (declaration of 'androidx.compose.material3.TextFieldDefaults' appears in /data/app/~~qzAoIGcV9sAe6nS6CQvbog==/com.myapplication.MyApplication-IZWLvGUDL8YXauFwf7GS_w==/base.apk) at com.github.alexzhirkevich.lookandfeel.components.cupertino.CupertinoSearchTextFieldKt.cupertinoTextFieldColors-GyCwops(CupertinoSearchTextField.kt:91) at com.github.alexzhirkevich.lookandfeel.components.cupertino.CupertinoSearchTextFieldKt.CupertinoSearchTextField(CupertinoSearchTextField.kt:167) at AppKt$ScaffoldSample$2.invoke(App.kt:233) at AppKt$ScaffoldSample$2.invoke(App.kt:208)

Bottom sheet WindowInsets

I've been experimenting with CupertinoBottomSheet for my app, but got stuck over an issue I couldn't solve.
What I'm trying to do is to create a sheet that would have several different detents, the last of which is almost at 85% of the screen.

I'm using PresentationStyle.Modal, since it allows using detents, but there is a combination of things in the source code that prevent me from achieving the desired behavior:

  1. Last detent is always removed and substituted with the Expanded value
  2. If I provide 0 values as insets, the used insets automatically default to 10.dp
  3. There is no way, that I'm aware of, that allows to redirect to a different target value in the confirmValueChange callback

If there was a way to bypass either, I would be immensely happy, because right now the way it works is that I'm dragging the sheet towards it's last detent of Fraction(0.85f) and it works fine (I provide an extra detent of 1f without which even this wouldn't work, but I'm totally fine with this part). However, if I drag it past the 85%, it reaches some troubles, depending on the approach I'm choosing:

  • If I try to provide an additional detent, let's say 0.99f, the sheet just expands to this target, unless I return false, which still returns the sheet to its previous detent (0.6 in my case)
  • If I try to mitigate that by doing something like state.partiallyExpand(detent85%) this simply doesn't work (maybe there's a way to make it though)
  • If I were to provide the insets of 0, as I already mentioned, it just defaults to 10.dp

Right now, I thinking of making the sheet background transparent and providing it a padding of 15% to partially solve my issue, but still it doesn't account for the WindowInsets problem

If there is already an approach to solve this, any help would be much appreciated, if not, I would be glad to see something like this make it in the next update

Roll out release for Kotlin 2.0.0

Hey, I just discovered this project and saw that there were a few commits to support Kotlin 2.0.0. I was wondering if there are other bugs fixes that need to be done before a release or if we should be expecting a release pretty soon? I just saw this library but I'm on Kotlin 2.0.0 for my project and can't use it yet. Great job with the work you've done!

AppCrash when using NativeChildren for navigation via decompose

When using NativeChildren (part of cupertino-decompose module) for using UIKit based Navigation approach, an AppCrash can be observed in for several consecutive navigation events (iOS only). The AppCrash does not always occur at the same time. Sometimes a problem already occurs with the second navigation action, but it can also happen that you have to navigate much longer.

This behavior can also be reproduced with the sample app provided in the shared module. Decompose throws an error, because a navigation key is pushed several times in the same navigation stack. In the main navigation stack, which is initialized in the sample app, no multiple occurrences of a navigation key are recognizable. Is it possible that this is a state/concurrency problem that happens during recomposition?

The following stack grace is logged in the case of an AppCrash:

Uncaught Kotlin exception: kotlin.IllegalArgumentException: Key DefaultRootComponent.Config.Icons_-f2e08u was used multiple times 
    at 0   shared                              0x109d98a77        kfun:kotlin.Throwable#<init>(kotlin.String?){} + 119 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Throwable.kt:28:37)
    at 1   shared                              0x109d91fe3        kfun:kotlin.Exception#<init>(kotlin.String?){} + 115 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:23:44)
    at 2   shared                              0x109d92203        kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 115 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:34:44)
    at 3   shared                              0x109d92583        kfun:kotlin.IllegalArgumentException#<init>(kotlin.String?){} + 115 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:59:44)
    at 4   shared                              0x10a84f4bf        kfun:androidx.compose.runtime.saveable.SaveableStateHolderImpl.SaveableStateProvider$lambda$0#internal + 911 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime-saveable/src/commonMain/kotlin/androidx/compose/runtime/saveable/SaveableStateHolder.kt:89:89)
    at 5   shared                              0x10a84fa27        kfun:androidx.compose.runtime.saveable.SaveableStateHolderImpl.$SaveableStateProvider$lambda$0$FUNCTION_REFERENCE$1.invoke#internal + 115 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime-saveable/src/commonMain/kotlin/androidx/compose/runtime/saveable/SaveableStateHolder.kt:88:13)
    at 6   shared                              0x109eb8047        kfun:kotlin.Function1#invoke(1:0){}1:1-trampoline + 107 (/Users/teamcity/.gradle/daemon/8.2.1/[K][Suspend]Functions:1:1)
    at 7   shared                              0x10a0201c7        kfun:androidx.compose.runtime.DisposableEffectImpl.onRemembered#internal + 183 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Effects.kt:82:51)
    at 8   shared                              0x10a125dd3        kfun:androidx.compose.runtime.RememberObserver#onRemembered(){}-trampoline + 91 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/RememberObserver.kt:55:5)
    at 9   shared                              0x10a015bcb        kfun:androidx.compose.runtime.CompositionImpl.RememberEventDispatcher.dispatchRememberObservers#internal + 1819 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composition.kt:1295:34)
    at 10  shared                              0x10a010b2f        kfun:androidx.compose.runtime.CompositionImpl.applyChangesInLocked#internal + 1371 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composition.kt:984:21)
    at 11  shared                              0x10a01165b        kfun:androidx.compose.runtime.CompositionImpl#applyChanges(){} + 479 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composition.kt:1005:17)
    at 12  shared                              0x10a12551f        kfun:androidx.compose.runtime.ControlledComposition#applyChanges(){}-trampoline + 91 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composition.kt:254:5)
    at 13  shared                              0x10a036b8f        kfun:androidx.compose.runtime.Recomposer.runRecomposeAndApplyChanges$lambda$4$lambda$3#internal + 4751 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Recomposer.kt:639:45)
    at 14  shared                              0x10a03b0e3        kfun:androidx.compose.runtime.Recomposer.$runRecomposeAndApplyChanges$lambda$4$lambda$3$FUNCTION_REFERENCE$13.invoke#internal + 127 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Recomposer.kt:551:30)
    at 15  shared                              0x10a03b32b        kfun:androidx.compose.runtime.Recomposer.$runRecomposeAndApplyChanges$lambda$4$lambda$3$FUNCTION_REFERENCE$13.$<bridge-UNNB>invoke(kotlin.Long){}#internal + 123 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Recomposer.kt:551:30)
    at 16  shared                              0x109eb8047        kfun:kotlin.Function1#invoke(1:0){}1:1-trampoline + 107 (/Users/teamcity/.gradle/daemon/8.2.1/[K][Suspend]Functions:1:1)
    at 17  shared                              0x109fe205f        kfun:androidx.compose.runtime.BroadcastFrameClock.FrameAwaiter.resume#internal + 439 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/BroadcastFrameClock.kt:42:51)
    at 18  shared                              0x109fe2933        kfun:androidx.compose.runtime.BroadcastFrameClock#sendFrame(kotlin.Long){} + 499 (/opt/buildAgent/work/839471fc329135c7/compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/BroadcastFrameClock.kt:71:29)
    at 19  shared                              0x10aa9020f        kfun:androidx.compose.ui.scene.BaseComposeScene#render(androidx.compose.ui.graphics.Canvas;kotlin.Long){} + 731 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/scene/BaseComposeScene.skiko.kt:163:20)
    at 20  shared                              0x10ab5f523        kfun:androidx.compose.ui.scene.ComposeScene#render(androidx.compose.ui.graphics.Canvas;kotlin.Long){}-trampoline + 107 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/scene/ComposeScene.skiko.kt:161:5)
    at 21  shared                              0x10aaf051b        kfun:androidx.compose.ui.scene.RenderingUIViewDelegateImpl.render#internal + 523 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/scene/ComposeSceneMediator.uikit.kt:155:15)
    at 22  shared                              0x10ab69db3        kfun:androidx.compose.ui.window.RenderingUIView.Delegate#render(org.jetbrains.skia.Canvas;kotlin.Double){}-trampoline + 107 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/RenderingUIView.uikit.kt:46:9)
    at 23  shared                              0x10ab409b3        kfun:androidx.compose.ui.window.RenderingUIView.object-1.render#internal + 187 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/RenderingUIView.uikit.kt:65:32)
    at 24  shared                              0x10ab69993        kfun:androidx.compose.ui.window.MetalRedrawerCallbacks#render(org.jetbrains.skia.Canvas;kotlin.Double){}-trampoline + 107 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/MetalRedrawer.uikit.kt:163:5)
    at 25  shared                              0x10ab3942f        kfun:androidx.compose.ui.window.MetalRedrawer.draw#internal + 2759 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/MetalRedrawer.uikit.kt:356:27)
    at 26  shared                              0x10ab388df        kfun:androidx.compose.ui.window.MetalRedrawer#drawSynchronously(){} + 203 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/MetalRedrawer.uikit.kt:329:9)
    at 27  shared                              0x10ab403c7        kfun:androidx.compose.ui.window.RenderingUIView.updateMetalLayerSize#internal + 4183 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/RenderingUIView.uikit.kt:137:9)
    at 28  shared                              0x10ab3f2e7        kfun:androidx.compose.ui.window.RenderingUIView#objc:layoutSubviews + 215 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/RenderingUIView.uikit.kt:118:31)
    at 29  shared                              0x10ab414d7        _6f72672e6a6574627261696e732e636f6d706f73652e75693a75692f6f70742f6275696c644167656e742f776f726b2f383339343731666333323931333563372f636f6d706f73652f75692f75692f7372632f75696b69744d61696e2f6b6f746c696e2f616e64726f6964782f636f6d706f73652f75692f77696e646f772f52656e646572696e675549566965772e75696b69742e6b74_knbridge70 + 143 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/RenderingUIView.uikit.kt:117:14)
    at 30  UIKitCore                           0x185806d77        -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1491 
    at 31  QuartzCore                          0x189ffa5af        _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 439 
    at 32  QuartzCore                          0x18a005367        _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 123 
    at 33  QuartzCore                          0x189f2051f        _ZN2CA7Context18commit_transactionEPNS_11TransactionEdPd + 459 
    at 34  QuartzCore                          0x189f4fcbf        _ZN2CA11Transaction6commitEv + 651 
    at 35  QuartzCore                          0x189f51193        _ZN2CA11Transaction25flush_as_runloop_observerEb + 67 
    at 36  CoreFoundation                      0x1803f0ec3        __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 31 
    at 37  CoreFoundation                      0x1803eb8c7        __CFRunLoopDoObservers + 527 
    at 38  CoreFoundation                      0x1803ebd7f        __CFRunLoopRun + 967 
    at 39  CoreFoundation                      0x1803eb5a3        CFRunLoopRunSpecific + 571 
    at 40  GraphicsServices                    0x18e9fbae3        GSEventRunModal + 159 
    at 41  UIKitCore                           0x1852f02e3        -[UIApplication _run] + 867 
    at 42  UIKitCore                           0x1852f3f5b        UIApplicationMain + 123 
    at 43  SwiftUI                             0x1c51fc1af        OUTLINED_FUNCTION_70 + 499 
    at 44  SwiftUI                             0x1c51fc04f        OUTLINED_FUNCTION_70 + 147 
    at 45  SwiftUI                             0x1c4f02fa3        OUTLINED_FUNCTION_2 + 91 
    at 46  My application                      0x10451c7f7        $s14My_application6iOSAppV5$mainyyFZ + 39 
    at 47  My application                      0x10451cff3        main + 11 (<userhome>/compose-cupertino/iosApp/iosApp/iOSApp.swift:<unknown>)
    at 48  dyld                                0x104ba1543        0x0 + 4374271299 
    at 49  ???                                 0x1045a20df        0x0 + 4367982815 
    at 50  ???                                 0xff57ffffffffffff 0x0 + -47287796087390209 
    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.runtime.BroadcastFrameClock@61113ff0, StandaloneCoroutine{Cancelling}@642549a0, FlushCoroutineDispatcher@52be550]
        at 0   shared                              0x109d98a77        kfun:kotlin.Throwable#<init>(kotlin.String?){} + 119 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Throwable.kt:28:37)
        at 1   shared                              0x109d91fe3        kfun:kotlin.Exception#<init>(kotlin.String?){} + 115 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:23:44)
        at 2   shared                              0x109d92203        kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 115 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:34:44)
        at 3   shared                              0x109fd1b37        kfun:kotlinx.coroutines.internal.DiagnosticCoroutineContextException#<init>(kotlin.coroutines.CoroutineContext){} + 167 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/native/src/internal/CoroutineExceptionHandlerImpl.kt:27:5)
        at 4   shared                              0x109fa6903        kfun:kotlinx.coroutines.internal#handleUncaughtCoroutineException(kotlin.coroutines.CoroutineContext;kotlin.Throwable){} + 647 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/CoroutineExceptionHandlerImpl.common.kt:43:33)
        at 5   shared                              0x109f49c73        kfun:kotlinx.coroutines#handleCoroutineException(kotlin.coroutines.CoroutineContext;kotlin.Throwable){} + 515 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/CoroutineExceptionHandler.kt:28:5)
        at 6   shared                              0x109f3df47        kfun:kotlinx.coroutines.StandaloneCoroutine.handleJobException#internal + 167 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/Builders.common.kt:190:9)
        at 7   shared                              0x109fd8b07        kfun:kotlinx.coroutines.JobSupport#handleJobException(kotlin.Throwable){}kotlin.Boolean-trampoline + 59 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/JobSupport.kt:1028:20)
        at 8   shared                              0x109f53617        kfun:kotlinx.coroutines.JobSupport.finalizeFinishingState#internal + 1135 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/JobSupport.kt:228:59)
        at 9   shared                              0x109f5b9b3        kfun:kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath#internal + 1983 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/JobSupport.kt:907:16)
        at 10  shared                              0x109f5b1bb        kfun:kotlinx.coroutines.JobSupport.tryMakeCompleting#internal + 755 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/JobSupport.kt:864:16)
        at 11  shared                              0x109f5aceb        kfun:kotlinx.coroutines.JobSupport#makeCompletingOnce(kotlin.Any?){}kotlin.Any? + 379 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/JobSupport.kt:829:30)
        at 12  shared                              0x109f3bed7        kfun:kotlinx.coroutines.AbstractCoroutine#resumeWith(kotlin.Result<1:0>){} + 211 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/AbstractCoroutine.kt:97:21)
        at 13  shared                              0x109ebcc6b        kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/libraries/stdlib/src/kotlin/coroutines/Continuation.kt:26:12)
        at 14  shared                              0x109d9d523        kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 1163 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:43:32)
        at 15  shared                              0x109ebcc6b        kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/libraries/stdlib/src/kotlin/coroutines/Continuation.kt:26:12)
        at 16  shared                              0x109fcae2b        kfun:kotlinx.coroutines.UndispatchedCoroutine#afterResume(kotlin.Any?){} + 243 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/native/src/CoroutineContext.kt:52:51)
        at 17  shared                              0x109fd553b        kfun:kotlinx.coroutines.AbstractCoroutine#afterResume(kotlin.Any?){}-trampoline + 59 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/AbstractCoroutine.kt:<unknown>)
        at 18  shared                              0x109f3bf33        kfun:kotlinx.coroutines.AbstractCoroutine#resumeWith(kotlin.Result<1:0>){} + 303 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/AbstractCoroutine.kt:99:9)
        at 19  shared                              0x109ebcc6b        kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/libraries/stdlib/src/kotlin/coroutines/Continuation.kt:26:12)
        at 20  shared                              0x109d9d523        kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 1163 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:43:32)
        at 21  shared                              0x109ebcc6b        kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/libraries/stdlib/src/kotlin/coroutines/Continuation.kt:26:12)
        at 22  shared                              0x109fb1443        kfun:kotlinx.coroutines.internal.ScopeCoroutine#afterResume(kotlin.Any?){} + 243 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/Scopes.kt:28:15)
        at 23  shared                              0x109fd553b        kfun:kotlinx.coroutines.AbstractCoroutine#afterResume(kotlin.Any?){}-trampoline + 59 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/AbstractCoroutine.kt:<unknown>)
        at 24  shared                              0x109f3bf33        kfun:kotlinx.coroutines.AbstractCoroutine#resumeWith(kotlin.Result<1:0>){} + 303 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/AbstractCoroutine.kt:99:9)
        at 25  shared                              0x109ebcc6b        kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/libraries/stdlib/src/kotlin/coroutines/Continuation.kt:26:12)
        at 26  shared                              0x109d9d523        kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 1163 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:43:32)
        at 27  shared                              0x109ebcc6b        kfun:kotlin.coroutines.Continuation#resumeWith(kotlin.Result<1:0>){}-trampoline + 99 (/opt/buildAgent/work/2fed3917837e7e79/kotlin/libraries/stdlib/src/kotlin/coroutines/Continuation.kt:26:12)
        at 28  shared                              0x109faa59b        kfun:kotlinx.coroutines.DispatchedTask#run(){} + 1691 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:102:58)
        at 29  shared                              0x109fd7d97        kfun:kotlinx.coroutines.Runnable#run(){}-trampoline + 91 (/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/native/src/Runnable.kt:10:19)
        at 30  shared                              0x10aa8013b        kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.flush$lambda$2#internal + 787 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/FlushCoroutineDispatcher.skiko.kt:88:14)
        at 31  shared                              0x10aa80d13        kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.$flush$lambda$2$FUNCTION_REFERENCE$1.invoke#internal + 71 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/FlushCoroutineDispatcher.skiko.kt:78:19)
        at 32  shared                              0x10aa80de3        kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.$flush$lambda$2$FUNCTION_REFERENCE$1.$<bridge-UNN>invoke(){}#internal + 71 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/FlushCoroutineDispatcher.skiko.kt:78:19)
        at 33  shared                              0x109eb95af        kfun:kotlin.Function0#invoke(){}1:0-trampoline + 99 (/Users/teamcity/.gradle/daemon/8.2.1/[K][Suspend]Functions:1:1)
        at 34  shared                              0x10aa7f603        kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher.performRun#internal + 303 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/FlushCoroutineDispatcher.skiko.kt:99:13)
        at 35  shared                              0x10aa7f4af        kfun:androidx.compose.ui.platform.FlushCoroutineDispatcher#flush(){} + 163 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/platform/FlushCoroutineDispatcher.skiko.kt:78:19)
        at 36  shared                              0x10aa97de3        kfun:androidx.compose.ui.scene.ComposeSceneRecomposer#performScheduledTasks(){} + 131 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/scene/ComposeSceneRecomposer.skiko.kt:81:29)
        at 37  shared                              0x10aa901e7        kfun:androidx.compose.ui.scene.BaseComposeScene#render(androidx.compose.ui.graphics.Canvas;kotlin.Long){} + 691 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/scene/BaseComposeScene.skiko.kt:162:20)
        at 38  shared                              0x10ab5f523        kfun:androidx.compose.ui.scene.ComposeScene#render(androidx.compose.ui.graphics.Canvas;kotlin.Long){}-trampoline + 107 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/skikoMain/kotlin/androidx/compose/ui/scene/ComposeScene.skiko.kt:161:5)
        at 39  shared                              0x10aaf051b        kfun:androidx.compose.ui.scene.RenderingUIViewDelegateImpl.render#internal + 523 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/scene/ComposeSceneMediator.uikit.kt:155:15)
        at 40  shared                              0x10ab69db3        kfun:androidx.compose.ui.window.RenderingUIView.Delegate#render(org.jetbrains.skia.Canvas;kotlin.Double){}-trampoline + 107 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/RenderingUIView.uikit.kt:46:9)
        at 41  shared                              0x10ab409b3        kfun:androidx.compose.ui.window.RenderingUIView.object-1.render#internal + 187 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/RenderingUIView.uikit.kt:65:32)
        at 42  shared                              0x10ab69993        kfun:androidx.compose.ui.window.MetalRedrawerCallbacks#render(org.jetbrains.skia.Canvas;kotlin.Double){}-trampoline + 107 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/MetalRedrawer.uikit.kt:163:5)
        at 43  shared                              0x10ab3942f        kfun:androidx.compose.ui.window.MetalRedrawer.draw#internal + 2759 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/MetalRedrawer.uikit.kt:356:27)
        at 44  shared                              0x10ab3acfb        kfun:androidx.compose.ui.window.MetalRedrawer.<init>$lambda$0#internal + 435 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/MetalRedrawer.uikit.kt:263:17)
        at 45  shared                              0x10ab3be87        kfun:androidx.compose.ui.window.MetalRedrawer.$<init>$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 71 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/MetalRedrawer.uikit.kt:258:63)
        at 46  shared                              0x10ab3bf57        kfun:androidx.compose.ui.window.MetalRedrawer.$<init>$lambda$0$FUNCTION_REFERENCE$0.$<bridge-UNN>invoke(){}#internal + 71 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/MetalRedrawer.uikit.kt:258:63)
        at 47  shared                              0x109eb95af        kfun:kotlin.Function0#invoke(){}1:0-trampoline + 99 (/Users/teamcity/.gradle/daemon/8.2.1/[K][Suspend]Functions:1:1)
        at 48  shared                              0x10ab3cc9f        kfun:androidx.compose.ui.window.DisplayLinkProxy.handleDisplayLinkTick#internal + 151 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/MetalRedrawer.uikit.kt:515:9)
        at 49  shared                              0x10ab3cd53        kfun:androidx.compose.ui.window.DisplayLinkProxy.$imp:handleDisplayLinkTick#internal + 143 (/opt/buildAgent/work/839471fc329135c7/compose/ui/ui/src/uikitMain/kotlin/androidx/compose/ui/window/MetalRedrawer.uikit.kt:514:5)
        at 50  QuartzCore                          0x189e4cf6f        _ZN2CA7Display15DisplayLinkItem9dispatch_ERNS_8SignPost8IntervalILNS2_11CAEventCodeE835322056EEE + 43 
        at 51  QuartzCore                          0x189e4e1a7        _ZN2CA7Display11DisplayLink14dispatch_itemsEyyy + 803 
        at 52  QuartzCore                          0x189e4dd73        _ZN2CA7Display11DisplayLink8callbackEP15_CADisplayTimeryyybPv + 631 
        at 53  QuartzCore                          0x189f54c8b        _ZL22display_timer_callbackP12__CFMachPortPvlS1_ + 335 
        at 54  CoreFoundation                      0x1803bbd1f        __CFMachPortPerform + 171 
        at 55  CoreFoundation                      0x1803f2657        __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 55 
        at 56  CoreFoundation                      0x1803f1c27        __CFRunLoopDoSource1 + 495 
        at 57  CoreFoundation                      0x1803ec237        __CFRunLoopRun + 2175 
        at 58  CoreFoundation                      0x1803eb5a3        CFRunLoopRunSpecific + 571 
        ... and 11 more common stack frames skipped

Nested Scaffold Bottom Bar is always visible

I've been playing around with bottom sheet scaffold, and I came across the following case:
I have a Scaffold that wraps my entire app let's call it Scaffold A. inside this scaffold I have my CupertinoBottomSheetScaffold which we'll call Scaffold B. Scaffold A has a bottom app bar, and this bottom bar always appears on top of scaffold B. Does this have to do with the order of drawing? and can this be disabled?

Date Picker Pager: Option to stay compact

I think it's great that you made the picker filling the max width. This may be truly what in most of the cases is the expected behavior.

In my case I would like to have either an option to stay in the fixed size width to have it centered or to introduce a width constant I could use to constrain it's size with an outer box.

At this time I need to do the math myself to see what width it needs.
That's not too hard, but for convenience I think you should offer that option.

Currently the "natural" width is 7x42+8x2 dp.

grafik

Modal sheet always expands up to the large detent even if no such detent was set for the presentation style

Great job on the repo!
I was wondering if it would be possible to expose an option for the bottom sheet scaffold to appear with a fixed height detent, such that it opens with this height and is not allowed to expand beyond this height. I tried passing the following :
val scaffoldState = rememberCupertinoBottomSheetScaffoldState( rememberCupertinoSheetState( presentationStyle = PresentationStyle.Modal(detents = setOf(PresentationDetent.Fraction(0.3f))))
But it is being ignored and the sheet expands to the full height.
Thank you for your efforts !! :)

Add support for sticky section titles in LazyListSection

I'm experimenting with the section API at the moment, both the regular one and the lazy scope extension. Since sections typically have cleared defined "header" which in this instance is represented by the title composable, it would be nice to add a parameter stickyTitle: Boolean = false and then based on its value select between item and stickyHeader. Also it would be great to add some sort of a sticky state listener, so that code could be executed depending on whether the title is sticky at the moment or not (my use case for example, is to change the padding If the title becomes sticky)

This could be a nice addition to the seemingly upcoming section refactoring

BottomSheet stack

Is it possible to use several bottom sheets at the same time?

I tried nesting bottomsheetscaffold but there is an outline on a black background when the depth is greater than one.

NavigationBarItemColors values are unspecified.

NavigationBarItemColors values are unspecified when using compose-plugin version 1.6.0-rc03 or 1.6.0-rc02 on android. But when using compose-plugin version 1.5.12 working fine. Problem is occuring only on android. View hierarchy is as follow. AppTheme->Surface->AdaptiveScaffold->AdaptiveNavigationBar->AdaptiveNavigationBarItem. When inspecting via LayoutInspector.
Image 27-2-24 at 11 57

No static method rememberDatePickerState-

java.lang.NoSuchMethodError: No static method rememberDatePickerState-NVmSL94(Ljava/lang/Long;Ljava/lang/Long;Lkotlin/ranges/IntRange;ILandroidx/compose/runtime/Composer;II)Landroidx/compose/material3/DatePickerState; in class Landroidx/compose/material3/DatePickerKt; or its super classes (declaration of 'androidx.compose.material3.DatePickerKt' appears in /data/app/~~aSvqdTwzYEvy71dysuE_jg==/com.cherrywork.community-3ulckyuU4Blfg14qEKMVVw==/base.apk)
at io.github.alexzhirkevich.cupertino.adaptive.AdaptiveDatePickerKt.AdaptiveDatePicker(AdaptiveDatePicker.kt:56)

Add support of adaptive Navigation Drawer

Hi,
Your library is very awesome and I think it can change the future of multiplatform.
Do you think you can add support for the navigation drawer?
Thank you very much and good luck for the future

Setting CupertinoTheme with AdaptiveTheme breaks MaterialTheme

Hi,
I'm trying to use AdaptiveTheme to use my custom theme on both iOS (Cupertino) and Android (Material).

When I only set MaterialTheme, the theme is properly applied on Android (I can see my custom colors) but nothing is applied on iOS (default system colors):

expect fun determineTheme(): Theme // commonMain
actual fun determineTheme(): Theme = Theme.Cupertino // iosMain
actual fun determineTheme(): Theme = Theme.Material3 // androidMain

@OptIn(ExperimentalAdaptiveApi::class)
@Composable
fun MyTheme(
    darkTheme: Boolean = isSystemInDarkTheme(),
    theme: Theme = determineTheme(),
    lightColorScheme: ColorScheme = MaterialTheme.colorScheme,
    darkColorScheme: ColorScheme? = null,
    typography: Typography = MaterialTheme.typography,
    shapes: Shapes = MaterialTheme.shapes,
    content: @Composable () -> Unit
) {
    AdaptiveTheme(
        material = {
            MaterialTheme(
                colorScheme = if (darkTheme && darkColorScheme != null) darkColorScheme else lightColorScheme,
                typography = typography,
                shapes = shapes,
                content = content
            )
        },
        target = theme,
        content = content,
    )
}

With this code, if I set the primary color to red for instance, I'll see red buttons. Which is what I want. But on iOS, buttons are still blue (default system colors).
352shots_so


So I thought I just need to define the CupertinoTheme to use my custom colors:

@OptIn(ExperimentalAdaptiveApi::class)
@Composable
fun MyTheme(
    darkTheme: Boolean = isSystemInDarkTheme(),
    theme: Theme = determineTheme(),
    lightColorScheme: ColorScheme = MaterialTheme.colorScheme,
    darkColorScheme: ColorScheme? = null,
    typography: Typography = MaterialTheme.typography,
    shapes: Shapes = MaterialTheme.shapes,
    content: @Composable () -> Unit
) {
    AdaptiveTheme(
        material = {
            MaterialTheme(
                colorScheme = if (darkTheme && darkColorScheme != null) darkColorScheme else lightColorScheme,
                typography = typography,
                shapes = shapes,
                content = content
            )
        },
        cupertino = {
            CupertinoTheme(
                colorScheme = mapColorSchemeToCupertino(if (darkTheme && darkColorScheme != null) darkColorScheme else lightColorScheme),
                shapes = mapShapesToCupertino(shapes),
                content = content,
            )
        },
        target = theme,
        content = content,
    )
}

@Composable
private fun mapColorSchemeToCupertino(materialColorScheme: ColorScheme) = io.github.alexzhirkevich.cupertino.theme.lightColorScheme(
    accent = materialColorScheme.primary
    // Define the color mapping between Material and Cupertino for light colors
)

@Composable
private fun mapShapesToCupertino(materialShapes: Shapes) = io.github.alexzhirkevich.cupertino.theme.Shapes(
    extraSmall = materialShapes.extraSmall,
    small = materialShapes.small,
    medium = materialShapes.medium,
    large = materialShapes.large,
    extraLarge = materialShapes.extraLarge,
)

As you can see, on Android, my custom theme gets lost and the default one is used. And on iOS, it still does not work.
378shots_so


Am is missing something here? Or is it just not read yet? (and that's completely fine if that's the case πŸ™‚)

SystemBarStyle: Content color IOS 16.7 is always white

On my test device (IPhone 8+, IOS 16.7) in the sample the content color of the StatusBar is always white.
I think you should try using the following code:

UIApplication.sharedApplication.setStatusBarStyle(
        if (isDark) UIStatusBarStyleLightContent else UIStatusBarStyleDarkContent
    )
viewController.setNeedsStatusBarAppearanceUpdate()

Screenshot of the problem:
image

Unable to open CupertinoSwipeBox in LazyList

In a long list where all the elements are wrapped in CupertinoSwipeBox, flipping to the bottom when trying to open in any direction, the box closes automatically

Item code:

item(key = "key") {
    val boxState = rememberCupertinoSwipeBoxState()
    CupertinoSwipeBox(
            modifier = Modifier.fillMaxWidth(),
            state = boxState,
            items = {
                when {
                    boxState.dismissDirection.isTowardsStart -> { ... }
                    else -> Unit
                }
           }
    ) { ... }
}

If you remove the binding on dismissDirection in items, everything works fine

boxState.dismissDirection.isTowardsStart

Why is this happening yet I don't understand

Min API 24

Is there a reason the [cupertino] / [cupertino-adaptive] library is published with min API 24 instead of say.. 21?

Manifest merger failed : uses-sdk:minSdkVersion 21 cannot be smaller than version 24 declared in library [io.github.alexzhirkevich:cupertino-android:0.1.0-alpha03] C:\Users\Jacob.gradle\caches\transforms-3\9c3b934638cec0f83992d0e10deefac1\transformed\cupertino-release\AndroidManifest.xml as the library might be using APIs not available in 21
Suggestion: use a compatible library with a minSdk of at most 21,
or increase this project's minSdk version to at least 24,
or use tools:overrideLibrary="io.github.alexzhirkevich.cupertino" to force usage (may lead to runtime failures)

If I suppress this error by using then the app runs fine on API 21.

tools:overrideLibrary="io.github.alexzhirkevich.cupertinonative,io.github.alexzhirkevich.cupertinoadaptive,io.github.alexzhirkevich.cupertinocore"

If the API 24 things are used in just a small part it would be great if they'd be guarded behind Build.VERSION.SDK_INT checks instead of a min SDK setting 😬

Published?

Is this published or do you build it as an AAR?

AdaptiveDatePicker is returing wrong values

Iam using state.selectedDateMillis to get selected date millisecs about it always return current date

val state = rememberCupertinoDatePickerState() AdaptiveDatePicker( state = state, modifier = Modifier.fillMaxWidth(), adaptation = { material { headline = null showModeToggle = false title = null }})

and using state.selectedDateMillis to get Millis but its not giving accurate values

Bottom sheet without scaffold pattern

Is it possible to have the bottom sheet that's part of CupertinoBottomSheetScaffold without the scaffold wrapper? just a regular bottom sheet with the regular sheet behavior?

Date Picker: Provide an option to disable user scroll

The HorizontalPager has an issue with scrolling using the MacBooks touchpad. It works fine on Android & iOS.

That's why I usually disable this option until they get it fixed.

Please expose a parameter to disable it, so that Desktop users must use the dedicated buttons and will not get into the broken situation.

Maybe the components default should be false for Desktop apps, too.

pager_issue.720p.mov

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.