Scaffold Compose Screen
Overview
Section titled “Overview”Generate a Compose screen with a main composable function, preview function, and optional ViewModel.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectDir | string | Yes | — | Absolute path to the Android project root |
screenName | string | Yes | — | Screen name (e.g., Profile creates ProfileScreen.kt) |
packageName | string | Yes | — | Package name |
module | string | No | app | Module name |
includeViewModel | boolean | No | false | Also generate a ViewModel file |
Examples
Section titled “Examples”Create a ProfileScreen composable with package com.example.myapp
Scaffold a SettingsScreen with a ViewModel
Related Tools
Section titled “Related Tools”- Scaffold Activity — Generate activities
- Scaffold Fragment — Generate fragments