Im trying to create a screen that will have a topbar but i run in to a problem with the modifier, i got it to work with the normal included jetpack compose navigation but i cant seem to get it to work with the voyager library with uses override functions. I need to include the parameter modifier: Modifier but get the error "Content overrides nothing"
package com.example.myapplication.ui.theme
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.CenterAlignedTopAppBar
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import cafe.adriel.voyager.core.screen.Screen
import cafe.adriel.voyager.navigator.LocalNavigator
class Settings(modifier: Modifier): Screen {
@OptIn(ExperimentalMaterial3Api::class)
@Composable
override fun Content(modifier: Modifier) {
val navigator = LocalNavigator.current
Scaffold(
topBar = {
CenterAlignedTopAppBar(
title = {
Text(text = "Settings") })
}
) { contentPadding ->
Column(modifier.padding(contentPadding)){
}
}
}