brightness
La traduction de cette page manque ou n'est plus à jour : elle s'affiche en anglais. Lire en anglais
Set app-scoped screen brightness for a reader, scanner or presentation, then restore the system setting when that mode ends.
Temporarily change brightness
import { Text, brightness } from 'kuito';
brightness.level.value = 1; // a QR code, a boarding pass
<Text>{`${brightness.level.value ?? '…'}`}</Text>;
await brightness.restore();Behavior and limits
brightness.level is writable and uses the range 0–1. brightness.system reports the system value. Call restore() when the temporary mode ends; use lifecycle cleanup when a screen owns the change. A brightness override is different from keeping the screen awake.
Continue
Read Keep awake for the related workflow. The API reference lists every method, option, event and return type.
Référence
Exports 3
Méthodes, constantes et types exposés par cet espace de noms natif.
function
restoreHands brightness back to the system, as before the first write to level.valuelevelFrom 0 to 1: the app's level if it set one, otherwise the system's; null
until the platform first answers.valuesystemWhether the system controls brightness: the app hasn't set a level, or restored the system's.Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.