Skip to content

Instantly share code, notes, and snippets.

View Simba-97's full-sized avatar
:octocat:
Coding

Hritik Kumar Singh Simba-97

:octocat:
Coding
View GitHub Profile
@OptIn(ExperimentalPagerApi::class)
@Composable
fun MainScreen() {
val screens = listOf(
BottomBarScreen.Home,
BottomBarScreen.Profile,
BottomBarScreen.Settings
)
val pagerState = PagerState(pageCount = screens.size)
@OptIn(ExperimentalPagerApi::class)
@Composable
fun BottomNavGraph(
pagerState: PagerState
) {
Box(
modifier = Modifier.fillMaxWidth(),
contentAlignment = Alignment.Center
) {
HorizontalPager(
sealed class BottomBarScreen(
val title: String,
val icon: ImageVector,
val description: String,
val page: Int
) {
object Home : BottomBarScreen(
title = "Home",
icon = Icons.Default.Home,
description = "Home description",
@Composable
fun HomeScreen() {
Box(
modifier = Modifier
.fillMaxSize()
.background(Color.Magenta),
contentAlignment = Alignment.Center
) {
Text(
text = "HOME SCREEN",
@Simba-97
Simba-97 / mongodb_cheat_sheet.md
Created January 24, 2021 13:48 — forked from bradtraversy/mongodb_cheat_sheet.md
MongoDB Cheat Sheet

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database