Created
September 6, 2022 14:35
-
-
Save GibsonRuitiari/de8363b0ef5cd5dc366bb4b3d42d48af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.ciru.practice | |
import androidx.compose.runtime.Stable | |
/** | |
* I have annotated the class with [@Stable] marker to enforce equality contract needed | |
* by compose compiler. This is a bit advanced but when you do get time, do look at the jetpack compose compiler docs | |
* This class holds data needed by your composables, it is good practice to scope your data into a data class instead | |
* of using primitive types (string, char, etc) with StateFlow | |
*/ | |
@Stable | |
data class LoginData(val email:String,val username:String,val password:String){ | |
companion object{ | |
val EMPTY= LoginData("","","") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment