File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
speld/src/main/java/com/yogeshpaliyal/speld Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ fun OtpCell(
61
61
@Composable
62
62
fun PinInput (
63
63
modifier : Modifier = Modifier ,
64
+ cellModifier : Modifier = Modifier ,
64
65
length : Int = 5,
65
66
value : String = "",
66
67
disableKeypad : Boolean = false,
@@ -92,12 +93,12 @@ fun PinInput(
92
93
)
93
94
94
95
Row (
95
- modifier = Modifier .fillMaxWidth(),
96
+ modifier = modifier .fillMaxWidth(),
96
97
horizontalArrangement = Arrangement .Center
97
98
) {
98
99
repeat(length) {
99
100
OtpCell (
100
- modifier = modifier
101
+ modifier = cellModifier
101
102
.size(width = 45 .dp, height = 45 .dp)
102
103
.clip(MaterialTheme .shapes.large)
103
104
.background(
@@ -112,7 +113,8 @@ fun PinInput(
112
113
isCursorVisible = value.length == it,
113
114
obscureText
114
115
)
115
- Spacer (modifier = Modifier .size(8 .dp))
116
+ if (it != length - 1 )
117
+ Spacer (modifier = Modifier .size(8 .dp))
116
118
}
117
119
}
118
120
}
You can’t perform that action at this time.
0 commit comments