-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completely migrated to type safe navigation
Handled multiple times screen navigation on tap of Home from drawer
- Loading branch information
imrannextgeni021
committed
Oct 14, 2024
1 parent
761869e
commit 25d5a26
Showing
14 changed files
with
76 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
app/src/main/java/com/starry/greenstash/ui/navigation/ScreenArgs.kt
This file was deleted.
Oops, something went wrong.
59 changes: 25 additions & 34 deletions
59
app/src/main/java/com/starry/greenstash/ui/navigation/Screens.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,36 @@ | ||
/** | ||
* MIT License | ||
* | ||
* Copyright (c) [2022 - Present] Stɑrry Shivɑm | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
package com.starry.greenstash.ui.navigation | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
package com.starry.greenstash.ui.navigation | ||
|
||
sealed class Screens(val route: String) { | ||
// Settings Screens | ||
@Serializable | ||
data class DWScreen(val goalId: String, val transactionType: String) | ||
|
||
|
||
@Serializable | ||
data class InputScreen(val goalId: String? = null) | ||
|
||
|
||
@Serializable | ||
data class GoalInfoScreen(val goalId: String) | ||
|
||
@Serializable | ||
object AboutScreen | ||
|
||
data object GoalCardStyle : Screens("goal_card_style") | ||
@Serializable | ||
object OSLScreen | ||
|
||
@Serializable | ||
object GoalCardStyleScreen | ||
|
||
data object AboutScreen : Screens("about_screen") | ||
|
||
// Goal Achieved Screen | ||
@Serializable | ||
object CongratsScreen | ||
|
||
data object OSLScreen : Screens("osl_screen") | ||
// Welcome / Onboarding Screen | ||
@Serializable | ||
object WelcomeScreen | ||
|
||
// Goal Achieved Screen | ||
|
||
data object CongratsScreen : Screens("goal_achieved_screen") | ||
|
||
// Welcome / Onboarding Screen | ||
data object WelcomeScreen : Screens("welcome_screen") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.