flutter_screen 0.0.2

Flutter Android iOS

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 flutter_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:flutter_screen/flutter_screen.dart';

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

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

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

// Prevent screen from going into sleep mode:
FlutterScreen.keepOn(true);

//free brightness (it works only on Android):
FlutterScreen.resetBrightness();
3
likes
80
pub points
63%
popularity

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

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

karansingla120@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_screen