package Ġcom . gd sc _ sn u . not ed roid Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroidx . lifecycle . Android ViewModel Ċ import Ġandroidx . lifecycle . LiveData Ċ Ċ class ĠNote ViewModel ( application : ĠApplication ) Ġ: ĠAndroid ViewModel ( application ) Ġ{ ĊĊĠĠĠ Ġval Ġall Notes : ĠLive Data < List < Note >> ĊĊĠĠĠ Ġval Ġall Important Notes : ĠLive Data < List < Note >> ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġdao Ġ= ĠNote Database . get Database ( application ). note Dao () ĊĠĠĠĠĠĠĠ Ġval Ġrepository Ġ= ĠNote Repository ( dao ) ĊĠĠĠĠĠĠĠ Ġall Notes Ġ= Ġrepository . all Notes ĊĠĠĠĠĠĠĠ Ġall Important Notes Ġ= Ġrepository . all Important Notes ĊĠĠĠ Ġ} Ċ }