Search packages, repositories and app categories

Package detailsv0.0.5

screen

A Flutter plugin to manage the device's screen on Android and iOS.

30-day downloads
1K
Likes
121
Pub points
40

Install package

flutter pub add screen

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The screen package is a Flutter plugin designed to manage device screen settings on Android and iOS, enabling developers to control screen brightness, auto-brightness, and screen timeout. It provides a simple interface to interact with native screen functionalities without requiring platform-specific code. This allows for consistent behavior across platforms while offering fine-grained control over display properties. The package is useful in applications where screen management impacts user experience or battery efficiency.

Use cases

  • Adjusting screen brightness dynamically
  • Enabling/disabling auto-brightness
  • Setting screen timeout duration
  • Optimizing battery usage in kiosk mode
  • Controlling screen behavior in fullscreen apps

Key features

  • Cross-platform screen control
  • Simple API for brightness and timeout
  • Supports both Android and iOS
  • No native code required
  • Lightweight and easy to integrate

Suitable for

  • Kiosk or digital signage apps
  • Battery-sensitive applications
  • Fullscreen media players
  • Accessibility tools
  • Apps requiring screen customization

Considerations

  • Requires appropriate permissions on Android
  • Limited to basic screen settings
  • May not work in all background states
  • Behavior varies slightly between platforms
  • Not intended for system-level changes

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Screen

pub package A Flutter plugin to manage the device's screen on Android and iOS.

Usage

To use this plugin, add screen as a dependency in your pubspec.yaml file.

Make sure you add the following permissions to your Android Manifest

<uses-permission android:name="android.permission.WAKE_LOCK" />

Example

// Import package
import 'package:screen/screen.dart';

// Get the current brightness:
double brightness = await Screen.brightness;

// Set the brightness:
Screen.setBrightness(0.5);

// Check if the screen is kept on:
bool isKeptOn = await Screen.isKeptOn;

// Prevent screen from going into sleep mode:
Screen.keepOn(true);

Categories

Source repository

Projects using this package