Metadata-Version: 2.4
Name: flet-flashlight
Version: 1.0.2
Summary: Control device torch/flashlight from Flet apps.
Author-email: Flet contributors <hello@flet.dev>
License-Expression: Apache-2.0
Project-URL: Homepage, https://flet.dev
Project-URL: Documentation, https://flet.dev/docs/services/flashlight
Project-URL: Repository, https://github.com/flet-dev/flet/tree/main/sdk/python/packages/flet-flashlight
Project-URL: Issues, https://github.com/flet-dev/flet/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: flet==1.0.2
Dynamic: license-file

# flet-flashlight

[![pypi](https://img.shields.io/pypi/v/flet-flashlight.svg)](https://pypi.python.org/pypi/flet-flashlight)
[![downloads](https://static.pepy.tech/badge/flet-flashlight/month)](https://pepy.tech/project/flet-flashlight)
[![python](https://img.shields.io/badge/python-%3E%3D3.10-%2334D058)](https://pypi.org/project/flet-flashlight)
[![docstring coverage](https://flet.dev/docs/assets/badges/docs-coverage/flet-flashlight.svg)](https://flet.dev/docs/assets/badges/docs-coverage/flet-flashlight.svg)
[![license](https://img.shields.io/badge/License-Apache_2.0-green.svg)](https://github.com/flet-dev/flet/blob/main/sdk/python/packages/flet-flashlight/LICENSE)

A [Flet](https://flet.dev) extension to manage the device torch/flashlight.

> **[Try Flet online in Flet Studio](https://studio.flet.dev)**
>
> Prototype your Flet app interface in the browser, then add flashlight control and test on your device. Write your own Python code or get help from the AI agent.

It is based on the [flashlight](https://pub.dev/packages/flashlight) Flutter package.

> **Important:** Add `Flashlight` instances to `page.services` before calling toggle or other methods.

## Documentation

Detailed documentation to this package can be found [here](https://flet.dev/docs/services/flashlight/).

## Platform Support

| Platform | Windows | macOS | Linux | iOS | Android | Web |
|----------|---------|-------|-------|-----|---------|-----|
| Supported|    ❌    |   ❌   |   ❌   |  ✅  |    ✅    |  ❌  |

## Usage

### Installation

To install the `flet-flashlight` package and add it to your project dependencies:

- Using `uv`:
    ```bash
    uv add flet-flashlight
    ```

- Using `pip`:
    ```bash
    pip install flet-flashlight
    ```
    After this, you will have to manually add this package to your `requirements.txt` or `pyproject.toml`.

### Examples

For examples, see [these](https://github.com/flet-dev/flet/tree/main/sdk/python/examples/extensions/flashlight).
