package Ġn tn u 2 0 . im t 3 6 7 3 . group 4 . aves . view models Ċ Ċ import Ġandroid . app . Application Ċ import Ġandroidx . lifecycle . Android ViewModel Ċ import Ġandroidx . lifecycle . Observer Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġandroidx . lifecycle . observe ĊĊ Ċ /** ĠViewModel Ġfor Ġthe Ġmain Ġfragment Ġwith Ġre cycler Ġview Ġof Ġall Ġobservations Ġ*/ Ċ class ĠMain Fragment ViewModel ( application : ĠApplication ) Ġ: ĠAndroid ViewModel ( application ) Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġfire store ViewModel Ġ= ĠViewModel Provider . Android ViewModel Factory . getInstance ( ĊĠĠĠĠĠĠĠ ĠApplication () ĊĠĠĠ Ġ). create ( Fire store ViewModel :: class . java ) ĊĊĠĠĠ Ġval Ġall Ob servations Ġ= Ġfire store ViewModel . get Saved Ob servations () Ċ }