Extracted AppContent()
This commit is contained in:
parent
568b6b8301
commit
12d23fb790
|
@ -6,17 +6,15 @@ import androidx.compose.material.*
|
|||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Add
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import kotlinx.coroutines.launch
|
||||
import net.codinux.banking.ui.appskeleton.AppContent
|
||||
import net.codinux.banking.ui.appskeleton.BottomBar
|
||||
import net.codinux.banking.ui.appskeleton.SideMenuContent
|
||||
import net.codinux.banking.ui.composables.StateHandler
|
||||
import net.codinux.banking.ui.composables.transactions.TransactionsList
|
||||
import net.codinux.banking.ui.config.Colors
|
||||
import net.codinux.banking.ui.config.DI
|
||||
import net.codinux.log.LoggerFactory
|
||||
|
@ -90,11 +88,7 @@ fun App() {
|
|||
}
|
||||
}
|
||||
) { scaffoldPadding ->
|
||||
Column(Modifier.fillMaxSize().padding(scaffoldPadding), horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
TransactionsList(uiState, uiSettings)
|
||||
}
|
||||
|
||||
StateHandler(uiState, snackbarHostState)
|
||||
AppContent(scaffoldPadding, uiState, uiSettings, snackbarHostState)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package net.codinux.banking.ui.appskeleton
|
||||
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.material.SnackbarHostState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import net.codinux.banking.ui.composables.StateHandler
|
||||
import net.codinux.banking.ui.composables.transactions.TransactionsList
|
||||
import net.codinux.banking.ui.settings.UiSettings
|
||||
import net.codinux.banking.ui.state.UiState
|
||||
|
||||
@Composable
|
||||
fun AppContent(
|
||||
scaffoldPadding: PaddingValues,
|
||||
uiState: UiState,
|
||||
uiSettings: UiSettings,
|
||||
snackbarHostState: SnackbarHostState
|
||||
) {
|
||||
|
||||
Column(Modifier.fillMaxSize().padding(scaffoldPadding), horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
TransactionsList(uiState, uiSettings)
|
||||
|
||||
StateHandler(uiState, snackbarHostState)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue