Is your feature request related to a problem? Please describe.
The problem to be solved is that update() methods can't depend on create() having been called, so they have to duplicate code snippets with create. For example:
ChangeNotifierProxyProvider<Input, Output>(
create: (context) => Output(...output's parameters...)
update: (context, Input input, Output? previous) {
previous ??= Output(...output's parameters again...);
return previous..updateWithInput(input);
}),
Describe the solution you'd like
Make previous non-nullable throughout the API and internally guarantee that create() (or .value or whatever) is called first.
Is your feature request related to a problem? Please describe.
The problem to be solved is that update() methods can't depend on create() having been called, so they have to duplicate code snippets with create. For example:
Describe the solution you'd like
Make
previousnon-nullable throughout the API and internally guarantee that create() (or .value or whatever) is called first.