Initial commit

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2021-06-02 15:21:28 +05:30
commit 29c374859b
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
27 changed files with 823 additions and 0 deletions

View 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"
/>

View file

@ -0,0 +1,5 @@
package dev.msfjarvis.claw.common
actual fun getPlatformName(): String {
return "Android"
}

View file

@ -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) } }
}

View file

@ -0,0 +1,3 @@
package dev.msfjarvis.claw.common
expect fun getPlatformName(): String

View file

@ -0,0 +1,5 @@
package dev.msfjarvis.claw.common
actual fun getPlatformName(): String {
return "Desktop"
}