brightness_volume_manager
A Flutter plugin to manage screen brightness and volume on Android and iOS. Also provides the custom widget for brightness and volume swipe.
This is a Flutter plugin that allows you to get and adjust the screen brightness and media volume programmatically on Android and iOS.
English project snapshot. Visit GitHub for the latest content.
A Flutter plugin to manage screen brightness and volume on Android and iOS. Also provides the custom widget for brightness and volume swipe.
Add the package to your pubspec.yaml:
brightness_volume_manager: ^latest_version
BrightnessVolumeManager().getBrightness();
BrightnessVolumeManager().setBrightness(brightness);
BrightnessVolumeManager().resetCustomBrightness();
BrightnessVolumeManager().getVolume();
BrightnessVolumeManager().setVolume(v);
BrightnessVolumeManager().isScreenKeptOn();
BrightnessVolumeManager().keepScreenOn(true);
SwipeManager(
initialValue: brightness,
onChange: (v, z) {
BrightnessVolumeManager().setBrightness(v);
},
direction: SlideDirection.vertical,
childBuilder: (ctx, value) => AnimatedSwitcher(
layoutBuilder: (Widget? currentChild,
List<Widget> previousChildren) {
return currentChild!;
},
duration: const Duration(seconds: 1),
child: Container(),
)
)
SwipeManager(
initialValue: brightness,
width: 200,
height: 20,
onChange: (v, z) {
BrightnessVolumeManager().setBrightness(v);
},
direction: SlideDirection.horizontal,
childBuilder: (ctx, value) => AnimatedSwitcher(
layoutBuilder: (Widget? currentChild,
List<Widget> previousChildren) {
return currentChild!;
},
duration: const Duration(seconds: 1),
child: Container(),
)
),
Dependency list 4 items
{"sdk":"flutter"}^2.0.2{"sdk":"flutter"}^4.0.0Start 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 ↗