brightness_volume_manager 0.0.2 copy "brightness_volume_manager: ^0.0.2" to clipboard
brightness_volume_manager: ^0.0.2 copied to clipboard

A Flutter plugin to manage screen brightness and volume on Android and iOS. Also provides the custom widget for brightness and volume swipe.

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.

Features #

  • Get and set screen brightness
  • Reset custom brightness
  • Get and set system volume
  • Keep the screen on
  • Custom swipe widget for brightness
  • Custom swipe widget for volume

Installation #

Add the package to your pubspec.yaml:

    brightness_volume_manager: ^latest_version
copied to clipboard

latest_version:
pub package

API #

Get System brightness

    BrightnessVolumeManager().getBrightness();
copied to clipboard

Set brightness

  BrightnessVolumeManager().setBrightness(brightness);
copied to clipboard

Reset Custom brightness

  BrightnessVolumeManager().resetCustomBrightness();
copied to clipboard

Get System Volume

    BrightnessVolumeManager().getVolume();
copied to clipboard

Set volume

  BrightnessVolumeManager().setVolume(v);
copied to clipboard

Get screen kept on flag

  BrightnessVolumeManager().isScreenKeptOn();
copied to clipboard

Set screen kept on flag

  BrightnessVolumeManager().keepScreenOn(true);
copied to clipboard

Add swipe widget vertical #

  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(),
      )
  )
copied to clipboard

Add swipe widget horizontal #

  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(),
    )
),
copied to clipboard

Contributor #

Minas Chalise Bikram koju

1
likes
140
points
30
downloads

Publisher

unverified uploader

Weekly Downloads

2024.10.05 - 2025.04.19

A Flutter plugin to manage screen brightness and volume on Android and iOS. Also provides the custom widget for brightness and volume swipe.

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on brightness_volume_manager