Created
March 28, 2026 01:14
-
-
Save skydoves/b746ec801cd53a4f382706499abd5d10 to your computer and use it in GitHub Desktop.
ImagePluginComponent DSL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Stable | |
| public class ImagePluginComponent( | |
| internal val mutablePlugins: MutableList<ImagePlugin> = mutableListOf(), | |
| ) : ImageComponent { | |
| public val plugins: List<ImagePlugin> | |
| inline get() = mutablePlugins | |
| public fun add(imagePlugin: ImagePlugin): ImagePluginComponent = apply { | |
| mutablePlugins.add(imagePlugin) | |
| } | |
| public operator fun ImagePlugin.unaryPlus(): ImagePluginComponent = add(this) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment