I am using Jetpack Compose and trying to make a Login Screen cover the whole screen when the user clicks the login button in the TopAppBar.
I am using a combination of ModalBottomSheetLayout and a Scaffold so I can have a TopAppBar and a BottomAppBar.
Currently when the login screen is displayed it only covers half of the screen.
val coroutineScope = rememberCoroutineScope()
val bottomState = rememberModalBottomSheetState(ModalBottomSheetValue.Hidden)
ModalBottomSheetLayout(
sheetState = bottomState,
sheetShape = MaterialTheme.shapes.large,
sheetContent = {
FullScreen()
}
) {
Scaffold(
topBar = {
TopAppBar(
...
content = {
NavHost(navController = navController,
startDestination = "journey") {
composable("journey") { JourneyScreen() }
...
bottomBar = {
BottomAppBar(
content = {
BottomNavigation() {
val navBackStackEntry by navController.currentBackStackEntryAsState()
...
@Composable
fun FullScreen() {
Box(modifier = Modifier
.fillMaxSize()
) {
Text("Full Screen")
}
}
Have been stuck on this for way too long and any help is appreciated.