Generates mobile screens/pages with navigation integration, state management, and platform-native UI patterns for Android (Jetpack Compose), iOS (SwiftUI), React Native, and Flutter. Use when the user asks to create a new screen, page, view, or mobile UI flow.
You are a senior mobile engineer. Generate a complete, production-quality screen for $ARGUMENTS, precisely matching the project's mobile platform and conventions.
Search for platform indicators:
Android Native (Kotlin)
build.gradle.kts or build.gradle with Android pluginAndroidManifest.xmlandroidx.compose dependenciesres/layout/*.xml filesiOS Native (Swift)
*.xcodeproj or *.xcworkspaceimport SwiftUI, struct *View: ViewUIViewController subclasses, storyboards, XIBsreact-native in package.jsonexpo in package.json, app.json with expo configFlutter
pubspec.yaml with flutter SDK dependencylib/ directory with .dart filesFind 2-3 existing screens. For each, analyze:
File structure:
PascalCase.kt, snake_case.dart, PascalCase.swift, PascalCase.tsxArchitecture pattern:
Navigation pattern:
NavHostNavigationStack/NavigationLink, UINavigationController, coordinator patternUI patterns:
LazyColumn, List, FlatList, ListView.builderDependency injection:
From $ARGUMENTS:
$0 = Screen name (e.g., UserProfile, OrderHistory, Settings)$1 = Optional screen type hint:
list — Scrollable list with items, pull-to-refresh, paginationdetail — Single entity detail view with sectionsform — Input form with validation and submissionsettings — Settings/preferences with toggles and navigation rowsauth — Login/signup with input fields, validation, OAuth buttonsdashboard — Summary view with cards, charts, quick actionsIf no type specified, infer from the screen name.
Create all files following detected patterns:
feature/screenname/
├── ScreenNameScreen.kt # @Composable screen
├── ScreenNameViewModel.kt # ViewModel with UiState
├── ScreenNameUiState.kt # Sealed interface for states
└── navigation/
└── ScreenNameNavigation.kt # NavGraphBuilder extension
Screen composable:
ViewModel via hiltViewModel() or project's DI patterncollectAsStateWithLifecycle()ViewModel:
UiState via StateFlowEvent class or function paramsviewModelScope for coroutinesFeatures/ScreenName/
├── ScreenNameView.swift # SwiftUI View
├── ScreenNameViewModel.swift # ObservableObject
└── ScreenNameModel.swift # Data models (if needed)
View:
@StateObject or @ObservedObject for ViewModelNavigationStack integration if applicable.task {} or .onAppear {} for data loadingViewModel:
@Published properties for state@MainActor for UI updatesTaskscreens/ScreenName/
├── ScreenNameScreen.tsx # Screen component
├── useScreenName.ts # Custom hook for logic
├── ScreenName.styles.ts # StyleSheet (or styled-components)
└── ScreenName.types.ts # TypeScript interfaces
Screen component:
NativeStackScreenProps or Expo Router params)SafeAreaView wrapperCustom hook:
lib/features/screen_name/
├── screen_name_screen.dart # Screen widget
├── screen_name_state.dart # State class (BLoC state / Riverpod state)
├── screen_name_controller.dart # BLoC / Controller / Notifier
└── widgets/
└── screen_name_body.dart # Extracted body widget
Screen widget:
BlocProvider/ProviderScope wrapper (per project pattern)BlocBuilder/Consumer for state renderingState management:
copyWithRegister the new screen in the navigation system:
NavHost or navigation graphNavigationStack or routerGoRouter config or navigatorPresent the navigation registration as a separate change for user approval.
any, no force unwraps unless project uses them)