EduskuntaViewModel

class EduskuntaViewModel(repository: MemberRepository, noteRepository: NoteRepository) : <ERROR CLASS> ERROR CLASS: Symbol not found for ViewModel

View model for the Eduskunta app.

Parameters

repository

The repository to use for the view model.

noteRepository

The repository to use for the notes.

Constructors

Link copied to clipboard
constructor(repository: MemberRepository, noteRepository: NoteRepository)

Types

Link copied to clipboard
object Companion

Factory for creating EduskuntaViewModel.

Properties

Link copied to clipboard
val members: ERROR CLASS: Symbol not found for StateFlow<kotlin/collections/List<com/example/eduskunta/data/db/entities/MemberEntity>>

State flow of the members.

Link copied to clipboard
val notes: ERROR CLASS: Symbol not found for StateFlow<kotlin/collections/List<com/example/eduskunta/data/db/entities/NoteEntity>>

State flow of the notes.

Functions

Link copied to clipboard
fun addNote(personNumber: Int, text: String, positive: Boolean)

Add a note for a member.

Link copied to clipboard
fun getMember(personNumber: Int): ERROR CLASS: Symbol not found for Flow<com/example/eduskunta/data/db/entities/MemberEntity?>

Get member by personNumber from the database.

Link copied to clipboard
fun getMembersByParty(party: String): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<com/example/eduskunta/data/db/entities/MemberEntity>>

Get members by party from the database.

Link copied to clipboard
fun getNotes(personNumber: Int): ERROR CLASS: Symbol not found for Flow<kotlin/collections/List<com/example/eduskunta/data/db/entities/NoteEntity>>

Get the notes for a member.