{"id":16623308,"url":"https://github.com/tegraxd/resonance","last_synced_at":"2026-01-11T13:36:32.228Z","repository":{"id":56838116,"uuid":"455736370","full_name":"TEGRAXD/resonance","owner":"TEGRAXD","description":"A Flutter Package For Volume and Vibration Controller","archived":false,"fork":false,"pushed_at":"2023-05-04T06:26:38.000Z","size":183,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T15:04:36.649Z","etag":null,"topics":["android","collaborate","flutter","plugin","pubdev"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/resonance","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TEGRAXD.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-02-05T00:25:44.000Z","updated_at":"2024-07-22T17:42:16.000Z","dependencies_parsed_at":"2024-01-14T15:25:58.401Z","dependency_job_id":"ad48d93e-0285-4793-bb56-c8d587e28bb1","html_url":"https://github.com/TEGRAXD/resonance","commit_stats":{"total_commits":25,"total_committers":2,"mean_commits":12.5,"dds":0.24,"last_synced_commit":"7b484714a57a8178118b77f51a3615a6ab6f6dd2"},"previous_names":["tegraxd/resonance"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TEGRAXD%2Fresonance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TEGRAXD%2Fresonance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TEGRAXD%2Fresonance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TEGRAXD%2Fresonance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TEGRAXD","download_url":"https://codeload.github.com/TEGRAXD/resonance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238909399,"owners_count":19550839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","collaborate","flutter","plugin","pubdev"],"created_at":"2024-10-12T03:23:14.850Z","updated_at":"2025-10-29T22:31:40.641Z","avatar_url":"https://github.com/TEGRAXD.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Resonance ![Dart](https://github.com/suganda8/resonance/actions/workflows/dart.yml/badge.svg)\n\nResonance is volume and vibration controller plugin. This plugin based on the Android volume and vibration controller. The plugin let you control volume without user interaction and allow customable vibration pattern.\n\n![](static/resonance.png)\n\n## Download\n\nGet the latest plugin directly from [Pub][1].\n\n## Features\n\n### Volume Control\n- Get current volume level\n- Get max volume level\n- Set volume level\n- Set max volume level\n- Set mute volume level\n- Showing volume UI (Android only)\n- Volume stream types (music, notification, alarm, etc.)\n- Listenable volume level change\n\n### Vibration\n- Create Vibration\n- Create Pattern Vibration\n- Cancel Pattern Vibration\n\n## Usage\n\n- Get current volume level\n\n```dart\nvar crntVol = await Resonance.volumeGetCurrentLevel(streamType: StreamType.alarm);\nprint(crntVol);\n```\n\n- Set volume level\n\n```dart\nvar crntVol = await Resonance.volumeSetLevel(0.5, showVolumeUI: true);\nprint(crntVol);\n```\n\n- Add volume listener\n\n```dart\ndouble _volumeLevel = 0;\n\n@override\nvoid initState() {\n    // Add listener\n    Resonance().addVolumeListener((volume) {\n        setState(() {\n            _volumeLevel = volume;\n        });\n    });\n    super.initState();\n}\n\n@override\nvoid dispose() {\n    // Remove listener\n    Resonance().removeVolumeListener();\n    super.dispose();\n}\n```\n\n- Create one-shot vibration by certain duration\n\n```dart\nawait Resonance.vibrate(duration: const Duration(milliseconds: 1000));\n```\n\n- Create pattern vibration \n\n```dart\nawait Resonance.vibratePattern(\n    [0, 400, 1000, 600, 1000, 800],\n    amplitude: 255, // Default: null\n    repeat: false, // Default: false\n);\n```\n\n- Cancel active pattern vibration\n\n```dart\nawait Resonance.vibrationCancel();\n```\n\n## Version\nVersion 1.0.4\n\n## Note\nOnly work for Android.\n\n## API\n\nReturn | Method | Description\n--------------- | --- | ---\nFuture\\\u003cdouble\u003e | volumeGetCurrentLevel(StreamType streamType) | Returns device's current volume level.\nFuture\\\u003cdouble\u003e | volumeGetMaxLevel(StreamType streamType) | Returns device's maximum volume level.\nFuture\\\u003cdouble\u003e | volumeSetLevel(double volumeValue, StreamType streamType, bool showVolumeUI) | Set device's volume level to given volumeValue parameter and returns current volume level.\nFuture\\\u003cdouble\u003e | volumeSetMaxLevel(StreamType streamType, bool showVolumeUI) | Set device's volume level to maximum and returns current volume level.\nFuture\\\u003cdouble\u003e | volumeSetMuteLevel(StreamType streamType, bool showVolumeUI) | Set device's volume level to minimum or muted and returns current volume level.\nStreamSubscription\\\u003cdouble\u003e | addVolumeListener(Function(double volume) function) | Add volume change listener to handle given callback.\nvoid | removeVolumeListener() | Cancel listener from broadcast stream\nFuture\\\u003cbool\u003e | vibrate(Duration? duration) | Create vibration by certain duration, default duration is 400ms and returns boolean status.\nFuture\\\u003cbool\u003e | vibratePattern(List\\\u003cint\u003e pattern, int? amplitude, bool repeat,) | Create vibration by given custom pattern, amplitude, and repeat.\nFuture\\\u003cbool\u003e | vibrationCancel() | Cancel any active repeated vibration and returns boolean status.\n\n## Developer\n\n```\nTegar Bangun Suganda\n```\n\n[@canaryv8][2] (Twitter)\\\n[@suganda8][3] (Github)\n\n## License\n\n```\nresonance\n\nMIT License\n\nCopyright (c) 2022 Tegar Bangun Suganda (OVERMIND)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n\n[1]: https://pub.dev/packages/resonance\n[2]: https://twitter.com/canaryv8\n[3]: https://github.com/suganda8","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftegraxd%2Fresonance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftegraxd%2Fresonance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftegraxd%2Fresonance/lists"}