createViewModel<T extends ViewModel> abstract method

ViewModel createViewModel<T extends ViewModel>(
  1. Object? parameter
)

Creates a view model of a specified type.

The parameter is a value that will be passed to the new viewmodel's init method. This method is usefule for creating a view model to pass to an apps starting widget.

Implementation

ViewModel createViewModel<T extends ViewModel>(Object? parameter);