Skip to content

Commit 103bd22

Browse files
JolandaVerhoefgithub-actions[bot]
authored andcommitted
Apply Spotless
1 parent 209a6ae commit 103bd22

File tree

1 file changed

+13
-11
lines changed
  • compose/snippets/src/main/java/com/example/compose/snippets/components

1 file changed

+13
-11
lines changed

compose/snippets/src/main/java/com/example/compose/snippets/components/Menus.kt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,9 @@ fun DropdownFilter(modifier: Modifier = Modifier) {
237237
verticalAlignment = Alignment.CenterVertically
238238
) {
239239
Icon(Icons.Default.Tune, "Filters")
240-
FilterChip(selected = false, onClick = { /*TODO*/ }, label = { Text("Time")})
240+
FilterChip(selected = false, onClick = { /*TODO*/ }, label = { Text("Time") })
241241
DropdownFilterChip()
242-
FilterChip(selected = false, onClick = { /*TODO*/ }, label = { Text("Wheelchair accessible")})
242+
FilterChip(selected = false, onClick = { /*TODO*/ }, label = { Text("Wheelchair accessible") })
243243
}
244244
}
245245

@@ -252,42 +252,44 @@ fun DropdownFilterChip(modifier: Modifier = Modifier) {
252252
FilterChip(
253253
selected = selectedChipText != null,
254254
onClick = { isDropdownExpanded = !isDropdownExpanded },
255-
label = { Text(if(selectedChipText == null) "Type" else "$selectedChipText") },
256-
leadingIcon = { if(selectedChipText != null) Icon(Icons.Default.Check, null) },
255+
label = { Text(if (selectedChipText == null) "Type" else "$selectedChipText") },
256+
leadingIcon = { if (selectedChipText != null) Icon(Icons.Default.Check, null) },
257257
trailingIcon = { Icon(Icons.Default.ArrowDropDown, null) },
258258
)
259-
DropdownMenu(expanded = isDropdownExpanded,
260-
onDismissRequest = { isDropdownExpanded = !isDropdownExpanded }) {
259+
DropdownMenu(
260+
expanded = isDropdownExpanded,
261+
onDismissRequest = { isDropdownExpanded = !isDropdownExpanded }
262+
) {
261263
DropdownMenuItem(
262264
text = { Text("Running") },
263265
leadingIcon = { Icon(Icons.AutoMirrored.Default.DirectionsRun, null) },
264266
onClick = {
265267
selectedChipText =
266-
if(selectedChipText == "Running") null else "Running"
268+
if (selectedChipText == "Running") null else "Running"
267269
}
268270
)
269271
DropdownMenuItem(
270272
text = { Text("Walking") },
271273
leadingIcon = { Icon(Icons.AutoMirrored.Default.DirectionsWalk, null) },
272274
onClick = {
273275
selectedChipText =
274-
if(selectedChipText == "Walking") null else "Walking"
276+
if (selectedChipText == "Walking") null else "Walking"
275277
}
276278
)
277279
DropdownMenuItem(
278280
text = { Text("Hiking") },
279281
leadingIcon = { Icon(Icons.Default.Hiking, null) },
280282
onClick = {
281283
selectedChipText =
282-
if(selectedChipText == "Hiking") null else "Hiking"
284+
if (selectedChipText == "Hiking") null else "Hiking"
283285
}
284286
)
285287
DropdownMenuItem(
286288
text = { Text("Cycling") },
287289
leadingIcon = { Icon(Icons.AutoMirrored.Default.DirectionsBike, null) },
288290
onClick = {
289291
selectedChipText =
290-
if(selectedChipText == "Cycling") null else "Cycling"
292+
if (selectedChipText == "Cycling") null else "Cycling"
291293
}
292294
)
293295
}
@@ -299,4 +301,4 @@ fun DropdownFilterChip(modifier: Modifier = Modifier) {
299301
@Composable
300302
private fun DropdownFilterPreview() {
301303
DropdownFilter()
302-
}
304+
}

0 commit comments

Comments
 (0)