Each time, I need to create a composable function, I do:
Right click on a package -> New -> Kotlin Class/File
And I end up with this:
class MyClass {}
Now I have to do three changes manually:
- Add
@Composable
annotation - Change
class
withfun
- Create the
constructor
And this is really annoying. But this is the result:
@Composable
fun MyClass(
//Add arguments
) {
//Add logic
}
How can I do this operation quicker? Is there any shortcut in Android Studio? I couldn't find anything in the menu.