Search packages, repositories and app categories

GitHub repositorychaliseminas/brightness_volume_manager

brightness_volume_manager

This is a Flutter plugin that allows you to get and adjust the screen brightness and media volume programmatically on Android and iOS.

brightness_volume_manager project cover
Stars
1
Forks
0
Last push (UTC)
Feb 3, 2025
Project status
Active

Original README

English project snapshot. Visit GitHub for the latest content.

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

latest_version:
pub package

API
Get System brightness
    BrightnessVolumeManager().getBrightness();
Set brightness
  BrightnessVolumeManager().setBrightness(brightness);
Reset Custom brightness
  BrightnessVolumeManager().resetCustomBrightness();
Get System Volume
    BrightnessVolumeManager().getVolume();
Set volume
  BrightnessVolumeManager().setVolume(v);
Get screen kept on flag
  BrightnessVolumeManager().isScreenKeptOn();
Set screen kept on flag
  BrightnessVolumeManager().keepScreenOn(true);
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(),
      )
  )
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(),
    )
),

Contributor

Minas Chalise Bikram koju

Minas Chalise GitHub avatar
GitHub author

Minas Chalise ↗

Programmer

@Genius-Systems-Nepal Kathmandu, Nepal
LanguagesDartKotlinSwiftRubyObjective-C

Packages published by this repository

Dependencies used

Dependency list 4 items

  • flutter{"sdk":"flutter"}
  • plugin_platform_interface^2.0.2
  • flutter_testDevelopment{"sdk":"flutter"}
  • flutter_lintsDevelopment^4.0.0

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 ↗