Created
January 18, 2024 20:18
-
-
Save saqib-github-commits/c7db97b57ca6500f98b1bab26ca4bcda to your computer and use it in GitHub Desktop.
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
// analyticsLogger created inside MainActivity using hilt, | |
// It will take actual implementation binded inside Hilt Module | |
@Inject | |
protected lateinit var analyticsLogger: AnalyticsLogger | |
// Assigning value inside setContent lambda of MainActivity | |
CompositionLocalProvider(LocalAnalyticsLogger provides analyticsLogger) { | |
CompositionLocalSampleTheme { | |
// A surface container using the 'background' color from the theme | |
Surface( | |
modifier = Modifier.fillMaxSize(), | |
color = MaterialTheme.colorScheme.background | |
) { | |
WelcomeScreen() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment