mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 22:17:03 +05:30
Initial commit
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
commit
29c374859b
27 changed files with 823 additions and 0 deletions
5
common/src/androidMain/AndroidManifest.xml
Normal file
5
common/src/androidMain/AndroidManifest.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="dev.msfjarvis.claw.common"
|
||||
/>
|
|
@ -0,0 +1,5 @@
|
|||
package dev.msfjarvis.claw.common
|
||||
|
||||
actual fun getPlatformName(): String {
|
||||
return "Android"
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package dev.msfjarvis.claw.common
|
||||
|
||||
import androidx.compose.material.Button
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
|
||||
@Composable
|
||||
fun App() {
|
||||
var text by remember { mutableStateOf("Hello, World!") }
|
||||
|
||||
MaterialTheme { Button(onClick = { text = "Hello, ${getPlatformName()}" }) { Text(text) } }
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
package dev.msfjarvis.claw.common
|
||||
|
||||
expect fun getPlatformName(): String
|
|
@ -0,0 +1,5 @@
|
|||
package dev.msfjarvis.claw.common
|
||||
|
||||
actual fun getPlatformName(): String {
|
||||
return "Desktop"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue