@momo-kits/native-kits 0.157.1-skill.3 → 0.157.1-skill.6-debug
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/momo-native-kits-skills/README.md +52 -0
- package/.claude/skills/momo-native-kits-skills/SKILL.md +32 -0
- package/.claude/skills/momo-native-kits-skills/data-display/SKILL.md +42 -0
- package/.claude/skills/momo-native-kits-skills/feedback/SKILL.md +43 -0
- package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/popup.md +3 -10
- package/.claude/skills/momo-native-kits-skills/form-controls/SKILL.md +42 -0
- package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/button.md +2 -3
- package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/input.md +3 -7
- package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/radio.md +9 -9
- package/.claude/skills/momo-native-kits-skills/layout/SKILL.md +39 -0
- package/.claude/skills/momo-native-kits-skills/navigation/SKILL.md +38 -0
- package/.claude/skills/momo-native-kits-skills/output/test-report.json +12 -0
- package/.claude/skills/momo-native-kits-skills/output/validation-result.json +108 -0
- package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills}/references/constants.md +81 -6
- package/.claude/skills/momo-native-kits-skills/references/design-guidelines.md +130 -0
- package/.claude/skills/momo-native-kits-skills/references/developer/android-compose.md +29 -0
- package/.claude/skills/momo-native-kits-skills/references/developer/code-convention.md +118 -0
- package/.claude/skills/momo-native-kits-skills/references/developer/compose-multiplatform.md +29 -0
- package/.claude/skills/momo-native-kits-skills/scripts/logger.js +63 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/badge.js +32 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/bottomtab.js +19 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/button.js +32 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/card.js +32 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/checkbox.js +32 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/chip.js +59 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/divider.js +19 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/global.js +61 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/index.js +54 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/input.js +32 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/navigation.js +48 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/popup.js +45 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/radio.js +105 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/skeleton.js +20 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/snackbar.js +32 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/state.js +21 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/switch.js +45 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/text.js +19 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/tooltip.js +45 -0
- package/.claude/skills/momo-native-kits-skills/scripts/rules/trustbanner.js +22 -0
- package/.claude/skills/momo-native-kits-skills/scripts/test-on-device.sh +117 -0
- package/.claude/skills/momo-native-kits-skills/scripts/test-runner.js +167 -0
- package/.claude/skills/momo-native-kits-skills/scripts/validate-kits.js +131 -0
- package/.momo-agent.json +13 -0
- package/build.gradle.kts +11 -0
- package/compose/build.gradle.kts +180 -0
- package/compose/build.gradle.kts.backup +180 -0
- package/compose/compose.podspec +54 -0
- package/compose/src/androidMain/kotlin/vn/momo/kits/platform/Platform.android.kt +110 -0
- package/compose/src/commonMain/composeResources/font/momosignature.otf +0 -0
- package/compose/src/commonMain/composeResources/font/momotrustdisplay.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_black.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_black.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_bold.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_heavy.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_light.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_medium.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_regular.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_semibold.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_thin.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_thin.ttf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.otf +0 -0
- package/compose/src/commonMain/composeResources/font/sfprotext_ultralight.ttf +0 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/AnimationSearchInput.kt +57 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Context.kt +107 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/FloatingButton.kt +201 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Header.kt +222 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderAnimated.kt +48 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderBackground.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderDefault.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderExtended.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderRight.kt +305 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/HeaderTitle.kt +33 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/LiteScreen.kt +720 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/NavigationContainer.kt +121 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/Screen.kt +405 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/application/useHeaderSearchAnimation.kt +69 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Badge.kt +85 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeDot.kt +32 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BadgeRibbon.kt +340 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/BaselineView.kt +198 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Button.kt +357 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CheckBox.kt +94 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Chip.kt +136 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/CupertinoOverscroll.kt +543 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Divider.kt +23 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Icon.kt +76 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/IconButton.kt +148 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Image.kt +188 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Information.kt +116 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Input.kt +448 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputDropDown.kt +172 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputMoney.kt +255 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputOTP.kt +231 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputPhoneNumber.kt +233 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputSearch.kt +254 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/InputTextArea.kt +241 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +364 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationDot.kt +56 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationNumber.kt +41 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationScroll.kt +92 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PaginationWhiteDot.kt +40 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupNotify.kt +352 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/PopupPromotion.kt +103 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Radio.kt +70 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/ScaleSizeScope.kt +17 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Skeleton.kt +96 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Switch.kt +96 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tag.kt +92 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Text.kt +130 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Title.kt +214 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/Tooltip.kt +590 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/TrustBanner.kt +177 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePicker.kt +205 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerTypes.kt +29 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/DateTimePickerUtils.kt +239 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/datetimepicker/WheelPicker.kt +191 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Colors.kt +306 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Radius.kt +12 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Spacing.kt +13 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Theme.kt +185 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/const/Typography.kt +285 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Card.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Item.kt +35 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/layout/Section.kt +2 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/AutomationId.kt +59 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Clickable.kt +68 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Conditional.kt +11 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/DeprecatedModifier.kt +14 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Shadow.kt +50 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/modifier/Size.kt +51 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/BottomSheet.kt +239 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/ModalScreen.kt +119 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigation.kt +98 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +161 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +331 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/StackScreen.kt +497 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTab.kt +162 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/BottomTabBar.kt +243 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/bottomtab/CurvedContainer.kt +86 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/FloatingButton.kt +187 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/Header.kt +279 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderBackground.kt +80 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderRight.kt +306 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderTitle.kt +32 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/HeaderUser.kt +370 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/component/SnackBar.kt +132 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/platform/Platform.kt +42 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Icons.kt +1329 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Resources.kt +62 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Tracking.kt +15 -0
- package/compose/src/commonMain/kotlin/vn/momo/kits/utils/Utils.kt +88 -0
- package/compose/src/iosMain/kotlin/vn/momo/kits/platform/Platform.ios.kt +149 -0
- package/gradle/libs.versions.toml +57 -0
- package/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/gradle/wrapper/gradle-wrapper.properties +8 -0
- package/gradle.properties +26 -0
- package/gradlew +252 -0
- package/gradlew.bat +94 -0
- package/package.json +1 -1
- package/settings.gradle.kts +52 -0
- package/.claude/momo-native-kits-skill/SKILL.md +0 -51
- package/.claude/momo-native-kits-skill/evals/evals.json +0 -95
- package/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.json +0 -20
- package/.claude/momo-native-kits-skill/workspace/iteration-1/benchmark.md +0 -13
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/eval_metadata.json +0 -6
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/with_skill/outputs/ButtonExample.kt +0 -55
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-0-button/without_skill/outputs/ButtonExample.kt +0 -45
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/eval_metadata.json +0 -6
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/with_skill/outputs/InputPhoneExample.kt +0 -40
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-1-input/without_skill/outputs/InputPhoneExample.kt +0 -42
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/eval_metadata.json +0 -6
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/with_skill/outputs/BottomTabExample.kt +0 -236
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-2-bottomtab/without_skill/outputs/BottomTabExample.kt +0 -152
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/eval_metadata.json +0 -6
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/with_skill/outputs/CheckBoxExample.kt +0 -49
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-3-checkbox/without_skill/outputs/CheckBoxExample.kt +0 -123
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/eval_metadata.json +0 -6
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/with_skill/outputs/DateTimePickerExample.kt +0 -318
- package/.claude/momo-native-kits-skill/workspace/iteration-1/eval-4-datetimepicker/without_skill/outputs/DateTimePickerExample.kt +0 -330
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/with_skill/outputs/CardExample.kt +0 -124
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-card/without_skill/outputs/CardExample.kt +0 -71
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-loginform/with_skill/outputs/LoginFormExample.kt +0 -134
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-loginform/without_skill/outputs/LoginFormExample.kt +0 -199
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/with_skill/outputs/NavigationContainerExample.kt +0 -224
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-navcontainer/without_skill/outputs/NavigationContainerExample.kt +0 -225
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/with_skill/outputs/PopupExample.kt +0 -79
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-popup/without_skill/outputs/PopupExample.kt +0 -169
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/eval_metadata.json +0 -6
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/with_skill/outputs/SetOptionsExample.kt +0 -255
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-setoptions/without_skill/outputs/SetOptionsExample.kt +0 -212
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/with_skill/outputs/SkeletonExample.kt +0 -199
- package/.claude/momo-native-kits-skill/workspace/iteration-2/eval-skeleton/without_skill/outputs/SkeletonExample.kt +0 -229
- package/.claude/momo-native-kits-skill/workspace/iteration-3/benchmark.json +0 -20
- package/.claude/momo-native-kits-skill/workspace/iteration-3/benchmark.md +0 -13
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/eval_metadata.json +0 -22
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill/outputs/PrimaryButtonExample.kt +0 -38
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/with_skill/timing.json +0 -5
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill/outputs/PrimaryButtonExample.kt +0 -83
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-button/without_skill/timing.json +0 -5
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/eval_metadata.json +0 -22
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill/outputs/NavigationContainerExample.kt +0 -547
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/with_skill/timing.json +0 -5
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill/outputs/MoMoNavigationContainer.kt +0 -519
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-navcontainer/without_skill/timing.json +0 -5
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/eval_metadata.json +0 -27
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill/outputs/SetOptionsExample.kt +0 -429
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/with_skill/timing.json +0 -5
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill/outputs/SetOptionsExample.kt +0 -353
- package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/without_skill/timing.json +0 -5
- package/.claude/settings.local.json +0 -41
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/badge.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/chip.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/skeleton.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/data-display}/references/text.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/snackbar.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/tooltip.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/feedback}/references/trustbanner.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/checkbox.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/form-controls}/references/switch.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/layout}/references/card.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/layout}/references/divider.md +0 -0
- /package/.claude/{momo-native-kits-skill → skills/momo-native-kits-skills/navigation}/references/navigation.md +0 -0
|
@@ -1,519 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* MoMo App NavigationContainer Implementation
|
|
3
|
-
* Best practices for implementing navigation container in MoMo native Android app
|
|
4
|
-
*
|
|
5
|
-
* This file demonstrates the correct pattern for implementing NavigationContainer
|
|
6
|
-
* in a MoMo-style mobile application using Jetpack Navigation and Compose.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
package com.momo.navigation
|
|
10
|
-
|
|
11
|
-
import android.content.Context
|
|
12
|
-
import android.os.Bundle
|
|
13
|
-
import androidx.compose.foundation.layout.Box
|
|
14
|
-
import androidx.compose.foundation.layout.fillMaxSize
|
|
15
|
-
import androidx.compose.foundation.layout.padding
|
|
16
|
-
import androidx.compose.material3.Scaffold
|
|
17
|
-
import androidx.compose.runtime.Composable
|
|
18
|
-
import androidx.compose.runtime.CompositionLocalProvider
|
|
19
|
-
import androidx.compose.runtime.LaunchedEffect
|
|
20
|
-
import androidx.compose.runtime.collectAsState
|
|
21
|
-
import androidx.compose.runtime.getValue
|
|
22
|
-
import androidx.compose.runtime.mutableStateOf
|
|
23
|
-
import androidx.compose.runtime.remember
|
|
24
|
-
import androidx.compose.runtime.setValue
|
|
25
|
-
import androidx.compose.ui.Modifier
|
|
26
|
-
import androidx.fragment.app.FragmentActivity
|
|
27
|
-
import androidx.lifecycle.Lifecycle
|
|
28
|
-
import androidx.lifecycle.LifecycleEventObserver
|
|
29
|
-
import androidx.lifecycle.compose.LocalLifecycleOwner
|
|
30
|
-
import androidx.navigation.NavBackStackEntry
|
|
31
|
-
import androidx.navigation.NavDestination
|
|
32
|
-
import androidx.navigation.NavGraph
|
|
33
|
-
import androidx.navigation.NavHostController
|
|
34
|
-
import androidx.navigation.compose.NavHost
|
|
35
|
-
import androidx.navigation.compose.composable
|
|
36
|
-
import androidx.navigation.compose.currentBackStackEntryAsState
|
|
37
|
-
import androidx.navigation.compose.rememberNavController
|
|
38
|
-
import kotlinx.coroutines.flow.MutableStateFlow
|
|
39
|
-
import kotlinx.coroutines.flow.StateFlow
|
|
40
|
-
import kotlinx.coroutines.flow.asStateFlow
|
|
41
|
-
|
|
42
|
-
// ============================================================================
|
|
43
|
-
// NavigationContainer Configuration
|
|
44
|
-
// ============================================================================
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* NavigationContainer configuration for MoMo app
|
|
48
|
-
* Contains all navigation-related configuration settings
|
|
49
|
-
*/
|
|
50
|
-
data class NavigationContainerConfig(
|
|
51
|
-
val startDestination: String = "home",
|
|
52
|
-
val showBottomBar: Boolean = true,
|
|
53
|
-
val enableDeepLinks: Boolean = true,
|
|
54
|
-
val animationDuration: Int = 300
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
// ============================================================================
|
|
58
|
-
// Navigation Routes
|
|
59
|
-
// ============================================================================
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Sealed class representing all navigation routes in MoMo app
|
|
63
|
-
* Provides type-safe navigation throughout the app
|
|
64
|
-
*/
|
|
65
|
-
sealed class MoMoRoute(val route: String) {
|
|
66
|
-
// Main tabs
|
|
67
|
-
data object Home : MoMoRoute("home")
|
|
68
|
-
data object Wallet : MoMoRoute("wallet")
|
|
69
|
-
data object QRPay : MoMoRoute("qr_pay")
|
|
70
|
-
data object History : MoMoRoute("history")
|
|
71
|
-
data object Profile : MoMoRoute("profile")
|
|
72
|
-
|
|
73
|
-
// Detail screens
|
|
74
|
-
data object Transfer : MoMoRoute("transfer")
|
|
75
|
-
data object Payment : MoMoRoute("payment")
|
|
76
|
-
data object TopUp : MoMoRoute("top_up")
|
|
77
|
-
data object FinancialService : MoMoRoute("financial_service")
|
|
78
|
-
|
|
79
|
-
// Auth screens
|
|
80
|
-
data object Login : MoMoRoute("login")
|
|
81
|
-
data object OTPVerification : MoMoRoute("otp_verification")
|
|
82
|
-
data object BiometricSetup : MoMoRoute("biometric_setup")
|
|
83
|
-
|
|
84
|
-
// Feature screens
|
|
85
|
-
data object Game : MoMoRoute("game")
|
|
86
|
-
data object Entertainment : MoMoRoute("entertainment")
|
|
87
|
-
data object Insurance : MoMoRoute("insurance")
|
|
88
|
-
data object Savings : MoMoRoute("savings")
|
|
89
|
-
|
|
90
|
-
companion object {
|
|
91
|
-
const val ARG_TRANSACTION_ID = "transactionId"
|
|
92
|
-
const val ARG_SERVICE_ID = "serviceId"
|
|
93
|
-
const val ARG_AMOUNT = "amount"
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// ============================================================================
|
|
98
|
-
// Navigation State
|
|
99
|
-
// ============================================================================
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Navigation state holder for managing navigation state across the app
|
|
103
|
-
* Follows unidirectional data flow pattern
|
|
104
|
-
*/
|
|
105
|
-
class NavigationState(
|
|
106
|
-
private val navController: NavHostController
|
|
107
|
-
) {
|
|
108
|
-
private val _currentRoute = MutableStateFlow<String?>(null)
|
|
109
|
-
val currentRoute: StateFlow<String?> = _currentRoute.asStateFlow()
|
|
110
|
-
|
|
111
|
-
private val _isLoading = MutableStateFlow(false)
|
|
112
|
-
val isLoading: StateFlow<Boolean> = _isLoading.asStateFlow()
|
|
113
|
-
|
|
114
|
-
private val _deepLinkHandled = MutableStateFlow(false)
|
|
115
|
-
val deepLinkHandled: StateFlow<Boolean> = _deepLinkHandled.asStateFlow()
|
|
116
|
-
|
|
117
|
-
init {
|
|
118
|
-
navController.addOnDestinationChangedListener { _, destination, _ ->
|
|
119
|
-
_currentRoute.value = destination.route
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
fun navigate(route: String, args: Bundle? = null) {
|
|
124
|
-
_isLoading.value = true
|
|
125
|
-
navController.navigate(route) {
|
|
126
|
-
launchSingleTop = true
|
|
127
|
-
restoreState = true
|
|
128
|
-
popUpTo(navController.graph.startDestinationId) {
|
|
129
|
-
saveState = true
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
_isLoading.value = false
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
fun navigateAndClearStack(route: String) {
|
|
136
|
-
navController.navigate(route) {
|
|
137
|
-
popUpTo(0) { inclusive = true }
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
fun popBackStack(): Boolean = navController.popBackStack()
|
|
142
|
-
|
|
143
|
-
fun popBackStack(destinationId: String, inclusive: Boolean = false) {
|
|
144
|
-
navController.popBackStack(destinationId, inclusive)
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
fun handleDeepLink(uri: android.net.Uri) {
|
|
148
|
-
navController.handleDeepLink(uri)
|
|
149
|
-
_deepLinkHandled.value = true
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
// ============================================================================
|
|
154
|
-
// NavigationContainer Implementation
|
|
155
|
-
// ============================================================================
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* MoMoNavigationContainer - Main navigation container for MoMo app
|
|
159
|
-
*
|
|
160
|
-
* This is the correct pattern for implementing NavigationContainer in MoMo app:
|
|
161
|
-
* - Wraps all navigation functionality
|
|
162
|
-
* - Provides consistent navigation state management
|
|
163
|
-
* - Handles bottom navigation visibility
|
|
164
|
-
* - Supports deep linking
|
|
165
|
-
* - Integrates with MoMo's theming and authentication
|
|
166
|
-
*
|
|
167
|
-
* @param config NavigationContainer configuration
|
|
168
|
-
* @param content The main content composable
|
|
169
|
-
*/
|
|
170
|
-
@Composable
|
|
171
|
-
fun MoMoNavigationContainer(
|
|
172
|
-
config: NavigationContainerConfig = NavigationContainerConfig(),
|
|
173
|
-
content: @Composable (NavigationState) -> Unit
|
|
174
|
-
) {
|
|
175
|
-
val navController = rememberNavController()
|
|
176
|
-
val navigationState = remember(navController) { NavigationState(navController) }
|
|
177
|
-
|
|
178
|
-
// Track current destination for bottom bar visibility
|
|
179
|
-
val navBackStackEntry by navController.currentBackStackEntryAsState()
|
|
180
|
-
val currentDestination = navBackStackEntry?.destination
|
|
181
|
-
|
|
182
|
-
// Determine if bottom bar should be shown
|
|
183
|
-
val shouldShowBottomBar = remember(currentDestination) {
|
|
184
|
-
config.showBottomBar && currentDestination?.route in getBottomBarRoutes()
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
// Handle lifecycle events for navigation state persistence
|
|
188
|
-
val lifecycleOwner = LocalLifecycleOwner.current
|
|
189
|
-
LaunchedEffect(lifecycleOwner) {
|
|
190
|
-
lifecycleOwner.lifecycle.addObserver(LifecycleEventObserver { _, event ->
|
|
191
|
-
when (event) {
|
|
192
|
-
Lifecycle.Event.ON_RESUME -> {
|
|
193
|
-
// Restore navigation state if needed
|
|
194
|
-
}
|
|
195
|
-
Lifecycle.Event.ON_PAUSE -> {
|
|
196
|
-
// Save navigation state if needed
|
|
197
|
-
}
|
|
198
|
-
else -> {}
|
|
199
|
-
}
|
|
200
|
-
})
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
// Main scaffold with bottom navigation
|
|
204
|
-
Scaffold(
|
|
205
|
-
bottomBar = {
|
|
206
|
-
if (shouldShowBottomBar) {
|
|
207
|
-
MoMoBottomNavigation(
|
|
208
|
-
currentRoute = currentDestination?.route,
|
|
209
|
-
onNavigate = { route ->
|
|
210
|
-
navigationState.navigate(route)
|
|
211
|
-
}
|
|
212
|
-
)
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
) { paddingValues ->
|
|
216
|
-
Box(
|
|
217
|
-
modifier = Modifier
|
|
218
|
-
.fillMaxSize()
|
|
219
|
-
.padding(paddingValues)
|
|
220
|
-
) {
|
|
221
|
-
// Navigation host
|
|
222
|
-
MoMoNavHost(
|
|
223
|
-
navController = navController,
|
|
224
|
-
startDestination = config.startDestination
|
|
225
|
-
)
|
|
226
|
-
|
|
227
|
-
// Main content overlay
|
|
228
|
-
content(navigationState)
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Internal NavHost configuration
|
|
235
|
-
*/
|
|
236
|
-
@Composable
|
|
237
|
-
private fun MoMoNavHost(
|
|
238
|
-
navController: NavHostController,
|
|
239
|
-
startDestination: String
|
|
240
|
-
) {
|
|
241
|
-
NavHost(
|
|
242
|
-
navController = navController,
|
|
243
|
-
startDestination = startDestination
|
|
244
|
-
) {
|
|
245
|
-
// Main tab destinations
|
|
246
|
-
composable(MoMoRoute.Home.route) {
|
|
247
|
-
HomeScreen(
|
|
248
|
-
onNavigateToTransfer = { navController.navigate(MoMoRoute.Transfer.route) },
|
|
249
|
-
onNavigateToPayment = { navController.navigate(MoMoRoute.Payment.route) },
|
|
250
|
-
onNavigateToTopUp = { navController.navigate(MoMoRoute.TopUp.route) }
|
|
251
|
-
)
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
composable(MoMoRoute.Wallet.route) {
|
|
255
|
-
WalletScreen(
|
|
256
|
-
onNavigateToTopUp = { navController.navigate(MoMoRoute.TopUp.route) },
|
|
257
|
-
onNavigateToTransfer = { navController.navigate(MoMoRoute.Transfer.route) }
|
|
258
|
-
)
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
composable(MoMoRoute.QRPay.route) {
|
|
262
|
-
QRPayScreen()
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
composable(MoMoRoute.History.route) {
|
|
266
|
-
HistoryScreen(
|
|
267
|
-
onNavigateToDetail = { transactionId ->
|
|
268
|
-
navController.navigate("transaction_detail/$transactionId")
|
|
269
|
-
}
|
|
270
|
-
)
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
composable(MoMoRoute.Profile.route) {
|
|
274
|
-
ProfileScreen(
|
|
275
|
-
onNavigateToSettings = { /* Navigate to settings */ },
|
|
276
|
-
onNavigateToSecurity = { /* Navigate to security */ }
|
|
277
|
-
)
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
// Feature destinations
|
|
281
|
-
composable(MoMoRoute.Transfer.route) {
|
|
282
|
-
TransferScreen(
|
|
283
|
-
onComplete = { navController.popBackStack() },
|
|
284
|
-
onError = { /* Handle error */ }
|
|
285
|
-
)
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
composable(MoMoRoute.Payment.route) {
|
|
289
|
-
PaymentScreen(
|
|
290
|
-
onComplete = { navController.popBackStack() }
|
|
291
|
-
)
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
composable(MoMoRoute.TopUp.route) {
|
|
295
|
-
TopUpScreen(
|
|
296
|
-
onComplete = { navController.popBackStack() }
|
|
297
|
-
)
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
composable(MoMoRoute.FinancialService.route) {
|
|
301
|
-
FinancialServiceScreen()
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
// Auth destinations
|
|
305
|
-
composable(MoMoRoute.Login.route) {
|
|
306
|
-
LoginScreen(
|
|
307
|
-
onLoginSuccess = {
|
|
308
|
-
navController.navigate(MoMoRoute.Home.route) {
|
|
309
|
-
popUpTo(MoMoRoute.Login.route) { inclusive = true }
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
onOTPRequested = { phone ->
|
|
313
|
-
navController.navigate("${MoMoRoute.OTPVerification.route}?phone=$phone")
|
|
314
|
-
}
|
|
315
|
-
)
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
composable(
|
|
319
|
-
route = "${MoMoRoute.OTPVerification.route}?phone={phone}",
|
|
320
|
-
arguments = listOf(
|
|
321
|
-
androidx.navigation.navArgument("phone") {
|
|
322
|
-
type = androidx.navigation.NavType.StringType
|
|
323
|
-
defaultValue = ""
|
|
324
|
-
}
|
|
325
|
-
)
|
|
326
|
-
) { backStackEntry ->
|
|
327
|
-
val phone = backStackEntry.arguments?.getString("phone") ?: ""
|
|
328
|
-
OTPVerificationScreen(
|
|
329
|
-
phone = phone,
|
|
330
|
-
onVerified = {
|
|
331
|
-
navController.navigate(MoMoRoute.Home.route) {
|
|
332
|
-
popUpTo(0) { inclusive = true }
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
)
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
// Additional screens can be added here
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
// ============================================================================
|
|
343
|
-
// Bottom Navigation
|
|
344
|
-
// ============================================================================
|
|
345
|
-
|
|
346
|
-
/**
|
|
347
|
-
* Returns list of routes that should show bottom navigation bar
|
|
348
|
-
*/
|
|
349
|
-
private fun getBottomBarRoutes(): List<String> = listOf(
|
|
350
|
-
MoMoRoute.Home.route,
|
|
351
|
-
MoMoRoute.Wallet.route,
|
|
352
|
-
MoMoRoute.QRPay.route,
|
|
353
|
-
MoMoRoute.History.route,
|
|
354
|
-
MoMoRoute.Profile.route
|
|
355
|
-
)
|
|
356
|
-
|
|
357
|
-
/**
|
|
358
|
-
* MoMo bottom navigation bar component
|
|
359
|
-
*/
|
|
360
|
-
@Composable
|
|
361
|
-
private fun MoMoBottomNavigation(
|
|
362
|
-
currentRoute: String?,
|
|
363
|
-
onNavigate: (String) -> Unit
|
|
364
|
-
) {
|
|
365
|
-
val items = listOf(
|
|
366
|
-
BottomNavItem(MoMoRoute.Home.route, "Home", "ic_home"),
|
|
367
|
-
BottomNavItem(MoMoRoute.Wallet.route, "Wallet", "ic_wallet"),
|
|
368
|
-
BottomNavItem(MoMoRoute.QRPay.route, "QR", "ic_qr"),
|
|
369
|
-
BottomNavItem(MoMoRoute.History.route, "History", "ic_history"),
|
|
370
|
-
BottomNavItem(MoMoRoute.Profile.route, "Profile", "ic_profile")
|
|
371
|
-
)
|
|
372
|
-
|
|
373
|
-
// Use MoMo's actual bottom navigation composable here
|
|
374
|
-
// This is a simplified version showing the pattern
|
|
375
|
-
androidx.compose.material3.BottomNavigation {
|
|
376
|
-
items.forEach { item ->
|
|
377
|
-
androidx.compose.material3.BottomNavigationItem(
|
|
378
|
-
icon = { /* Load icon based on item.iconRes */ },
|
|
379
|
-
label = { androidx.compose.material3.Text(item.label) },
|
|
380
|
-
selected = currentRoute == item.route,
|
|
381
|
-
onClick = { onNavigate(item.route) }
|
|
382
|
-
)
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
private data class BottomNavItem(
|
|
388
|
-
val route: String,
|
|
389
|
-
val label: String,
|
|
390
|
-
val iconRes: String
|
|
391
|
-
)
|
|
392
|
-
|
|
393
|
-
// ============================================================================
|
|
394
|
-
// Screen Placeholders
|
|
395
|
-
// ============================================================================
|
|
396
|
-
|
|
397
|
-
// These would be replaced with actual MoMo screen implementations
|
|
398
|
-
|
|
399
|
-
@Composable
|
|
400
|
-
private fun HomeScreen(
|
|
401
|
-
onNavigateToTransfer: () -> Unit,
|
|
402
|
-
onNavigateToPayment: () -> Unit,
|
|
403
|
-
onNavigateToTopUp: () -> Unit
|
|
404
|
-
) {
|
|
405
|
-
Box(modifier = Modifier.fillMaxSize()) {
|
|
406
|
-
// Home screen content
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
@Composable
|
|
411
|
-
private fun WalletScreen(
|
|
412
|
-
onNavigateToTopUp: () -> Unit,
|
|
413
|
-
onNavigateToTransfer: () -> Unit
|
|
414
|
-
) {
|
|
415
|
-
Box(modifier = Modifier.fillMaxSize())
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
@Composable
|
|
419
|
-
private fun QRPayScreen() {
|
|
420
|
-
Box(modifier = Modifier.fillMaxSize())
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
@Composable
|
|
424
|
-
private fun HistoryScreen(
|
|
425
|
-
onNavigateToDetail: (String) -> Unit
|
|
426
|
-
) {
|
|
427
|
-
Box(modifier = Modifier.fillMaxSize())
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
@Composable
|
|
431
|
-
private fun ProfileScreen(
|
|
432
|
-
onNavigateToSettings: () -> Unit,
|
|
433
|
-
onNavigateToSecurity: () -> Unit
|
|
434
|
-
) {
|
|
435
|
-
Box(modifier = Modifier.fillMaxSize())
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
@Composable
|
|
439
|
-
private fun TransferScreen(
|
|
440
|
-
onComplete: () -> Unit,
|
|
441
|
-
onError: (String) -> Unit
|
|
442
|
-
) {
|
|
443
|
-
Box(modifier = Modifier.fillMaxSize())
|
|
444
|
-
}
|
|
445
|
-
|
|
446
|
-
@Composable
|
|
447
|
-
private fun PaymentScreen(onComplete: () -> Unit) {
|
|
448
|
-
Box(modifier = Modifier.fillMaxSize())
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
@Composable
|
|
452
|
-
private fun TopUpScreen(onComplete: () -> Unit) {
|
|
453
|
-
Box(modifier = Modifier.fillMaxSize())
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
@Composable
|
|
457
|
-
private fun FinancialServiceScreen() {
|
|
458
|
-
Box(modifier = Modifier.fillMaxSize())
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
@Composable
|
|
462
|
-
private fun LoginScreen(
|
|
463
|
-
onLoginSuccess: () -> Unit,
|
|
464
|
-
onOTPRequested: (String) -> Unit
|
|
465
|
-
) {
|
|
466
|
-
Box(modifier = Modifier.fillMaxSize())
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
@Composable
|
|
470
|
-
private fun OTPVerificationScreen(
|
|
471
|
-
phone: String,
|
|
472
|
-
onVerified: () -> Unit
|
|
473
|
-
) {
|
|
474
|
-
Box(modifier = Modifier.fillMaxSize())
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
// ============================================================================
|
|
478
|
-
// Usage Example
|
|
479
|
-
// ============================================================================
|
|
480
|
-
|
|
481
|
-
/**
|
|
482
|
-
* Example of how to use MoMoNavigationContainer in your Activity
|
|
483
|
-
*
|
|
484
|
-
* ```kotlin
|
|
485
|
-
* class MainActivity : FragmentActivity() {
|
|
486
|
-
* override fun onCreate(savedInstanceState: Bundle?) {
|
|
487
|
-
* super.onCreate(savedInstanceState)
|
|
488
|
-
* setContent {
|
|
489
|
-
* MoMoNavigationContainer(
|
|
490
|
-
* config = NavigationContainerConfig(
|
|
491
|
-
* startDestination = MoMoRoute.Home.route,
|
|
492
|
-
* showBottomBar = true,
|
|
493
|
-
* enableDeepLinks = true
|
|
494
|
-
* )
|
|
495
|
-
* ) { navigationState ->
|
|
496
|
-
* // Optional: Handle navigation state from parent
|
|
497
|
-
* // This could be used for analytics, error handling, etc.
|
|
498
|
-
* }
|
|
499
|
-
* }
|
|
500
|
-
* }
|
|
501
|
-
*
|
|
502
|
-
* override fun onNewIntent(intent: android.content.Intent) {
|
|
503
|
-
* super.onNewIntent(intent)
|
|
504
|
-
* // Handle deep links
|
|
505
|
-
* intent.data?.let { uri ->
|
|
506
|
-
* // Navigate using navigationState.handleDeepLink(uri)
|
|
507
|
-
* }
|
|
508
|
-
* }
|
|
509
|
-
* }
|
|
510
|
-
* ```
|
|
511
|
-
*
|
|
512
|
-
* Key patterns demonstrated:
|
|
513
|
-
* 1. Type-safe navigation with sealed class routes
|
|
514
|
-
* 2. Centralized navigation state management
|
|
515
|
-
* 3. Lifecycle-aware navigation handling
|
|
516
|
-
* 4. Deep link support
|
|
517
|
-
* 5. Bottom navigation visibility control
|
|
518
|
-
* 6. Navigation state persistence across configuration changes
|
|
519
|
-
*/
|
package/.claude/momo-native-kits-skill/workspace/iteration-3/eval-setoptions/eval_metadata.json
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"eval_id": 1,
|
|
3
|
-
"eval_name": "navigation-setoptions",
|
|
4
|
-
"prompt": "How to use setOptions in MoMo navigation? Show me how to change header title dynamically",
|
|
5
|
-
"assertions": [
|
|
6
|
-
{
|
|
7
|
-
"text": "Uses LocalNavigation.current",
|
|
8
|
-
"passed": true,
|
|
9
|
-
"evidence": "val navigation = LocalNavigation.current"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"text": "Uses LaunchedEffect(Unit)",
|
|
13
|
-
"passed": true,
|
|
14
|
-
"evidence": "LaunchedEffect(Unit) { ... }"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"text": "Uses setOptions method",
|
|
18
|
-
"passed": true,
|
|
19
|
-
"evidence": "navigation.setOptions(...)"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"text": "Uses HeaderTitle",
|
|
23
|
-
"passed": true,
|
|
24
|
-
"evidence": "headerTitle = HeaderTitle.Default(...)"
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
}
|