Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Jesus-Puertos/AppTECNMControlEscolar/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheAppNavigation composable sets up the main navigation structure for the TecNM Control Escolar app. It configures a NavHost with all app screens and integrates the bottom navigation bar.
Function Signature
Parameters
This function takes no parameters. It creates and manages its ownNavController internally.
Implementation
Navigation Graph
TheNavHost is configured with the following screens:
Registered Routes
| Route | Screen Component | Description |
|---|---|---|
home | HomeScreen() | Main home screen (start destination) |
schedule | ScheduleScreen() | Student schedule view |
map | MapScreen() | Campus map display |
profile | ProfileScreen() | User profile information |
Start Destination
The navigation graph starts atAppScreens.Home.route (“home”), making the home screen the initial screen when the app launches.
AppScreens Route Definitions
Routes are defined in theAppScreens sealed class:
Route Properties
Returns “home” - Route for the home screen
Returns “schedule” - Route for the schedule screen
Returns “map” - Route for the map screen
Returns “profile” - Route for the profile screen
Architecture
The navigation system uses the following architecture:- Sealed Class Pattern:
AppScreensuses a sealed class to define type-safe routes - Scaffold Layout: The main layout uses Material 3
Scaffoldwith a bottom bar - NavHost: Jetpack Compose Navigation’s
NavHostmanages screen navigation - Single NavController: One
NavControlleris shared betweenBottomBarandNavHost
Layout Structure
Usage Example
Adding New Routes
To add a new screen to the navigation graph:-
Add a new object to
AppScreens: -
Register the route in
AppNavigation: -
Optionally add it to the
BottomBaritems list if it should appear in bottom navigation
Source Locations
- Navigation setup:
app/src/main/java/com/example/appcontrolescolar/navigation/AppNavigation.kt - Route definitions:
app/src/main/java/com/example/appcontrolescolar/navigation/AppScreens.kt
