Skip to content

Commit

Permalink
feat(mobile-app): Organized opt-in annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonlom committed Mar 6, 2024
1 parent 30ffa2a commit 7245de9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.runtime.Composable
import com.google.accompanist.pager.ExperimentalPagerApi
import dev.marlonlom.apps.cappajv.features.welcome.WelcomeRoute
import dev.marlonlom.apps.cappajv.ui.main.scaffold.MainScaffold
import dev.marlonlom.apps.cappajv.ui.theme.CappajvTheme
Expand Down Expand Up @@ -56,6 +57,7 @@ private fun shouldUseDarkTheme(
* @param appContentCallbacks Application content callbacks.
* @param onOnboardingComplete Action for onboarding complete.
*/
@ExperimentalPagerApi
@ExperimentalFoundationApi
@ExperimentalLayoutApi
@ExperimentalMaterial3Api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.setValue
import androidx.navigation.compose.currentBackStackEntryAsState
import com.google.accompanist.pager.ExperimentalPagerApi
import dev.marlonlom.apps.cappajv.features.settings.SettingsDialog
import dev.marlonlom.apps.cappajv.ui.main.AppContentCallbacks
import dev.marlonlom.apps.cappajv.ui.main.CappajvAppState
Expand All @@ -33,6 +34,7 @@ import dev.marlonlom.apps.cappajv.ui.navigation.NavigationType
* @param appState Main application ui state
* @param appContentCallbacks Application content callbacks.
*/
@ExperimentalPagerApi
@ExperimentalFoundationApi
@ExperimentalMaterial3Api
@ExperimentalLayoutApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import com.google.accompanist.pager.ExperimentalPagerApi
import dev.marlonlom.apps.cappajv.ui.main.AppContentCallbacks
import dev.marlonlom.apps.cappajv.ui.main.CappajvAppState
import dev.marlonlom.apps.cappajv.ui.navigation.MainNavHost
Expand All @@ -34,6 +35,7 @@ import timber.log.Timber
* @param selectedPosition
* @param onSelectedPositionChanged
*/
@ExperimentalPagerApi
@ExperimentalFoundationApi
@ExperimentalMaterial3Api
@ExperimentalLayoutApi
Expand All @@ -50,12 +52,13 @@ internal fun MainScaffoldContent(
[MainScaffoldContent]
scaffoldContentType=${appState.scaffoldContentType}
devicePosture=${appState.devicePosture}
isLandscape=${appState.isLandscape}
""".trimIndent()
)
Box(
modifier = Modifier
.safeDrawingPadding()
.padding(paddingValues),
.safeDrawingPadding()
.padding(paddingValues),
contentAlignment = Alignment.Center,
) {
when (appState.navigationType) {
Expand All @@ -78,14 +81,16 @@ internal fun MainScaffoldContent(
)

MainNavHost(
appState = appState, appContentCallbacks
appState = appState,
appContentCallbacks = appContentCallbacks,
)
}
}

NavigationType.BOTTOM_NAV -> {
MainNavHost(
appState = appState, appContentCallbacks
appState = appState,
appContentCallbacks = appContentCallbacks,
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.runtime.Composable
import androidx.navigation.NavGraphBuilder
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import com.google.accompanist.pager.ExperimentalPagerApi
import dev.marlonlom.apps.cappajv.features.catalog_favorites.FavoriteProductsRoute
import dev.marlonlom.apps.cappajv.features.catalog_list.CatalogListRoute
import dev.marlonlom.apps.cappajv.features.catalog_search.SearchProductsRoute
Expand All @@ -26,6 +27,7 @@ import dev.marlonlom.apps.cappajv.ui.main.CappajvAppState
* @param appState Application ui state.
* @param appContentCallbacks Application content callbacks.
*/
@ExperimentalPagerApi
@ExperimentalFoundationApi
@ExperimentalMaterial3Api
@ExperimentalLayoutApi
Expand All @@ -51,6 +53,7 @@ fun MainNavHost(
*
* @param appState Application ui state.
*/
@ExperimentalPagerApi
@ExperimentalFoundationApi
@ExperimentalMaterial3Api
@ExperimentalLayoutApi
Expand Down

0 comments on commit 7245de9

Please sign in to comment.