v1.0.2
flutter_screen_wake
A Flutter plugin to manage the device's screen on Android and iOS.
32Likes 49130-day downloads140Pub points
AndroidiOS
erickhaendel/flutter_screen_wake open-source repository details.
English project snapshot. Visit GitHub for the latest content.
Plugin is Null Safety`
A Flutter plugin to manage the device's screen on Android and iOS.
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" />
// 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);
Dependency list 2 items
{"sdk":"flutter"}{"sdk":"flutter"}Start with your use case, compare repository activity, and check the original project before adopting it.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗