File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed
Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ After you integrated the `KvColorPicker-Android` library, you can consume it as
4242As a main functionality, consumer can use color picker bottom sheet in there application as follows.
4343```
4444// Create state variable to show and hide bottom sheet
45+ val showSheet = remember { mutableStateOf(false) }
4546val sheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true)
4647
4748// Button click to open bottom-sheet
@@ -54,13 +55,15 @@ Button(
5455}
5556
5657// Color Picker bottom sheet UI
57- KvColorPickerBottomSheet(
58- showSheet = showSheet,
59- sheetState = sheetState,
60- onColorSelected = { selectedColor ->
61- // Do anything when you have selected color
62- }
63- )
58+ if (showSheet.value) {
59+ KvColorPickerBottomSheet(
60+ showSheet = showSheet,
61+ sheetState = sheetState,
62+ onColorSelected = { selectedColor ->
63+ // Do anything when you have selected color
64+ }
65+ )
66+ }
6467```
6568
6669# Contribution
You can’t perform that action at this time.
0 commit comments