5.0.0
- Migrate to Kotlin Multiplatform by @delacrixmorgan in #45
✨ New Features
• Introduced NumberKeyboardFormat enum to control keypad layout:
enum class NumberKeyboardFormat {
Normal, // Standard ascending layout (like phone dial pad)
Inverted, // Descending layout (like a calculator)
Scrambled, // Shuffled once on composition
AlwaysScrambled // Re-shuffles every tap (chaos, but secure chaos)
}⚠️ Breaking Changes
isInverted: Booleanis now deprecated
One flag was never enough. Now you’ve got four layout options to rule them all. Replace
isInverted = truewith:
format = NumberKeyboardFormat.Inverted🧭 Migration Guide
| Before | After |
|---|---|
| isInverted = false | format = NumberKeyboardFormat.Normal |
| isInverted = true | format = NumberKeyboardFormat.Inverted |
NumberKeyboardis now a stateless composable.- Removed internal
rememberstate for the input amount. - You must provide:
amount: StringonAmountChange: (String) -> Unit
- Removed
initialAmountattribute. - This enables external state management and improves integration with architectures like MVI,
ViewModel, etc.
- Removed internal
Before:
NumberKeyboard() // internally remembered stateAfter:
var amount by remember { mutableStateOf("") }
NumberKeyboard(
amount = amount,
onAmountChange = { amount = it }
)