generated from amosproj/amos202Xss0Y-projname
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c2905f9
commit 5b07d68
Showing
35 changed files
with
194 additions
and
180 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,11 +22,13 @@ import androidx.compose.ui.Modifier | |
import androidx.compose.ui.unit.TextUnit | ||
import androidx.compose.ui.unit.TextUnitType | ||
import androidx.compose.ui.unit.dp | ||
import de.amosproj3.ziofa.ui.navigation.data.MenuOptionData | ||
|
||
data class MenuOptionData(val title: String, val logoEmoji: String, val onClick: () -> Unit) | ||
private const val CARD_EMOJI_SIZE = 120f | ||
private const val CARD_TITLE_TEXT_SIZE = 120f | ||
|
||
@Composable | ||
fun MenuOptions(modifier: Modifier = Modifier, menuOptions: List<MenuOptionData>) { | ||
fun MenuOptions(menuOptions: List<MenuOptionData>, modifier: Modifier = Modifier) { | ||
Check warning Code scanning / detekt The Compose Compiler cannot infer the stability of a parameter if a List/Set/Map is used in it, even if the item type is stable. You should use Kotlinx Immutable Collections instead, or create an `@Immutable` wrapper for this class. See https://twitter.github.io/compose-rules/rules/#avoid-using-unstable-collections for more information. Warning
The Compose Compiler cannot infer the stability of a parameter if a List is used in it, even if the item type is stable.
You should use Kotlinx Immutable Collections instead: menuOptions: ImmutableList<MenuOptionData> or create an @Immutable wrapper for this class: @Immutable data class MenuOptionsList(val items: List<MenuOptionData>) See https://twitter.github.io/compose-rules/rules/#avoid-using-unstable-collections for more information. |
||
Row( | ||
modifier = modifier.fillMaxWidth(), | ||
horizontalArrangement = Arrangement.SpaceEvenly, | ||
|
@@ -65,10 +67,10 @@ fun MenuCardWithIcon( | |
) { | ||
Text( | ||
emoji, | ||
fontSize = TextUnit(120f, TextUnitType.Sp), | ||
fontSize = TextUnit(CARD_EMOJI_SIZE, TextUnitType.Sp), | ||
modifier = Modifier.padding(bottom = 20.dp), | ||
) | ||
Text(text, fontSize = TextUnit(40f, TextUnitType.Sp)) | ||
Text(text, fontSize = TextUnit(CARD_TITLE_TEXT_SIZE, TextUnitType.Sp)) | ||
} | ||
} | ||
} |
Oops, something went wrong.