flutter_screen_wake 1.0.2 copy "flutter_screen_wake: ^1.0.2" to clipboard
flutter_screen_wake: ^1.0.2 copied to clipboard

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

Flutter Screen Wake #

Plugin is Null Safety`

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

Usage #

To use this plugin, add flutter_screen_wake 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:flutter_screen_wake/flutter_screen_wake.dart';

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

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

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

// Prevent screen from going into sleep mode:
FlutterScreenWake.keepOn(true);
28
likes
120
pub points
91%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_screen_wake