Flutter - Set Device Volume with Slider
Last Updated :
24 Apr, 2025
A slider is a widget to select a value from a given range in the application. We can slide through the value and select the desired value from it. We don’t need to install any dependency to implement a slider. In this article, we will learn how to control the volume of the device from our Flutter app with Slider. We will learn how to get the current volume, set the volume, mute the device, set its value to the max and change the value in the app when the user changes the volume manually from the volume button. A sample video is given below to get an idea about what we are going to do in this article.
Step By Step Implementation
We will simply create an app that will cover almost all the control for volume. There is a different function for each I will explain that by covering all the things in 1 screen
Step 1: Create Flutter or Use Existing App
Create a flutter app with this command
Dart
Step 2: Add the following package
Add the following package to your project
Dart
dependencies:
flutter_volume_controller: ^1.3.1