Skip to content

Commit 0990899

Browse files
authored
Merge pull request #439 from Goooler/sealed-destination
Seal RallyDestination
2 parents b94f222 + c76ae71 commit 0990899

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

NavigationCodelab/app/src/main/java/com/example/compose/rally/RallyDestinations.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,30 @@ import androidx.navigation.navDeepLink
3030
* Contract for information needed on every Rally navigation destination
3131
*/
3232

33-
interface RallyDestination {
33+
sealed interface RallyDestination {
3434
val icon: ImageVector
3535
val route: String
3636
}
3737

3838
/**
3939
* Rally app navigation destinations
4040
*/
41-
object Overview : RallyDestination {
41+
data object Overview : RallyDestination {
4242
override val icon = Icons.Filled.PieChart
4343
override val route = "overview"
4444
}
4545

46-
object Accounts : RallyDestination {
46+
data object Accounts : RallyDestination {
4747
override val icon = Icons.Filled.AttachMoney
4848
override val route = "accounts"
4949
}
5050

51-
object Bills : RallyDestination {
51+
data object Bills : RallyDestination {
5252
override val icon = Icons.Filled.MoneyOff
5353
override val route = "bills"
5454
}
5555

56-
object SingleAccount : RallyDestination {
56+
data object SingleAccount : RallyDestination {
5757
// Added for simplicity, this icon will not in fact be used, as SingleAccount isn't
5858
// part of the RallyTabRow selection
5959
override val icon = Icons.Filled.Money

0 commit comments

Comments
 (0)