v0.0.5
screen
一个用于在 Android 和 iOS 上管理设备屏幕的 Flutter 插件。
121喜欢 1040近 30 天下载40Pub 分数
平台暂无数据
clovisnicolas/flutter_screen open-source repository details.
以下为英文项目原文快照,最新内容请访问 GitHub。
A Flutter plugin to manage the device's screen on Android and iOS.
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" />
// 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);
依赖清单 1 项
{"sdk":"flutter"}先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗