create<T extends ChangeNotifier> static method

ViewModelProvider<T> create<T extends ChangeNotifier>(
  1. T create(
    1. ViewModelRef<T> ref
    )
)

Creates a ChangeNotifierProvider with autoDispose

Implementation

static ViewModelProvider<T> create<T extends ChangeNotifier>(
  T Function(ViewModelRef<T> ref) create,
) {
  return ChangeNotifierProvider.autoDispose<T>((ref) {
    return create(ref);
  });
}