Compare commits

...

3 Commits

@ -22,6 +22,16 @@
<option name="translationDialogLocationY" value="567" />
<option name="translationDialogWidth" value="1381" />
<histories>
<item value="- [asReload] (false by default) can be optionally passed to tell Riverpod to clear the state before refreshing it. This is only useful for asynchronous providers, as by default, [AsyncValue] keeps a reference on state during loading states. Using [asReload] will disable this behavior and count as a &quot;hard refresh&quot;." />
<item value="As opposed to [refresh], the rebuild is not immediate and is instead delayed by an undefined amount of time. Typically, the rebuild happens at the next tick of the event loop. But if a provider is not listened to, the rebuild may be delayed until the provider is listened to again." />
<item value="If you do not care about the return value of [refresh], use [invalidate] instead. Doing so has the benefit of: - making the invalidation logic more resilient by avoiding multiple refreshes at once. - possibly avoids recomputing a provider if it isn't needed immediately. This method is useful for features like &quot;pull to refresh&quot; or &quot;retry on error&quot;, to restart a specific provider. {@endtemplate}" />
<item value="{@template riverpod.refresh} Forces a provider to re-evaluate its state immediately, and return the created value. Writing: ```dart final newValue = ref.refresh(provider); ``` is strictly identical to doing: ```dart ref.invalidate(provider); final newValue = ref.read(provider); ```" />
<item value="{@template riverpod.invalidate} Invalidates the state of the provider, destroying the state immediately and causing the provider to rebuild at some point in the future. As opposed to [refresh], the rebuild is not immediate and is instead delayed by an undefined amount of time. Typically, the rebuild happens at the next tick of the event loop. But if a provider is not listened to, the rebuild may be delayed until the provider is listened to again." />
<item value="failed" />
<item value="success" />
<item value="loading" />
<item value="before load" />
<item value="Invalidates the state of the provider, causing it to refresh. As opposed to [refresh], the refresh is not immediate and is instead delayed to the next read or next frame. Calling [invalidate] multiple times will refresh the provider only once. Calling [invalidate] will cause the provider to be disposed immediately. - [asReload] (false by default) can be optionally passed to tell Riverpod to clear the state before refreshing it. This is only useful for asynchronous providers, as by default, [AsyncValue] keeps a reference on state during loading states. Using [asReload] will disable this behavior and count as a &quot;hard refresh&quot;. If used on a provider which is not initialized, this method will have no effect." />
<item value="exclude" />
<item value="Whether the state of the provider should be maintained if it is no-longer used. Defaults to false." />
<item value="create permanent widget" />
@ -62,16 +72,6 @@
<item value="&gt; The value returned by this getter implicitly converts floating-point &gt; component values (such as `0.5`) into their 8-bit equivalent by using &gt; the [toARGB32] method; the returned value is not guaranteed to be stable &gt; across different platforms or executions due to the complexity of &gt; floating-point math." />
<item value="opacity" />
<item value="The value of the 'assets' field is expected to be a list of relative file paths. Try converting the value to be a list of relative file paths." />
<item value="The [exitType] indicates what kind of exit to perform. For [ui.AppExitType.cancelable] exits, the application is queried through a call to [handleRequestAppExit], where the application can optionally cancel the request for exit. If the [exitType] is [ui.AppExitType.required], then the application exits immediately without querying the application." />
<item value="This differs from calling `dart:io`'s [exit] function in that it gives the engine a chance to clean up resources so that it doesn't crash on exit, so calling this is always preferred over calling [exit]. It also optionally gives handlers of [handleRequestAppExit] a chance to cancel the application exit." />
<item value="Exits the application by calling the native application API method for exiting an application cleanly. This differs from calling `dart:io`'s [exit] function in that it gives the engine a chance to clean up resources so that it doesn't crash on exit, so calling this is always preferred over calling [exit]. It also optionally gives handlers of [handleRequestAppExit] a chance to cancel the application exit." />
<item value="To listen for changes in the application lifecycle state, define an [onStateChange] callback. See the [AppLifecycleState] enum for details on the various states." />
<item value="To listen for requests for the application to exit, and to decide whether or not the application should exit when requested, create an [AppLifecycleListener] and set the [onExitRequested] callback." />
<item value="A listener that can be used to listen to changes in the application lifecycle." />
<item value="A callback used to ask the application if it will allow exiting the application for cases where the exit is cancelable. Exiting the application isn't always cancelable, but when it is, this function will be called before exit occurs. Responding [AppExitResponse.exit] will continue termination, and responding [AppExitResponse.cancel] will cancel it. If termination is not canceled, the application will immediately exit." />
<item value="Gemini is a conversational experience in Android Studio that helps you be more productive by answering Android development queries. It is powered by artificial intelligence and can understand natural language, so you can ask development questions in plain English. Gemini can help Android developers generate code, find relevant resources, learn best practices, and save time. Gemini is still an early experiment, and may sometimes provide inaccurate, misleading, or false information while presenting it confidently. Gemini may give you working code that doesnt produce the expected output, or provide you with code that is not optimal or incomplete. Always double-check Geminis responses and carefully test and review code for errors, bugs, and vulnerabilities before relying on it." />
<item value="if forceQuotedString is false and the string is valid unquoted, don't use any quote" />
<item value="The quote to be used for quoting strings. Defaults to [QuoteStyle.doubleQuote], because single quotes are often used as apostrophes." />
</histories>
<option name="languageScores">
<map>

Loading…
Cancel
Save