# Nav Singh

Stories by Nav Singh on Medium

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Clean Up Your Conditional Logic: Exploring Kotlin 2.5.0-Beta2's New Boolean & Nullable Utilities

DevFeed: [Clean Up Your Conditional Logic: Exploring Kotlin 2.5.0-Beta2's New Boolean & Nullable Utilities](<https://devfeed.tech/articles/clean-up-your-conditional-logic-exploring-kotlin-2-5-0-beta2-s-new-boolean-nullable-utilities-122052.md>)

Original publisher: [Read original article](<https://proandroiddev.com/clean-up-your-conditional-logic-exploring-kotlin-2-5-0-beta2s-new-boolean-nullable-utilities-7854207156ea?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-11-07T02:22:10Z

Content type: tutorial

Language: en

Sources: [Nav Singh](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [conditionals](<https://devfeed.tech/topics/conditionals.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>), [if statement](<https://devfeed.tech/topics/if-statement.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [scope function](<https://devfeed.tech/topics/scope-function.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [boolean](<https://devfeed.tech/tags/boolean.md>), [clean-code](<https://devfeed.tech/tags/clean-code.md>), [conditional](<https://devfeed.tech/tags/conditional.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-2](<https://devfeed.tech/tags/kotlin-2.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>)

### AI overview

Kotlin 2.5.0-Beta2 introduces three experimental standard-library utilities for conditional logic. `Boolean.onTrue` and `onFalse` run a supplied block when the Boolean matches, then return the original Boolean unchanged; the excerpt shows them used to trigger authentication messages while preserving the verification result. `ifOrNull(condition) { ... }` evaluates its block only when the condition is true, returning its value or `null`, as in the phone-number example. Use requires opting in with `ExperimentalStdlibApi`, either at a file or function or through the shown Gradle source-set setting. The supplied excerpt does not describe further behavior or limitations.

### Source excerpt

AI generated image Ditch redundant if-else boilerplate and awkward scope chaining with the newly introduced onTrue(), onFalse(), and ifOrNull() functions. Kotlin has always excelled at eliminating boilerplate. From concise data classes and standard scope functions (apply, also, let, takeIf) to smart casting, the language consistently seeks ways to make everyday idioms more expressive. Kotlin 2.5.0-Beta2 adds standard library functions that let us inspect a value before returning it, or return a nullable result based on that value. https://kotlinlang.org/docs/whatsnew-eap.html?utm_campaign=kotlin-releases&utm_content=2-5-0-beta2 Boolean.onTrue(action: () -> Unit): Boolean Boolean.onFalse(action: () -> Unit): Boolean ifOrNull(condition: Boolean, action: () -> T): T? Implementation Because these functions are introduced as experimental APIs in the standard library, we need to opt in to use them. File/Function Annotation OptIn(ExperimentalStdlibApi::class) Module-wide via Gradle config kotlin { sourceSets.all { languageSettings.optIn("kotlin.ExperimentalStdlibApi") } }onTrue() & onFalse() Both functions invoke a supplied block when the receiver matches the condition and return the original boolean unmodified. Example data class User(val id: String, val email: String) class AuthService() { // Before: fun authenticateLegacy(user: User, token: String): Boolean { val isValid = verifyToken(user.email, token) if (isValid) { "Auth.success" } else { "Auth.failure" } return isValid } // Now: @OptIn(ExperimentalStdlibApi::class) fun authenticate(user: User, token: String): Boolean = verifyToken(user.email, token) .onTrue { "Auth.success" } .onFalse { "Auth.failure" } }ifOrNull() When shaping API responses or DTOs, we may return one computed value if a flag is true and another if false. Traditionally, this looks like 👇 val phoneNumber = if (user.hasContactInfo) user.phoneNumber else nullThe New Way: ifOrNull() ifOrNull(condition) { //.. } lazily evaluates the lambda block only if

## The Evolution of Statics: Say Goodbye to Kotlin Companion Objects?

DevFeed: [The Evolution of Statics: Say Goodbye to Kotlin Companion Objects?](<https://devfeed.tech/articles/the-evolution-of-statics-say-goodbye-to-kotlin-companion-objects-85014.md>)

Original publisher: [Read original article](<https://proandroiddev.com/the-evolution-of-statics-say-goodbye-to-kotlin-companion-objects-dbe625b92896?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-10-11T02:28:53Z

Content type: tutorial

Language: en

Sources: [Nav Singh](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [extension property](<https://devfeed.tech/topics/extension-property.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [class](<https://devfeed.tech/topics/class.md>), [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>), [interface implementation](<https://devfeed.tech/topics/interface-implementation.md>)

Tags: [androiddev](<https://devfeed.tech/tags/androiddev.md>), [block](<https://devfeed.tech/tags/block.md>), [blocks](<https://devfeed.tech/tags/blocks.md>), [bytecode](<https://devfeed.tech/tags/bytecode.md>), [class](<https://devfeed.tech/tags/class.md>), [classes](<https://devfeed.tech/tags/classes.md>), [companion](<https://devfeed.tech/tags/companion.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [cross](<https://devfeed.tech/tags/cross.md>), [extension](<https://devfeed.tech/tags/extension.md>), [extensions](<https://devfeed.tech/tags/extensions.md>), [factory](<https://devfeed.tech/tags/factory.md>), [implement](<https://devfeed.tech/tags/implement.md>), [interface](<https://devfeed.tech/tags/interface.md>), [interop](<https://devfeed.tech/tags/interop.md>), [java](<https://devfeed.tech/tags/java.md>), [jvm](<https://devfeed.tech/tags/jvm.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [memory](<https://devfeed.tech/tags/memory.md>), [module](<https://devfeed.tech/tags/module.md>), [new-features](<https://devfeed.tech/tags/new-features.md>), [overhead](<https://devfeed.tech/tags/overhead.md>), [static](<https://devfeed.tech/tags/static.md>)

### AI overview

The excerpt presents Kotlin 2.5.0-Beta1 companion blocks and companion extensions as experimental alternatives to companion objects. Companion blocks compile members directly as static bytecode on the parent class, allowing Java calls such as `User.createDefault()` without `@JvmStatic`; unlike companion objects, they cannot implement interfaces because they are not objects. Companion extensions add static-like members to a type from outside its declaration, with examples including third-party factories, configuration initializers, and domain constants; regular extension functions instead operate on instances. Trying the preview requires the JetBrains Bootstrap Repository, Kotlin 2.5.0-Beta1, JVM toolchain 21, and the `-Xcompanion-blocks` and `-Xcompanion-blocks-and-extensions` compiler flags.

### Source excerpt

AI generated image For years, we used companion object to group class-level members (constants, factory methods). However, companion objects are actual object singletons under the hood. This introduces memory overhead and causes friction when interoperating with Java (requiring @JvmStaticannotations). data class User(val name: String, val age: Int) { companion object { @JvmStatic fun createDefault(): User = User("Guest", 18) } }AI generated imageKotlin 2.5 introduces companion blocks and companion extensions: Companion Blocks: Drop the object keyword. On the JVM, they compile down directly into high-performance native static members. Companion Extensions: Let us attach new static-like methods or properties to any class from the outside, even classes inside external dependencies or standard Java SDKs we don't control. Companion Blocks vs. Companion Objects Under the Hood: A companion object creates a nested singleton subclass instantiation. A companion block compiles directly to static bytecode members on the parent class. Interface Limitation: Companion objects are still required if static-scoped layer needs to implement an interface. Companion blocks cannot implement interfaces because they are not real objects. Java Interop: Java code can call companion block members directly via User.createDefault(). Companion objects still require User.Companion.createDefault() unless decorated with @JvmStatic. Companion Extensions vs. Regular Extension Functions Call Site: Regular extensions require an existing instance (userInstance.isValid()). Companion extensions are invoked statically on the type itself (User.systemAdmin()). Use Cases: Regular extensions add instance operations (mapping, filtering, etc.). Companion extensions serve as third-party factories, cross-module configuration initializers, or domain constants. Implementation🛠 Setting Up the project Companion Blocks and Extensions are arriving as experimental features in Kotlin 2.5.0-Beta1 To try this out today, we

## How a Forgotten Feature Flag Took Down a Critical Feature

DevFeed: [How a Forgotten Feature Flag Took Down a Critical Feature](<https://devfeed.tech/articles/how-a-forgotten-feature-flag-took-down-a-critical-feature-60052.md>)

Original publisher: [Read original article](<https://proandroiddev.com/how-a-forgotten-feature-flag-took-down-a-critical-feature-e9e0a1515772?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-09-25T18:57:40Z

Content type: article

Language: en

Sources: [Nav Singh](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [incident](<https://devfeed.tech/topics/incident.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [observability](<https://devfeed.tech/topics/observability.md>), [Android](<https://devfeed.tech/topics/android.md>), [bug](<https://devfeed.tech/topics/bug.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [API](<https://devfeed.tech/topics/api.md>), [Software](<https://devfeed.tech/topics/software.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [api](<https://devfeed.tech/tags/api.md>), [behavioral-interviewing](<https://devfeed.tech/tags/behavioral-interviewing.md>), [behavioral-interviews](<https://devfeed.tech/tags/behavioral-interviews.md>), [bug](<https://devfeed.tech/tags/bug.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [incident](<https://devfeed.tech/tags/incident.md>), [interview-questions](<https://devfeed.tech/tags/interview-questions.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [observability](<https://devfeed.tech/tags/observability.md>), [software](<https://devfeed.tech/tags/software.md>)

### AI overview

An incident investigation explains how a forgotten feature flag disrupted Live Chat in an Android application. The article emphasizes that configuration assumptions and missing observability can allow production failures to go unnoticed until customers report them.

### Source excerpt

AI generated imageWhy This Story Stuck With Me Recently, I was reading a 📖 book "Behavioral Interviews for Software Engineers" https://a.co/d/06EAHk5R and came across a common interview question: What was the most difficult bug you encountered and how did you fix it? At first, I thought about the usual answers engineers often give: A race condition A memory leak A difficult crash A performance bottleneck But the more I reflected on my own experiences, the more I realized that some of the hardest production incidents aren't caused by complicated code at all. Sometimes the most difficult bugs are the ones hidden behind assumptions, configuration, and missing observability. This Live Chat incident is a perfect example 💯 The technical fix itself wasn't particularly complicated once we understood the problem. The challenge was figuring out why an important feature had failed in production and why nobody noticed until customers reported it. The First Sign Something Was Wrong The incident began when users started reporting that Live Chat was no longer working in our Android application. At first glance, everything seemed normal. No crashes No deployment alarms No significant monitoring alerts No obvious backend outage Yet customers couldn't access one of the application's most important support channels. As is often the case during incident investigations, we started with more questions than answers. Was this an Android issue? Was it a backend issue? Was there a configuration problem? Or was something else going on entirely? 🤔 Reproducing the Problem Our first task was to reproduce the issue consistently. We tested: Production builds Internal environments Multiple user journeys Different navigation paths One of the most confusing aspects of the investigation was that behavior appeared inconsistent depending on the environment we were testing. This led us down several investigative paths before we eventually found the real issue. Following the Dependency Chain To better und

## From Permissions to Sessions: Rethinking Location Access in Android 17

DevFeed: [From Permissions to Sessions: Rethinking Location Access in Android 17](<https://devfeed.tech/articles/from-permissions-to-sessions-rethinking-location-access-in-android-17-25982.md>)

Original publisher: [Read original article](<https://proandroiddev.com/from-permissions-to-sessions-rethinking-location-access-in-android-17-5a13124b777d?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-09-03T18:18:32Z

Content type: tutorial

Language: en

Sources: [Nav Singh](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [android-permissions](<https://devfeed.tech/topics/android-permissions.md>), [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [Jetpack](<https://devfeed.tech/topics/jetpack.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [Boilerplate](<https://devfeed.tech/topics/boilerplate.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-17](<https://devfeed.tech/tags/android-17.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [android-permissions](<https://devfeed.tech/tags/android-permissions.md>), [android17](<https://devfeed.tech/tags/android17.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [compose](<https://devfeed.tech/tags/compose.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [location](<https://devfeed.tech/tags/location.md>), [permissions](<https://devfeed.tech/tags/permissions.md>), [sessions](<https://devfeed.tech/tags/sessions.md>)

### AI overview

Android 17's Jetpack Compose LocationButton lets users grant precise location for the current session through a system-handled consent flow. The excerpt says to declare USE_LOCATION_BUTTON and ACCESS_COARSE_LOCATION, and to mark ACCESS_FINE_LOCATION with onlyForLocationButton, then add the androidx.core.locationbutton:locationbutton-compose dependency (shown as version 1.0.0-alpha01) and use the LocationButton composable to handle grant or denial. On Android Cinnamon Bun (API 37) and later it uses system remote rendering; on older versions or if that fails, it falls back to local Compose rendering. The button's colors, outline, size, shape, and pressed corner radius can be customized. The excerpt presents this as reducing custom permission-flow work and making session-only access clearer, but supplies no comparison or further limitations.

### Source excerpt

Image generated using Gemini In this article, we will learn how to implement the new 📍Location button introduced in Android 17 in Jetpack Compose-based Android applications. Android 17 adds a system-rendered 📍Location Button that we can drop into the layout via a Jetpack library, and tapping it gives the app precise location for that session only, gated by a new USE_LOCATION_BUTTON permission. What the feature is Android now exposes a system-owned, standard location button that we can embed in our UI instead of designing a custom control. When the user taps it, the system handles the permission flow, then grants the app precise location for the current session only, rather than long-lived access. How it changes permissions Instead of immediately requesting ACCESS_FINE_LOCATION (and maybe ACCESS_COARSE_LOCATION) at runtime, we declare the new USE_LOCATION_BUTTON permission to host the button. <!-- Standard Coarse and Fine Location Permissions + onlyForLocationButton --> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:usesPermissionFlags="onlyForLocationButton"/> <!-- Required system permission for rendering the LocationButton --> <uses-permission android:name="android.permission.USE_LOCATION_BUTTON" />Developer benefits Less custom permission boilerplate: We lean on system UX and the Jetpack library for the hardest parts of location consent. [versions] locationbuttonCompose = "1.0.0-alpha01" [libraries] androidx-locationbutton-compose = { group = "androidx.core.locationbutton", name = "locationbutton-compose", version.ref = "locationbuttonCompose" } Higher trust and clarity for users: the control looks and behaves consistently across apps, and session-only precise access is easier to understand than broader access. Implementation As we all know, Android development is now Compose-first, so we will implement it using the LocationButton composable provided by th

## Mastering Jetpack Compose's New SelectionState API

DevFeed: [Mastering Jetpack Compose's New SelectionState API](<https://devfeed.tech/articles/mastering-jetpack-compose-s-new-selectionstate-api-25985.md>)

Original publisher: [Read original article](<https://proandroiddev.com/mastering-jetpack-composes-new-selectionstate-api-13dfa05f49db?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-08-27T01:17:44Z

Content type: tutorial

Language: en

Sources: [Nav Singh](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [api](<https://devfeed.tech/tags/api.md>), [api-news](<https://devfeed.tech/tags/api-news.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [selection](<https://devfeed.tech/tags/selection.md>), [state](<https://devfeed.tech/tags/state.md>), [text](<https://devfeed.tech/tags/text.md>)

### AI overview

The excerpt describes Jetpack Compose's August '26 SelectionState API for controlling and observing text selection. Create a state with rememberSelectionState() and pass it to a SelectionContainer; the same state cannot be shared across multiple SelectionContainers. Its methods select all content, clear a selection, select a TextRange, or extend selection by word. With no current selection, extendSelectionByWord selects the first word and can continue into the next Text composable. The selectedTexts property returns a List<AnnotatedString> and is observable by composables, allowing selected text to be displayed reactively.

### Source excerpt

Image generated using Gemini The Jetpack Compose August '26 release introduced a new API SelectionState for hoisted, bidirectional control and reactive text observation. Core ComponentsSelectionState An object that provides access to the selected text and methods for controlling it programmatically 🛑 We cannot use the same SelectionState with multiple SelectionContainersval selectionState = rememberSelectionState()SelectionContainer: A composable function that enables text selection of its content. SelectionContainer(state = selectionState) { Text( "Text content to be selected programmatically." ) }Programmatic Control Methods selectionState.selectAll(): Selects all the content in the container Button( onClick = { selectionState.selectAll() }) { Text("Select All") } selectionState.clear(): Clears the active selection Button(onClick = { selectionState.clear() }) { Text("Clear selection") } selectionState.select(TextRange): Selects a specific range of text Button( onClick = { selectionState.select(TextRange(0, 4)) }) { Text("Range selection") } selectionState.extendSelectionByWord(): Expands the selection of words This selects the first word in the container if there is no selection. The selection continues to the next Composable Text, if the next word is in a different Composable Text.Button( onClick = { selectionState.extendSelectionByWord()}) { Text("Extend selection") }Mutliple Text Components selectionSelected texts Provides access to the selected text. Returns List<AnnotatedString> Backed by mutableStateOf -- Observable by Composablesprivate var _selectedTexts by mutableStateOf<List<AnnotatedString>>Text(text = "Selected text: ${selectionState.selectedTexts}")Sample Code@Composable fun ProgrammaticSelectionExample() { val selectionState = rememberSelectionState() Column{ Row { Button( onClick = { selectionState.selectAll() }, ) { Text("Select All") } Button( onClick = { selectionState.clear() }, ) { Text("Clear selection") } } Row { Button( onClick = { selectionS

## Kotlin 2.4 Brings Swift-Style Collection Syntax \[\]

DevFeed: [Kotlin 2.4 Brings Swift-Style Collection Syntax \[\]](<https://devfeed.tech/articles/kotlin-2-4-brings-swift-style-collection-syntax-25983.md>)

Original publisher: [Read original article](<https://proandroiddev.com/kotlin-2-4-brings-swift-style-collection-syntax-0ab7097aa166?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-06-04T16:32:23Z

Content type: tutorial

Language: en

Sources: [Nav Singh](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [syntax](<https://devfeed.tech/topics/syntax.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [array](<https://devfeed.tech/tags/array.md>), [collection](<https://devfeed.tech/tags/collection.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-standard-library](<https://devfeed.tech/tags/kotlin-standard-library.md>), [literals](<https://devfeed.tech/tags/literals.md>), [new-features](<https://devfeed.tech/tags/new-features.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

### AI overview

Kotlin 2.4 introduces experimental collection literals, allowing bracket syntax such as `["Joe", "Alice"]` in place of `listOf()` or `mutableListOf()`. The excerpt says the feature requires opting in with the `-Xcollection-literals` compiler option and that its syntax or behavior may change. With an explicit `MutableList<String>` type, the example initializes a mutable list. For an inferred type, the excerpt cites documentation saying the compiler defaults to `List` when it cannot infer more, but reports that a screenshot appears to show `Array`; it does not resolve that discrepancy.

### Source excerpt

Image generated using Perplexity In Kotlin 2.4, collection literals are introduced, making collection initialization more concise and readable. To define collections, we no longer need to use functions like listOf() or mutableListOf(). This reduces boilerplate and makes intent clearer at a glance, especially when working with simple, static data. It's currently an experimental feature. We need to opt in, and the syntax or behavior may evolve in future releases. Add the Xcollection-literals compiler option to the build file kotlin { jvmToolchain(21) compilerOptions { freeCompilerArgs.add("-Xcollection-literals") } }Code samples Bracket syntax [] + explicit declaration // Mutable list with explicit type declaration // val plFNames: MutableList<String> = mutableListOf("Joe", "Alice") // Mutable list with brackets syntax val plFNames: MutableList<String> = ["Joe", "Alice"] println(plFNames) // ["Joe", "Alice" ] Bracket syntax [] + type inference As per docs:Compiler defaults to List if it lacks sufficient information to infer the collection type.But it seems like Array as we can see in the screenshot 📸 👇 val plFNames = ["Joe", "Alice"] println(plFNames) // ["Joe", "Alice" ]Screenshot type inference -- typeReferences What's new in Kotlin 2.4.0 | Kotlin Kotlin 2.4 Brings Swift-Style Collection Syntax [] was originally published in ProAndroidDev on Medium, where people are continuing the conversation by highlighting and responding to this story.

## Migrating to AGP 9.2.1: Kotlin build errors I hit and how I fixed them

DevFeed: [Migrating to AGP 9.2.1: Kotlin build errors I hit and how I fixed them](<https://devfeed.tech/articles/migrating-to-agp-9-2-1-kotlin-build-errors-i-hit-and-how-i-fixed-them-25977.md>)

Original publisher: [Read original article](<https://navczydev.medium.com/migrating-to-agp-9-2-1-kotlin-build-errors-i-hit-and-how-i-fixed-them-1565bb36b96f?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-05-27T01:03:56Z

Content type: tutorial

Language: en

Sources: [Nav Singh](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Legacy Modernization](<https://devfeed.tech/topics/legacy-modernization.md>), [Developer Tools](<https://devfeed.tech/topics/developer-tools.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [3](<https://devfeed.tech/tags/3.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [android-gradle-plugin](<https://devfeed.tech/tags/android-gradle-plugin.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [app](<https://devfeed.tech/tags/app.md>), [build](<https://devfeed.tech/tags/build.md>), [built-in](<https://devfeed.tech/tags/built-in.md>), [changes](<https://devfeed.tech/tags/changes.md>), [error](<https://devfeed.tech/tags/error.md>), [errors](<https://devfeed.tech/tags/errors.md>), [extension](<https://devfeed.tech/tags/extension.md>), [failure](<https://devfeed.tech/tags/failure.md>), [fixed](<https://devfeed.tech/tags/fixed.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [hit](<https://devfeed.tech/tags/hit.md>), [i](<https://devfeed.tech/tags/i.md>), [issue](<https://devfeed.tech/tags/issue.md>), [jetbrains](<https://devfeed.tech/tags/jetbrains.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [migration](<https://devfeed.tech/tags/migration.md>)

### AI overview

In a small Android app migrated to AGP 9.2.1, built-in Kotlin support caused a duplicate `kotlin` extension when the old `org.jetbrains.kotlin.android` plugin remained applied. Removing that plugin from module and root declarations resolved the first error. The next error was that `org.jetbrains.kotlin.kapt` is incompatible with built-in Kotlin support. The author replaced kapt with KSP for Hilt's compiler dependency, consistent with the migration guide's recommendation; `com.android.legacy-kapt` is mentioned as a temporary fallback. The excerpt also reports an unresolved `kotlinOptions` reference and says AGP 9 uses a new Kotlin compiler options DSL, but it cuts off before showing the fix. The author cautions that a more complex project may encounter additional issues.

### Source excerpt

Image generate using perplexity I recently upgraded an Android project to AGP 9.2.1 and ran into a chain of build errors. In my case, the project was a very small app, so there might be more issues if the project setup is complicated. Each one pointed to a different part of the new Kotlin/Gradle setup, and fixing them one by one made the migration much clearer. Why this happened AGP 9 introduces built-in Kotlin support that changes the old plugin setup (org.jetbrains.kotlin.android). 🛑 kapt, and kotlinOptions no longer work the same way. Error 1: Cannot add extension with name kotlinCannot add extension with name 'kotlin', as there is an extension already registered with that name. The fix was to remove the Kotlin Android plugin from the module and any root-level declarations that still applied it. AGP 9 already provides Kotlin support, so applying the old plugin causes a duplicate kotlin extension.Fixplugins { id("com.android.application") // remove: id("org.jetbrains.kotlin.android") }Error 2: org.jetbrains.kotlin.kapt is not compatible with built-in Kotlin support After removing the Kotlin Android plugin, the next failure came from kapt The 'org.jetbrains.kotlin.kapt' plugin is not compatible with built-in Kotlin support. Android's migration guide recommends moving to KSP, or using com.android.legacy-kapt only as a temporary fallback.Fix After removing kapt, we need to update the affected libraries. In my case, only Hilt was affected, so I updated it with the KSP plugins { //.... // Remove KAPT kotlin("kapt") // Add KSP id("com.google.devtools.ksp") } // dependencies dependencies { // kapt(libs.hilt.compiler) ksp(libs.dagger.hilt.compiler) // ... }Error 3: Unresolved reference: kotlinOptions Once kapt was out of the way, the build hit another issue 🤯 Unresolved reference 'kotlinOptions' That's because AGP 9 built-in Kotlin uses the new Kotlin compiler options DSL instead of the old android.kotlinOptions {} block. The Android migration doc says to move those setti

## Simplify Sorted-Order Validation with Kotlin 2.4.0's New Extensions

DevFeed: [Simplify Sorted-Order Validation with Kotlin 2.4.0's New Extensions](<https://devfeed.tech/articles/simplify-sorted-order-validation-with-kotlin-2-4-0-s-new-extensions-25978.md>)

Original publisher: [Read original article](<https://navczydev.medium.com/simplify-sorted-order-validation-with-kotlin-2-4-0s-new-extensions-b48b1ac10521?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-04-06T02:23:40Z

Content type: article

Language: en

Sources: [Nav Singh](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [Sorting](<https://devfeed.tech/topics/sorting.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [extension property](<https://devfeed.tech/topics/extension-property.md>)

Tags: [extension](<https://devfeed.tech/tags/extension.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-beginners](<https://devfeed.tech/tags/kotlin-beginners.md>), [kotlin-standard-library](<https://devfeed.tech/tags/kotlin-standard-library.md>), [sortedlist](<https://devfeed.tech/tags/sortedlist.md>), [sorting](<https://devfeed.tech/tags/sorting.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>)

### AI overview

Kotlin 2.4.0-Beta1 adds standard-library extensions for checking whether a collection is sorted without sorting it: `isSorted()`, `isSortedDescending()`, `isSortedWith(comparator)`, `isSortedBy(selector)`, and `isSortedByDescending(selector)`. They return true when elements follow the expected order or the collection has fewer than two elements, and stop at the first out-of-order pair. The supplied excerpt gives no further implementation details.

### Source excerpt

Image generated using Perplexity Kotlin 2.4.0-Beta1 introduces a small but powerful addition to the standard library: a set of new extension functions that lets us check whether a collection is already sorted. With these extension functions, we can check whether elements have already been sorted without resorting them. New Functions .isSorted() .isSortedDescending() .isSortedWith(comparator) .isSortedBy(selector) .isSortedByDescending(selector) All of these return true if: The elements are in the expected order, or The collection has fewer than two elements.These functions are optimized -- they stop checking as soon as an unordered pair is found, so they handle large inputs efficiently.Code samplesdata class User(val name: String, val age: Int)fun main() { val numbers = listOf(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) println("Numbers: isSorted") println(numbers.isSorted()) // true println("Is sorted descending") println(numbers.isSortedDescending()) // false // Users list val users = listOf( User("Alice", 21), User("Balley", 34), User("Charles", 29), ) println("Users: isSorted by Age") println(users.isSortedBy(User::age)) // false val comparator = Comparator<User>{ user, user2 -> user.name.length.compareTo(user2.name.length) } println("Users: isSortedWith(comparator)") val sortedList = users.sortedWith(comparator) println("Users: Name by length ${sortedList.joinToString()}") // Output: Users: Name by length User(name=Bob, age=31), User(name=Alice, age=24), User(name=Charlie, age=29) println(sortedList.isSortedWith(comparator)) // true }References What's new in Kotlin 2.4.0-Beta1 | Kotlin

## Biometric Auth in Compose Made Easy: The New Library You Need

DevFeed: [Biometric Auth in Compose Made Easy: The New Library You Need](<https://devfeed.tech/articles/biometric-auth-in-compose-made-easy-the-new-library-you-need-25980.md>)

Original publisher: [Read original article](<https://proandroiddev.com/biometric-auth-in-compose-made-easy-the-new-library-you-need-29814270506d?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-04-02T02:28:19Z

Content type: tutorial

Language: en

Sources: [Nav Singh](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Library](<https://devfeed.tech/topics/library.md>), [Android Library](<https://devfeed.tech/topics/android-library.md>), [implementation](<https://devfeed.tech/topics/implementation.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [biometric-authentication](<https://devfeed.tech/tags/biometric-authentication.md>), [biometrics](<https://devfeed.tech/tags/biometrics.md>), [callback](<https://devfeed.tech/tags/callback.md>), [code](<https://devfeed.tech/tags/code.md>), [compose](<https://devfeed.tech/tags/compose.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [customization](<https://devfeed.tech/tags/customization.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [dialog](<https://devfeed.tech/tags/dialog.md>), [fallback](<https://devfeed.tech/tags/fallback.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [integration](<https://devfeed.tech/tags/integration.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [launch](<https://devfeed.tech/tags/launch.md>), [library](<https://devfeed.tech/tags/library.md>), [main-thread](<https://devfeed.tech/tags/main-thread.md>)

### AI overview

The excerpt shows how `biometric-compose` streamlines biometric authentication in Compose apps. It specifies `androidx.biometric:biometric` and `androidx.biometric:biometric-compose` version `1.4.0-alpha06`, then uses `rememberAuthenticationLauncher` to launch requests and receive results: successes and errors go to `onAuthResult`, while failed attempts go to `onAuthAttemptFailed`; the callback runs on the main thread. Requests are configured with a title and optional device-credential fallback, subtitle, logo, and description. The excerpt says the advanced dialog permission required for a custom logo or `ContentViewWithMoreOptionsButton` is granted only to system apps, and recommends letting the library display the app logo. Without specified auth fallbacks, the prompt shows a default cancel button.

### Source excerpt

Image generated using Perplexity In this article, we will learn how to integrate a new library biometric-compose into Android applications for Biometric integration. A new biometric-compose library simplifies the integration of biometrics into Compose-based applications. ImplementationDependencies implementation("androidx.biometric:biometric:1.4.0-alpha06") implementation("androidx.biometric:biometric-compose:1.4.0-alpha06")rememberAuthenticationLauncherrememberAuthenticationLauncher A composable function to streamline biometric authentication requests and callbacks directly in composables. It returns AuthenticationResultLauncher that we can use to initiate the authentication process. We need to pass a callback of type AuthenticationResultCallback . It will be called when an AuthenticationResult is available. A successful or error result will be delivered to AuthenticationResultCallback.onAuthResult , and failures will be delivered to AuthenticationResultCallback.onAuthAttemptFailed, which is set by a callback. The 👆callback will be executed on the main thread.fun AuthenticationResult.processAuthResult(){ when (this) { is AuthenticationResult.Success -> Log.d(TAG, "AuthenticationResult Success, \nAuth type: $authType, \nCrypto object: $crypto") is AuthenticationResult.Error -> Log.d(TAG,"AuthenticationResult Error, \nError code: $errorCode, \nErr string: $errString") is AuthenticationResult.CustomFallbackSelected -> { Log.d(TAG,"AuthenticationResult CustomFallbackSelected ${fallback.text}") } } }AuthenticationResultTypeAuthenticationResultTypeDemo AuthenticationResultTypeAuthenticationError (Error code)AuthenticationError (Error code)Demo AuthenticationError (Error code)🧑💻 Code: rememberAuthenticationLauncherval launcher = rememberAuthenticationLauncher( resultCallback = object : AuthenticationResultCallback { override fun onAuthResult(result: AuthenticationResult) { Log.d(TAG, "onAuthResult: $result") processAuthResult() } override fun onAuthAttemptFailed() { supe

## Meet FlexBox: The Powerful New Layout System for Compose

DevFeed: [Meet FlexBox: The Powerful New Layout System for Compose](<https://devfeed.tech/articles/meet-flexbox-the-powerful-new-layout-system-for-compose-25986.md>)

Original publisher: [Read original article](<https://proandroiddev.com/meet-flexbox-the-powerful-new-layout-system-for-compose-446b1f65cc62?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-03-27T18:22:23Z

Content type: article

Language: en

Sources: [Nav Singh](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [layout](<https://devfeed.tech/topics/layout.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [CSS](<https://devfeed.tech/topics/css.md>)

Tags: [adaptive](<https://devfeed.tech/tags/adaptive.md>), [alignment](<https://devfeed.tech/tags/alignment.md>), [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [api](<https://devfeed.tech/tags/api.md>), [compose](<https://devfeed.tech/tags/compose.md>), [css](<https://devfeed.tech/tags/css.md>), [css-flexbox](<https://devfeed.tech/tags/css-flexbox.md>), [design](<https://devfeed.tech/tags/design.md>), [distribution](<https://devfeed.tech/tags/distribution.md>), [flex](<https://devfeed.tech/tags/flex.md>), [flexbox](<https://devfeed.tech/tags/flexbox.md>), [flexibility](<https://devfeed.tech/tags/flexibility.md>), [flexible](<https://devfeed.tech/tags/flexible.md>), [gap](<https://devfeed.tech/tags/gap.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [layout](<https://devfeed.tech/tags/layout.md>), [layouts](<https://devfeed.tech/tags/layouts.md>), [model](<https://devfeed.tech/tags/model.md>), [multiple](<https://devfeed.tech/tags/multiple.md>), [options](<https://devfeed.tech/tags/options.md>)

### AI overview

FlexBox brings CSS Flexbox-style adaptive layout to Jetpack Compose. Its container configures row or column direction, wrapping (including reverse wrapping), main-axis distribution, cross-axis alignment, and spacing; wrapped multi-line layouts can also distribute lines along the cross-axis. Per-child `Modifier.flex` settings control growth, shrinking, starting basis, display order, and individual alignment. The examples show row and column growth, wrapping a row of items, and reverse row direction. The excerpt describes the API and examples but does not establish performance characteristics or comparisons beyond its stated relationship to `Row`, `Column`, and flow layouts.

### Source excerpt

Header image Jetpack Compose continues to evolve, and with the introduction of the new FlexBox layout, we finally have a powerful, flexible way to design adaptive UIs -- inspired by the CSS Flexbox model. https://developer.android.com/develop/ui/compose/layouts/adaptive/flexbox If you've ever used Row, Column, or FlowRowYou'll feel right at home. FlexBox acts as a superset, combining their capabilities while providing granular control over alignment, wrapping, and item distribution. Until now, we had to choose between rigid layouts (Row/Column) or more dynamic ones (FlowRow/FlowColumn). FlexBox merges the best of both worlds -- flexibility and simplicity. What Is FlexBox? Composable brings the concept of flexible layouts from the web into Jetpack Compose. Arranges its children dynamically, allowing them to grow, shrink, or wrap based on available space and configuration. Preview FlexBoxFlexBox API🏗 Building blocks and their roles.FlexBoxThe main composable responsible for arranging children.FlexBox( config = { direction(FlexDirection.Row) wrap(FlexWrap.Wrap) justifyContent(FlexJustifyContent.SpaceBetween) alignItems(FlexAlignItems.Center) gap(8.dp) }, modifier = Modifier .border(1.dp, Color.Black) ) { Text( "Item 1", Modifier .flex { grow(1f) } .background(color = randomColor()) .border(1.dp, Color.Black) ) Text( "Item 2", Modifier .flex { basis(80.dp) } .background(color = randomColor())) }Screenshot FlexBox SampleFlexBoxConfigConfigures the container's layout behavior -- direction, wrapping, justification, alignment, and spacing. Key parameters: direction: Controls the main axis (Row, Column). wrap: Determines if items flow onto new lines. Here we have 3 options: Wrap, NoWrap, WrapReverse justifyContent: Distributes space along the main axis(start, end, etc). alignItems: Defines how items align on the cross-axis(start, end, etc). alignContent: Controls how multiple lines are distributed along the cross-axis. This applies only when the wrap is FlexWrap.Wrap or FlexWr

## Beyond Positions: Kotlin's New Name-Based Destructuring

DevFeed: [Beyond Positions: Kotlin's New Name-Based Destructuring](<https://devfeed.tech/articles/beyond-positions-kotlin-s-new-name-based-destructuring-25979.md>)

Original publisher: [Read original article](<https://proandroiddev.com/beyond-positions-kotlins-new-name-based-destructuring-eee347d1bb5c?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-03-18T01:24:50Z

Content type: article

Language: en

Sources: [Nav Singh](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [destructuring](<https://devfeed.tech/topics/destructuring.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [destructuring](<https://devfeed.tech/tags/destructuring.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-native](<https://devfeed.tech/tags/kotlin-native.md>), [name](<https://devfeed.tech/tags/name.md>)

### AI overview

Kotlin 2.3.20 introduces experimental name-based destructuring, which binds each declared variable to a property with the same name instead of relying on the order of componentN() functions. The excerpt illustrates how position-based destructuring can assign values unexpectedly when variable order differs from property order. The compiler option -Xname-based-destructuring controls interpretation; the example enables only-syntax mode. The excerpt also shows square brackets for position-based destructuring in Complete mode, but does not explain the Name-Mismatch mode.

### Source excerpt

Image generated using Perplexity Name-based destructuring declarations were introduced in Kotlin 2.3.20 and match variables to properties rather than relying on position-based componentN(). Previously, destructive declarations used position-based destruction: data class User(var firstName: String, var lastName: String) val user = User("Alice", "Husseini") // componentN() val(firstName,lastName) = user println(firstName) println(lastName)Drawback of the componentN() based approach Destructuring relies on the order of componentN() functions, lastName receives the value of firstName, and firstName receives the value of lastName 👇 data class User(var firstName: String, var lastName: String) val user = User("Alice", "Husseini") // componentN() val(lastName,firstName) = user println(firstName) -> Husseini println(lastName) -> AliceName-based destructuring ✨ It's an Experimental feature. We can control how the compiler interprets destructuring declarations with the -Xname-based-destructuring compiler option. kotlin { // .. compilerOptions { freeCompilerArgs.add("-Xname-based-destructuring=only-syntax") } }Each variable refers to a property by name.val user = User("Alice", "Husseini") // Name-based destructuring (val firstName = firstName, val lastName = lastName) = userModeshttps://kotlinlang.org/docs/whatsnew2320.html#languageMode -- Name-Mismatch⚠ Warning ⚠Name-Mismatch warningMode -- Complete Position-based destructuring using square brackets []: data class User(var firstName: String, var lastName: String) val user = User("Alice", "Husseini") // componentN() val [firstName,lastName] = userReferences What's new in Kotlin 2.3.20 | Kotlin Stay in touch https://www.linkedin.com/in/navczydev/ JavaScript is not available. navczydev - Overview navczydev.bsky.social Beyond Positions: Kotlin's New Name-Based Destructuring was originally published in ProAndroidDev on Medium, where people are continuing the conversation by highlighting and responding to this story.

## LocalMaterialTheme: From Prop Hell to Theme Nirvana -- Material3

DevFeed: [LocalMaterialTheme: From Prop Hell to Theme Nirvana -- Material3](<https://devfeed.tech/articles/localmaterialtheme-from-prop-hell-to-theme-nirvana-material3-25984.md>)

Original publisher: [Read original article](<https://proandroiddev.com/localmaterialtheme-from-prop-hell-to-theme-nirvana-material3-38b3c01ab7d4?source=rss-711ab22c5c77------2>)

Author: Nav Singh

Published: 2026-03-12T19:38:30Z

Content type: article

Language: en

Sources: [Nav Singh](<https://devfeed.tech/sources/stories-by-nav-singh-on-medium.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Material Design](<https://devfeed.tech/topics/material-design.md>)

Tags: [1-5](<https://devfeed.tech/tags/1-5.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [androiddev](<https://devfeed.tech/tags/androiddev.md>), [color](<https://devfeed.tech/tags/color.md>), [design-systems](<https://devfeed.tech/tags/design-systems.md>), [drawing](<https://devfeed.tech/tags/drawing.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [layout](<https://devfeed.tech/tags/layout.md>), [material-design](<https://devfeed.tech/tags/material-design.md>), [material3](<https://devfeed.tech/tags/material3.md>), [modifiers](<https://devfeed.tech/tags/modifiers.md>), [refactor](<https://devfeed.tech/tags/refactor.md>)

### AI overview

The excerpt says Jetpack Compose Material 3 1.5.0-alpha15 consolidates MaterialTheme's color, typography, shapes, and motion locals into `LocalMaterialTheme`, which it says reduces allocations and simplifies the provider. Its practical use is for custom modifier nodes: with `CompositionLocalConsumerModifierNode`, a drawing node can read the theme's color scheme directly and build a gradient. The excerpt contrasts this with passing colors into a modifier manually or capturing them through `composed`, which it characterizes as recomposition-heavy. It advises using ordinary `MaterialTheme.colorScheme` access in regular composables and avoiding the unified local for simple cases.

### Source excerpt

Image generated using Perplexity Jetpack Compose Material 3 1.5.0-alpha15 introduces a subtle but powerful refactor MaterialTheme now uses a single LocalMaterialTheme CompositionLocal instead of separate locals for color, typography, shapes, and motion. While this simplifies internal theme management, its real value emerges when building custom design systems and theme-aware Modifier libraries. The Refactor: Cleaner Under the Hood Previously, MaterialTheme relied on multiple CompositionLocals: Source:https://android-review.googlesource.com/c/platform/frameworks/support/+/3949000/16/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/MaterialTheme.kt Now: Everything flows through one unified source: Source:https://android-review.googlesource.com/c/platform/frameworks/support/+/3949000/16/compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/MaterialTheme.ktThis reduces allocations and simplifies the theme provider.⭐ Where It Shines: Design Systems & Custom Modifiers ⭐ The game-changer is CompositionLocalConsumerModifierNode support. Custom Modifiers that handle drawing/layout outside @Composable scopes can now read theme data directly:object BrandGradientOverlayElement : ModifierNodeElement<BrandGradientOverlayNode>() { override fun create(): BrandGradientOverlayNode = BrandGradientOverlayNode() override fun update(node: BrandGradientOverlayNode) { // No-Op } override fun InspectorInfo.inspectableProperties() { name = "brandGradientOverlay" } override fun equals(other: Any?): Boolean = (this === other) override fun hashCode(): Int = javaClass.hashCode() } class BrandGradientOverlayNode : Modifier.Node(), DrawModifierNode, CompositionLocalConsumerModifierNode { override fun ContentDrawScope.draw() { // Read color scheme to access colors val colorScheme = currentValueOf(MaterialTheme.LocalMaterialTheme).colorScheme val gradient = Brush.linearGradient( listOf( colorScheme.primary, colorScheme.secondary) ) drawContent() d