create property
Optional function to create the resource lazily (on first access).
When provided, the provider manages the resource's lifecycle:
- Calls
onMountafter creation if the resource implements JoltState - Calls
onUnmountand disposes the resource when unmounted or replaced
The function receives the build context and should return the resource instance. Cannot be used together with value.
Implementation
final T Function(BuildContext context)? create;