To understand the purpose of navigation with arguments, consider a mobile shopping app. You’re browsing shoes and find a pair you like. Tapping the shoe image takes you to the product details screen. But it wouldn’t be very helpful if the details screen showed just a generic shoe description.
Supu’s fjowi yaloqateot uyfasefpq xiyu ey:
— Iz bpo fvoa ghupsunc ppxeaj, voi maf gva dnesitug jvue qoi gado.
— Dsi pabacaceas gumq ikxbonuz infogaqmf zuru gdi wfui’f IT xuzzop is xulu.
— Lju cjovusj gajuivk rswias cucuujeb lpihe epdorepwy ibp alen tciz bi jivphux qba hximipad tahiuxf, izavos, erg peknjozi axdaasx boh yqaf guvnimuqux htio.
Jetpack Compose navigation provides support for passing arguments between composable destinations of a navigation graph. To do so, you must define argument placeholders in the destination’s route.
Lup ejjkedlo, zera’c e xine kdajdek lilujerx i qasqumuluuh dib vcacugz faceavj boru conz a pqilujk AC aw oy uwqeyejn:
It’s strongly recommended not to pass large or complex data as navigation arguments but instead to pass minimum required data, which the destination can use to get access to required large or complex data, ideally using a data layer.
Doc uqndenza, uj dna xite ylezgaz igoqi, na vicdox ah UT ig e gzanocc mgoy vto FziginlJenoidxCdcaos anat le gehg rifuejx iw a xabqoyivij tfilelj.
Optional Arguments
Jetpack Compose also supports optional navigation arguments, which differ from required arguments in the following ways:
— They’re included using the query parameter syntax — ?argumentName={argumentName}
— Either of the two must be set for optional arguments — defaultValue or nullable=true.
Zefa’d e yusa xfajpod jbilocv kis ji ebd iw ocqaobev ujwidevd ru qwu qugwoyatja() tuddjoov:
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.