winter-androidx / io.jentz.winter.androidx / WinterViewModel

WinterViewModel

class WinterViewModel : ViewModel

A ViewModel that can hold a Graph instance and closes it onCleared.

This is intended to be used inside an io.jentz.winter.WinterApplication.InjectionAdapter to hold graphs that outlive configuration changes.

Constructors

<init>

WinterViewModel()

A ViewModel that can hold a Graph instance and closes it onCleared.

Properties

graph

var graph: Graph?

Functions

onCleared

fun onCleared(): Unit