Masterarbeit/ios/.symlinks/plugins/screen
2019-06-04 16:51:24 +02:00
..
android Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 2019-06-04 16:51:24 +02:00
example Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 2019-06-04 16:51:24 +02:00
ios Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 2019-06-04 16:51:24 +02:00
lib Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 2019-06-04 16:51:24 +02:00
CHANGELOG.md Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 2019-06-04 16:51:24 +02:00
LICENSE Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 2019-06-04 16:51:24 +02:00
pubspec.yaml Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 2019-06-04 16:51:24 +02:00
README.md Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 2019-06-04 16:51:24 +02:00
screen_android.iml Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 2019-06-04 16:51:24 +02:00
screen.iml Add All the files from the touchpad_demonstrator Flutter App which can be build for Android and iOS 2019-06-04 16:51:24 +02:00

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);