package Ġcom . github . sk ro x . travel ally . ui . main screen . post trip . temp Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġcom . github . sk ro x . travel ally . data . repositories . Tri ps Repository Ċ import Ġcom . github . sk ro x . travel ally . di . Activity Scope Ċ import Ġcom . github . sk ro x . travel ally . ui . main screen . post trip . Post Trip ViewModel Ċ import Ġjavax . inject . Inject Ċ import Ġjavax . inject . Singleton Ċ @ Activity Scope Ċ @ Suppress (" UN CHECK ED _ CAST ") Ċ class ĠPost Trip ViewModel Fac o try Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġtri ps Repository : ĠTri ps Repository Ċ ) Ġ: ĠViewModel Provider . New Instance Factory () Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġ< T Ġ: ĠViewModel ?> Ġcreate ( model Class : ĠClass < T >): ĠT Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠPost Trip ViewModel ( tri ps Repository ) Ġas ĠT ĊĠĠĠ Ġ} Ċ }