-
-
Save saqib-github-commits/a70e5ea4196c051996c31c0abdfe6d53 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Composable | |
fun CustomAppBar(drawerState: DrawerState?, title: String) { | |
val coroutineScope = rememberCoroutineScope() | |
CenterAlignedTopAppBar( | |
navigationIcon = { | |
if (drawerState != null) { | |
IconButton(onClick = { | |
coroutineScope.launch { | |
drawerState.open() | |
} | |
}) { | |
Icon(Icons.Filled.Menu, contentDescription = "") | |
} | |
} | |
}, | |
title = { Text(text = title) } | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment