Skip to content

Commit

Permalink
fix input coordinate screen crash (#145)
Browse files Browse the repository at this point in the history
Co-authored-by: Siddharth Agarwal <[email protected]>
  • Loading branch information
siddh1004 and Siddharth Agarwal authored Nov 9, 2023
1 parent e4b0128 commit a1232ab
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnComponentContainer
Expand All @@ -23,7 +23,7 @@ fun InputCoordinateScreen() {
Title("Input Coordinates", textColor = TextColor.OnSurfaceVariant)

SubTitle("Basic Input Coordinates ", textColor = TextColor.OnSurfaceVariant)
var coordinates by rememberSaveable { mutableStateOf<Coordinates?>(null) }
var coordinates by remember { mutableStateOf<Coordinates?>(null) }
InputCoordinate(
title = "Label",
state = InputShellState.UNFOCUSED,
Expand All @@ -38,7 +38,7 @@ fun InputCoordinateScreen() {
Spacer(Modifier.size(Spacing.Spacing18))

SubTitle("Disabled Input Coordinates without data ", textColor = TextColor.OnSurfaceVariant)
var coordinates1 by rememberSaveable {
var coordinates1 by remember {
mutableStateOf<Coordinates?>(null)
}
InputCoordinate(
Expand All @@ -54,7 +54,7 @@ fun InputCoordinateScreen() {
)

SubTitle("Disabled Input Coordinates with data ", textColor = TextColor.OnSurfaceVariant)
var coordinates2 by rememberSaveable {
var coordinates2 by remember {
mutableStateOf<Coordinates?>(Coordinates(latitude = 39.46263, longitude = -0.33617))
}
InputCoordinate(
Expand Down

0 comments on commit a1232ab

Please sign in to comment.