package Ġcom . example . mar vel compose . utils . extension Ċ Ċ import Ġandroidx . lifecycle . ViewModel Ċ import Ġandroidx . lifecycle . ViewModel Provider Ċ import Ġcom . example . mar vel compose . ui . Base Activity Ċ Ċ inline Ġfun Ġ< re ified ĠT Ġ: ĠViewModel > ĠBase Activity . with ViewModel ( ĊĠĠĠ Ġbody : ĠT . () Ġ-> ĠUnit Ċ ): ĠT Ġ{ ĊĠĠĠ Ġval Ġvm Ġ= ĠViewModel Provider ( this , ĠviewModel Factory )[ T :: class . java ] ĊĠĠĠ Ġvm . body () ĊĠĠĠ Ġreturn Ġvm Ċ }