Created
May 8, 2024 16:05
-
-
Save binayshaw7777/18afcf1f59c41d3766c2de608683f718 to your computer and use it in GitHub Desktop.
Passing Android Database builder for Room KMP/CMP
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
| // Path: composeApp/src/androidMain/kotlin/com/yourOrg/projName/MainActivity.kt | |
| class MainActivity : ComponentActivity() { | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| val database = getUserDatabase(applicationContext) | |
| setContent { | |
| App(database) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment