摘要:
@OptIn(ExperimentalMaterial3Api::class) @Composable fun DemoFun() { var scope = rememberCoroutineScope() var snackbarHostState = remember { SnackbarHo 阅读全文
摘要:
val colorScheme = when { dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { val context = LocalContext.current if (darkTheme) dynamic 阅读全文
摘要:
开发应用时遇到一个需求:无论处于哪个页面,按返回键时都弹出退出应用的提示。 我用了 BackHandler 处理返回事件,发现只有处于主页时才可触发回调,于是思考应该是导航相关的问题。 翻阅谷歌开发文档,看到了以下内容: // Pop everything up to the "home" dest 阅读全文