This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright 2025 Kyriakos Georgiopoulos | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright 2025 Kyriakos Georgiopoulos | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.treecomponent | |
| import androidx.compose.foundation.BorderStroke | |
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.border | |
| import androidx.compose.foundation.layout.Box | |
| import androidx.compose.foundation.layout.Column | |
| import androidx.compose.foundation.layout.Spacer | |
| import androidx.compose.foundation.layout.fillMaxWidth | |
| import androidx.compose.foundation.layout.height |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BoxWithConstraints { | |
| val boxWithConstraintsScope = this | |
| val height = (boxWithConstraintsScope.maxWidth - AppTheme.dimensions.padding_16 * 2) / 16 * 9 // Banner width to height ratio should be 16:9 | |
| val context = LocalContext.current | |
| val density = LocalDensity.current | |
| ConstraintLayout { | |
| val (pager, indicator) = createRefs() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package ru.mobileup.template.core.utils | |
| import com.arkivanov.decompose.Child | |
| import com.arkivanov.decompose.ComponentContext | |
| import com.arkivanov.decompose.router.stack.ChildStack | |
| import com.arkivanov.decompose.router.stack.StackNavigationSource | |
| import com.arkivanov.decompose.router.stack.childStack | |
| import com.arkivanov.decompose.value.MutableValue | |
| import com.arkivanov.decompose.value.Value | |
| import com.arkivanov.essenty.lifecycle.Lifecycle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sealed class PageLoadState(val endOfDataReached: Boolean) { | |
| data class Error(val error: Throwable) : PageLoadState(false) { | |
| override fun toString(): String = "Error(error=$error" | |
| } | |
| sealed class NotLoading(endOfDataReached: Boolean) : PageLoadState(endOfDataReached) { | |
| object Complete : NotLoading(true) { | |
| override fun toString(): String = "Complete" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.jetbrains.exposed.sql.* | |
| import org.jetbrains.exposed.sql.statements.jdbc.JdbcConnectionImpl | |
| import org.jetbrains.exposed.sql.transactions.TransactionManager | |
| import org.jetbrains.exposed.sql.vendors.PostgreSQLDialect | |
| import org.jetbrains.exposed.sql.vendors.currentDialect | |
| import org.postgresql.jdbc.PgArray | |
| inline fun <reified T : Any> Table.listColumn(name: String): Column<List<T>> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import androidx.compose.ui.tooling.preview.PreviewParameterProvider | |
| import kotlin.reflect.KClass | |
| /** | |
| * Creates a [PreviewParameterProvider] based on the classes of two existing providers. | |
| * | |
| * You can create your own easily with Kotlin delegation: | |
| * ``` | |
| * class ExampleProvider : PreviewParameterProvider<Pair<Type1, Type2>> | |
| * by compositeProvider(Type1ParameterProvider::class, Type2ParameterProvider::class) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import androidx.compose.animation.core.RepeatMode | |
| import androidx.compose.animation.core.animateFloat | |
| import androidx.compose.animation.core.infiniteRepeatable | |
| import androidx.compose.animation.core.rememberInfiniteTransition | |
| import androidx.compose.animation.core.tween | |
| import androidx.compose.foundation.background | |
| import androidx.compose.foundation.layout.Box | |
| import androidx.compose.foundation.layout.fillMaxSize | |
| import androidx.compose.foundation.layout.height | |
| import androidx.compose.foundation.layout.offset |