404: Something's gone wrong :-(
- -You've tried to visit a page that doesn't exist. Luckily this site - has other pages.
-If you were looking for something specific, try searching: -
- - -diff --git a/.gitignore b/.gitignore index e6303d8..83c45a2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ .idea/ build/ +doc/api/ diff --git a/doc/api/__404error.html b/doc/api/__404error.html deleted file mode 100644 index 839b406..0000000 --- a/doc/api/__404error.html +++ /dev/null @@ -1,93 +0,0 @@ - - -
- - - - - -You've tried to visit a page that doesn't exist. Luckily this site - has other pages.
-If you were looking for something specific, try searching: -
- - -A Flutter plugin for iOS and Android get/set/listen system volume.
---VolumeController.getVolume()
-
--VolumeController.maxVolume()
-
--VolumeController.muteVolume()
-
0, 1
---await VolumeController.setVolume(double volume)
-
--VolumeController.volumeListener.listen((volume) { // TODO });
-
-class _MyAppState extends State<MyApp> {
- double _volumeListenerValue = 0;
- double _getVolume = 0;
- double _setVolumeValue = 0;
-
- @override
- void initState() {
- super.initState();
- VolumeController.volumeListener.listen((volume) {
- setState(() => _volumeListenerValue = volume);
- });
- VolumeController.getVolume().then((volume) => _setVolumeValue = volume);
- }
-
- @override
- Widget build(BuildContext context) {
- return MaterialApp(
- home: Scaffold(
- appBar: AppBar(
- title: const Text('Volume Plugin example app'),
- ),
- body: Column(
- children: [
- Text('Current volume: $_volumeListenerValue'),
- Row(
- children: [
- Text('Set Volume:'),
- Flexible(
- child: Slider(
- min: 0,
- max: 1,
- onChanged: (double value) {
- _setVolumeValue = value;
- VolumeController.setVolume(_setVolumeValue);
- setState(() {});
- },
- value: _setVolumeValue,
- ),
- ),
- ],
- ),
- Row(
- mainAxisAlignment: MainAxisAlignment.center,
- children: [
- Text('Volume is: $_getVolume'),
- TextButton(
- onPressed: () async {
- _getVolume = await VolumeController.getVolume();
- setState(() {});
- },
- child: Text('Get Volume'),
- ),
- ],
- ),
- TextButton(
- onPressed: () => VolumeController.muteVolume(),
- child: Text('Mute Volume'),
- ),
- TextButton(
- onPressed: () => VolumeController.maxVolume(),
- child: Text('Max Volume'),
- ),
- ],
- ),
- ),
- );
- }
-}
-
-