useThemeValue
This hook is used to get the value based on the current theme (light or dark). It takes two
arguments: lightValue
and darkValue
, and returns the value based on the current theme.
Import
Parameters
lightValue
: The value to return when the theme is light.darkValue
: The value to return when the theme is dark.
Usage
The example below shows how to use the useThemeValue
hook to get the image based on the current theme of the application. You can pass in any value that you want to change based on the theme.
Here is another example that shows how to use the useThemeValue
hook to get a component based on the current theme of the application.
Returns
The value based on the current theme.