File tree Expand file tree Collapse file tree
core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /*
2+ * ImageToolbox is an image editor for android
3+ * Copyright (c) 2025 T8RIN (Malik Mukhametzyanov)
4+ *
5+ * Licensed under the Apache License, Version 2.0 (the "License");
6+ * you may not use this file except in compliance with the License.
7+ *
8+ * Unless required by applicable law or agreed to in writing, software
9+ * distributed under the License is distributed on an "AS IS" BASIS,
10+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+ * See the License for the specific language governing permissions and
12+ * limitations under the License.
13+ *
14+ * You should have received a copy of the Apache License
15+ * along with this program. If not, see <http://www.apache.org/licenses/LICENSE-2.0>.
16+ */
17+
18+ package com.t8rin.imagetoolbox.core.ui.widget.modifier
19+
20+ import androidx.compose.ui.Modifier
21+
22+ inline fun Modifier.thenIf (
23+ condition : Boolean ,
24+ block : Modifier .() -> Modifier
25+ ): Modifier = if (condition) then(Modifier .block()) else this
You can’t perform that action at this time.
0 commit comments