brightness

package
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package brightness reads and sets how bright the screen is: up for a boarding pass or a QR code, down for reading in bed.

nimbus native plugin add brightness

brightness.Set(ctx, 1)
defer brightness.Reset(ctx)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context) (float64, error)

Get says how bright the screen is, from 0 to 1.

func Reset

func Reset(ctx context.Context) error

Reset goes back to how it was before Set.

func Set

func Set(ctx context.Context, level float64) error

Set changes it. On Android that lasts while your app is on screen. On iOS it changes the phone's own setting, so call Reset before you leave.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL