Search packages, repositories and app categories

GitHub repositoryerickhaendel/flutter_screen_wake

flutter_screen_wake

erickhaendel/flutter_screen_wake open-source repository details.

flutter_screen_wake project cover
Stars
3
Forks
19
Last push (UTC)
Aug 12, 2021
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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);
Erick Haendel GitHub avatar
GitHub author

Erick Haendel ↗

FindUPRecife/PE
LanguagesDartJavaRubySwiftObjective-C

Packages published by this repository

Dependencies used

Dependency list 2 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗