package Ġcom . ak in ci . gym ber compose . ui . components Ċ Ċ import Ġandroidx . compose . foundation . layout . Box Ċ import Ġandroidx . compose . runtime . Composable Ċ import Ġandroidx . compose . runtime . collect As State Ċ import Ġandroidx . compose . runtime . getValue Ċ import Ġandroidx . compose . ui . Modifier Ċ import Ġandroidx . h ilt . navigation . compose . h ilt ViewModel Ċ import Ġcom . ak in ci . gym ber compose . common . network . Network State Ċ import Ġcom . ak in ci . gym ber compose . common . network . Network State ViewModel Ċ Ċ @ Composable Ċ fun ĠNetwork Dependent Screen ( ĊĠĠĠ Ġmodifier : ĠModifier Ġ= ĠModifier , ĊĠĠĠ Ġretry Action : Ġ() Ġ-> ĠUnit , ĊĠĠĠ Ġnetwork State ViewModel : ĠNetwork State ViewModel Ġ= Ġh ilt ViewModel (), ĊĠĠĠ Ġcontent : Ġ@ Composable Ġ() Ġ-> ĠUnit Ċ ) Ġ{ ĊĠĠĠ Ġval Ġnetwork State Ġby Ġnetwork State ViewModel . network State . collect As State ( initial Ġ= ĠNetwork State . None ) ĊĊĠĠĠ ĠBox ( modifier Ġ= Ġmodifier ){ ĊĠĠĠĠĠĠĠ ĠOff line Dialog ( network State Ġ= Ġnetwork State ) Ġ{ Ġretry Action () Ġ} ĊĠĠĠĠĠĠĠ Ġcontent () ĊĠĠĠ Ġ} Ċ }