Created
December 5, 2021 16:36
-
-
Save enyciaa/038a8db7a82b115918c50bcec7522977 to your computer and use it in GitHub Desktop.
screen-template-7
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
// Jetpack compose | |
@Composable | |
fun ScreenTemplate( | |
screenBackgroundColor: Color = MaterialTheme.colors.surface, | |
screenState: ScreenState, | |
loadedState: @Composable () -> Unit, | |
screenToolbarViewState: ScreenToolbarViewState? = null, | |
screenCallToActionViewState: ScreenCallToActionViewState? = null, | |
onCallToActionClicked: () -> Unit = { }, | |
) { | |
// Content | |
} | |
// SwiftUI | |
struct JuicyScreenTemplate<ViewState: KotlinBase, Content: View>: View { | |
let screenBackgroundColor: Color | |
let screenState: ScreenState | |
let content: () -> Content | |
let screenToolbarViewState: ScreenToolbarViewState? | |
let screenCallToActionViewState: ScreenCallToActionViewState? | |
let onCallToActionTapped: () -> Void | |
// Content | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment