wang_screen 0.0.2 copy "wang_screen: ^0.0.2" to clipboard
wang_screen: ^0.0.2 copied to clipboard

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

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);
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter, flutter_web_plugins

More

Packages that depend on wang_screen