Short and sweet! I just needed to remove the create function’s Class argument ignore null value safety ? and the ViewModelFactory is working.

Update 2/24/20

I’ve used the latest Lifecycle 2.2.0 release in order to add both custom parameters and Saved State to the ViewModel component.

See: Optimizing Android ViewModel with Lifecycle 2.2.0 🤖🧰

--

--

Open Sourcer

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store