Add Members Screen View Model

class AddMembersScreenViewModel(snackbarHostState: SnackbarHostState, val project: <Error class: unknown class>)

The AddMembersScreenViewModel class is the support class used by the AddMembersScreen to generate the qrcode and the request to add members to the project

Author

N7ghtm4r3 - Tecknobit

Parameters

snackbarHostState

: the host to launch the snackbar messages

project

: the project where the user have to be added

See also

FetcherManagerWrapper
EquinoxViewModel

Constructors

Link copied to clipboard
constructor(snackbarHostState: SnackbarHostState, project: <Error class: unknown class>)

Properties

Link copied to clipboard

creatingQRCode -> state to manage the qrcode creating phase

Link copied to clipboard

errorDuringCreation -> state to manage an error occurred during the qrcode creating phase

Link copied to clipboard
var joiningQRCode: <Error class: unknown class>

joiningQRCode -> the created joining qrcode to share or to scan

Link copied to clipboard
lateinit var members: SnapshotStateList<Pair<String, <Error class: unknown class>>>

members -> the members list with their role

Link copied to clipboard
val project: <Error class: unknown class>
Link copied to clipboard

qrcodeCreationAccepted -> state to manage the qrcode creation

Functions

Link copied to clipboard

Function to add an empty record to the members list

Link copied to clipboard
fun addMember(index: Int, email: String, role: <Error class: unknown class>)

Function to fill the details of a member to add

Link copied to clipboard
fun addMembers()

Function to execute the request to add new members to the project and the related qrcode creation

Link copied to clipboard

Function to get the qrcode data to share

Link copied to clipboard
fun removeMember(index: Int)

Function to remove an item from a support list