Navigation 最佳实践

Type safe, multi-module best practices with Navigation Compose

了解使用 Navigation Compose 的最佳实践,以便您能以可在所有导航调用中维持类型安全的方式,在多个模块中展开导航图。

1. Define your screen as state in,events out

你的屏幕不应该在意你的数据是来自视图模型,还是只是你为单个测试创建的静态状态。它也不应该关心接收事件的对象是谁。

3. Build only the public APIs you need

4. Module structure -> Graph structure

5. Check out the Updated resources

Kotlin DSL 和 Navigation Compose 中的类型安全

NowInAndroid app: github.com/android/now...

相关推荐
百锦再39 分钟前
React编程高级主题:测试代码
android·前端·javascript·react.js·前端框架·reactjs
2501_916008892 小时前
全面介绍Fiddler、Wireshark、HttpWatch、SmartSniff和firebug抓包工具功能与使用
android·ios·小程序·https·uni-app·iphone·webview
玉梅小洋2 小时前
Windows 10 Android 构建配置指南
android·windows
Libraeking4 小时前
视觉篇:Canvas 自定义绘图与高级动画的华丽圆舞曲
android·经验分享·android jetpack
Fushize5 小时前
多模块架构下的依赖治理:如何避免 Gradle 依赖地狱
android·架构·kotlin
Jomurphys5 小时前
Kotlin - 类型别名 typealias
android·kotlin
Haha_bj5 小时前
Flutter ——flutter_screenutil 屏幕适配
android·ios
Haha_bj6 小时前
Flutter ——device_info_plus详解
android·flutter·ios
前端小伙计6 小时前
Android/Flutter 项目统一构建配置最佳实践
android·flutter
Mr_sun.7 小时前
Day09——入退管理-入住-2
android·java·开发语言