├── .gitignore
├── .idea
└── codeStyles
│ └── Project.xml
├── .metadata
├── CHANGELOG.md
├── LICENSE
├── README.md
├── android
├── .classpath
├── .gitignore
├── .idea
│ ├── .name
│ ├── caches
│ │ ├── build_file_checksums.ser
│ │ └── gradle_models.ser
│ ├── codeStyles
│ │ └── Project.xml
│ ├── gradle.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── runConfigurations.xml
├── .project
├── .settings
│ └── org.eclipse.buildship.core.prefs
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── example
│ └── volume
│ └── VolumePlugin.java
├── example
├── .flutter-plugins-dependencies
├── .gitignore
├── .metadata
├── README.md
├── android
│ ├── .project
│ ├── .settings
│ │ └── org.eclipse.buildship.core.prefs
│ ├── app
│ │ ├── .classpath
│ │ ├── .project
│ │ ├── .settings
│ │ │ └── org.eclipse.buildship.core.prefs
│ │ ├── build.gradle
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java
│ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── volumeexample
│ │ │ │ ├── EmbeddingV1Activity.java
│ │ │ │ └── MainActivity.java
│ │ │ └── res
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ ├── build.gradle
│ ├── gradle.properties
│ ├── gradle
│ │ └── wrapper
│ │ │ └── gradle-wrapper.properties
│ └── settings.gradle
├── ios
│ ├── Flutter
│ │ ├── AppFrameworkInfo.plist
│ │ ├── Debug.xcconfig
│ │ ├── Release.xcconfig
│ │ └── flutter_export_environment.sh
│ ├── Runner.xcodeproj
│ │ ├── project.pbxproj
│ │ ├── project.xcworkspace
│ │ │ └── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ ├── Runner.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── Runner
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ └── Icon-App-83.5x83.5@2x.png
│ │ └── LaunchImage.imageset
│ │ │ ├── Contents.json
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ └── README.md
│ │ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ │ ├── Info.plist
│ │ └── main.m
├── lib
│ └── main.dart
└── pubspec.yaml
├── ios
├── .gitignore
├── Assets
│ └── .gitkeep
├── Classes
│ ├── VolumePlugin.h
│ └── VolumePlugin.m
└── volume.podspec
├── lib
└── volume.dart
├── pubspec.yaml
└── volume.iml
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | # Created by https://www.gitignore.io/api/dart,android,flutter,androidstudio
5 | # Edit at https://www.gitignore.io/?templates=dart,android,flutter,androidstudio
6 |
7 | ### Android ###
8 | # Built application files
9 | *.apk
10 | *.ap_
11 | *.aab
12 |
13 | # Files for the ART/Dalvik VM
14 | *.dex
15 |
16 | # Java class files
17 | *.class
18 |
19 | # Generated files
20 | bin/
21 | gen/
22 | out/
23 | release/
24 |
25 | # Gradle files
26 | .gradle/
27 | build/
28 |
29 | # Local configuration file (sdk path, etc)
30 | local.properties
31 |
32 | # Proguard folder generated by Eclipse
33 | proguard/
34 |
35 | # Log Files
36 | *.log
37 |
38 | # Android Studio Navigation editor temp files
39 | .navigation/
40 |
41 | # Android Studio captures folder
42 | captures/
43 |
44 | # IntelliJ
45 | *.iml
46 | .idea/workspace.xml
47 | .idea/tasks.xml
48 | .idea/gradle.xml
49 | .idea/assetWizardSettings.xml
50 | .idea/dictionaries
51 | .idea/libraries
52 | # Android Studio 3 in .gitignore file.
53 | .idea/caches
54 | .idea/modules.xml
55 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you
56 | .idea/navEditor.xml
57 |
58 | # Keystore files
59 | # Uncomment the following lines if you do not want to check your keystore files in.
60 | #*.jks
61 | #*.keystore
62 |
63 | # External native build folder generated in Android Studio 2.2 and later
64 | .externalNativeBuild
65 |
66 | # Google Services (e.g. APIs or Firebase)
67 | # google-services.json
68 |
69 | # Freeline
70 | freeline.py
71 | freeline/
72 | freeline_project_description.json
73 |
74 | # fastlane
75 | fastlane/report.xml
76 | fastlane/Preview.html
77 | fastlane/screenshots
78 | fastlane/test_output
79 | fastlane/readme.md
80 |
81 | # Version control
82 | vcs.xml
83 |
84 | # lint
85 | lint/intermediates/
86 | lint/generated/
87 | lint/outputs/
88 | lint/tmp/
89 | # lint/reports/
90 |
91 | ### Android Patch ###
92 | gen-external-apklibs
93 | output.json
94 |
95 | # Replacement of .externalNativeBuild directories introduced
96 | # with Android Studio 3.5.
97 | .cxx/
98 |
99 | ### Dart ###
100 | # See https://www.dartlang.org/guides/libraries/private-files
101 |
102 | # Files and directories created by pub
103 | .dart_tool/
104 | .packages
105 | # If you're building an application, you may want to check-in your pubspec.lock
106 | pubspec.lock
107 |
108 | # Directory created by dartdoc
109 | # If you don't generate documentation locally you can remove this line.
110 | doc/api/
111 |
112 | # Avoid committing generated Javascript files:
113 | *.dart.js
114 | *.info.json # Produced by the --dump-info flag.
115 | *.js # When generated by dart2js. Don't specify *.js if your
116 | # project includes source files written in JavaScript.
117 | *.js_
118 | *.js.deps
119 | *.js.map
120 |
121 | ### Flutter ###
122 | # Flutter/Dart/Pub related
123 | **/doc/api/
124 | .flutter-plugins
125 | .flutter-plugins-dependencies
126 | .pub-cache/
127 | .pub/
128 | flutter_export_environment.sh
129 |
130 |
131 | # Android related
132 | **/android/**/gradle-wrapper.jar
133 | **/android/.gradle
134 | **/android/captures/
135 | **/android/gradlew
136 | **/android/gradlew.bat
137 | **/android/local.properties
138 | **/android/**/GeneratedPluginRegistrant.java
139 |
140 | # iOS/XCode related
141 | **/ios/**/*.mode1v3
142 | **/ios/**/*.mode2v3
143 | **/ios/**/*.moved-aside
144 | **/ios/**/*.pbxuser
145 | **/ios/**/*.perspectivev3
146 | **/ios/**/*sync/
147 | **/ios/**/.sconsign.dblite
148 | **/ios/**/.tags*
149 | **/ios/**/.vagrant/
150 | **/ios/**/DerivedData/
151 | **/ios/**/Icon?
152 | **/ios/**/Pods/
153 | **/ios/**/.symlinks/
154 | **/ios/**/profile
155 | **/ios/**/xcuserdata
156 | **/ios/.generated/
157 | **/ios/Flutter/App.framework
158 | **/ios/Flutter/Flutter.framework
159 | **/ios/Flutter/Generated.xcconfig
160 | **/ios/Flutter/app.flx
161 | **/ios/Flutter/app.zip
162 | **/ios/Flutter/flutter_assets/
163 | **/ios/ServiceDefinitions.json
164 | **/ios/Runner/GeneratedPluginRegistrant.*
165 |
166 | # Exceptions to above rules.
167 | !**/ios/**/default.mode1v3
168 | !**/ios/**/default.mode2v3
169 | !**/ios/**/default.pbxuser
170 | !**/ios/**/default.perspectivev3
171 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
172 |
173 | ### AndroidStudio ###
174 | # Covers files to be ignored for android development using Android Studio.
175 |
176 | # Built application files
177 |
178 | # Files for the ART/Dalvik VM
179 |
180 | # Java class files
181 |
182 | # Generated files
183 |
184 | # Gradle files
185 | .gradle
186 |
187 | # Signing files
188 | .signing/
189 |
190 | # Local configuration file (sdk path, etc)
191 |
192 | # Proguard folder generated by Eclipse
193 |
194 | # Log Files
195 |
196 | # Android Studio
197 | /*/build/
198 | /*/local.properties
199 | /*/out
200 | /*/*/build
201 | /*/*/production
202 | *.ipr
203 | *~
204 | *.swp
205 |
206 | # Android Patch
207 |
208 | # External native build folder generated in Android Studio 2.2 and later
209 |
210 | # NDK
211 | obj/
212 |
213 | # IntelliJ IDEA
214 | *.iws
215 | /out/
216 |
217 | # User-specific configurations
218 | .idea/caches/
219 | .idea/libraries/
220 | .idea/shelf/
221 | .idea/.name
222 | .idea/compiler.xml
223 | .idea/copyright/profiles_settings.xml
224 | .idea/encodings.xml
225 | .idea/misc.xml
226 | .idea/scopes/scope_settings.xml
227 | .idea/vcs.xml
228 | .idea/jsLibraryMappings.xml
229 | .idea/datasources.xml
230 | .idea/dataSources.ids
231 | .idea/sqlDataSources.xml
232 | .idea/dynamic.xml
233 | .idea/uiDesigner.xml
234 |
235 | # OS-specific files
236 | .DS_Store
237 | .DS_Store?
238 | ._*
239 | .Spotlight-V100
240 | .Trashes
241 | ehthumbs.db
242 | Thumbs.db
243 |
244 | # Legacy Eclipse project files
245 | .classpath
246 | .project
247 | .cproject
248 | .settings/
249 |
250 | # Mobile Tools for Java (J2ME)
251 | .mtj.tmp/
252 |
253 | # Package Files #
254 | *.war
255 | *.ear
256 |
257 | # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
258 | hs_err_pid*
259 |
260 | ## Plugin-specific files:
261 |
262 | # mpeltonen/sbt-idea plugin
263 | .idea_modules/
264 |
265 | # JIRA plugin
266 | atlassian-ide-plugin.xml
267 |
268 | # Mongo Explorer plugin
269 | .idea/mongoSettings.xml
270 |
271 | # Crashlytics plugin (for Android Studio and IntelliJ)
272 | com_crashlytics_export_strings.xml
273 | crashlytics.properties
274 | crashlytics-build.properties
275 | fabric.properties
276 |
277 | ### AndroidStudio Patch ###
278 |
279 | !/gradle/wrapper/gradle-wrapper.jar
280 |
281 | # End of https://www.gitignore.io/api/dart,android,flutter,androidstudio
282 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | xmlns:android
14 |
15 | ^$
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | xmlns:.*
25 |
26 | ^$
27 |
28 |
29 | BY_NAME
30 |
31 |
32 |
33 |
34 |
35 |
36 | .*:id
37 |
38 | http://schemas.android.com/apk/res/android
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | .*:name
48 |
49 | http://schemas.android.com/apk/res/android
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | name
59 |
60 | ^$
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | style
70 |
71 | ^$
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | .*
81 |
82 | ^$
83 |
84 |
85 | BY_NAME
86 |
87 |
88 |
89 |
90 |
91 |
92 | .*
93 |
94 | http://schemas.android.com/apk/res/android
95 |
96 |
97 | ANDROID_ATTRIBUTE_ORDER
98 |
99 |
100 |
101 |
102 |
103 |
104 | .*
105 |
106 | .*
107 |
108 |
109 | BY_NAME
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
8 | channel: beta
9 |
10 | project_type: plugin
11 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ## 1.0.1
2 |
3 | Removed unused issues
4 |
5 | ## 1.0.0
6 |
7 | Updated pubspec for system_shortcuts package version
8 |
9 | ## 0.1.4
10 |
11 | Added option to show and hide system volume UI while changing volume levels.
12 |
13 | ## 0.1.3
14 |
15 | Removed volUp () and volDown() functions .
16 | Change volume using setVol function .
17 |
18 |
19 | ## 0.1.2
20 |
21 | Never resolving native calls resolved
22 | Github contibution by - [geisterfurz007](https://github.com/geisterfurz007)
23 |
24 |
25 | ## 0.1.1
26 |
27 | Android X Issues Resolved
28 | Github contibution by - [Thorben Markmann](https://github.com/tmarkmann)
29 |
30 |
31 | ## 0.1.0
32 |
33 | Just Version Upgrade
34 |
35 |
36 | ## 0.0.8
37 |
38 | Added License.
39 |
40 | ## 0.0.7
41 |
42 | Little change in docs.
43 |
44 | ## 0.0.6
45 |
46 | Added volUp button press and volDown button press from system_shortcuts plugin.
47 |
48 |
49 | ## 0.0.5
50 |
51 | Updated the dartDoc documentation in Volume.dart class.
52 |
53 | ## 0.0.4
54 |
55 | Updated description
56 |
57 | ## 0.0.3
58 |
59 | Example readme update.
60 |
61 | ## 0.0.2
62 |
63 | Updated Readme.md and removed unnecessary print statements
64 |
65 | ## 0.0.1
66 |
67 | Control Android Volumes programatically.
68 |
69 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Aman Malhotra
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # volume
2 |
3 | Controll Volume in Android programatically.
4 | No IOS Implementation yet . Pull Request for ios implementation are welcome.
5 |
6 | # Streams
7 | ```
8 | AudioManager.STREAM_VOICE_CALL -> Controll IN CALL Volume
9 | AudioManager.STREAM_SYSTEM -> Controll SYSTEM Volume
10 | AudioManager.STREAM_RING -> Controll RINGER Volume
11 | AudioManager.STREAM_MUSIC -> Controll MEDIA Volume
12 | AudioManager.STREAM_ALARM -> Controll ALARM Volume
13 | AudioManager.STREAM_NOTIFICATION -> Controll NOTIFICATION Volume
14 | ```
15 |
16 | # Show and Hide System UI
17 | ```
18 | ShowVolumeUI.SHOW (DEFAULT) -> Show system volume UI while changing volume
19 | ShowVolumeUI.HIDE -> Do not show system volume UI while changing volume
20 | ```
21 | # Functions and getters
22 |
23 | ### Volume Buttons will affect this volume when in app
24 |
25 | > await Volume.controlVolume(AudioManager audioManager); // pass any stream as parameter
26 |
27 | ### Returns maximum possible volume in integers
28 |
29 | > await Volume.getMaxVol; // returns an integer
30 |
31 | ### Returns current volume level in integers
32 |
33 | > await Volume.getVol;// returns an integer
34 |
35 | ### Set volume for the stream passed to controlVolume() function
36 |
37 | > await Volume.setVol(int i, {ShowVolumeUI showVolumeUI});
38 |
39 | > Max value of i is less than or equal to Volume.getMaxVol.
40 |
41 | > showVolumeUI is optional parameter which defaults to ShowVolumeUI.SHOW.
42 |
43 |
50 |
51 | # Usage
52 | ```
53 | class _MyAppState extends State {
54 | int maxVol, currentVol;
55 |
56 | @override
57 | void initState() {
58 | super.initState();
59 | audioManager = AudioManager.STREAM_SYSTEM;
60 | initAudioStreamType();
61 | updateVolumes();
62 | }
63 |
64 | Future initAudioStreamType() async {
65 | await Volume.controlVolume(AudioManager.STREAM_SYSTEM);
66 | }
67 |
68 | updateVolumes() async {
69 | // get Max Volume
70 | maxVol = await Volume.getMaxVol;
71 | // get Current Volume
72 | currentVol = await Volume.getVol;
73 | setState(() {});
74 | }
75 |
76 | setVol(int i) async {
77 | await Volume.setVol(i, showVolumeUI: ShowVolumeUI.SHOW);
78 | // or
79 | // await Volume.setVol(i, showVolumeUI: ShowVolumeUI.HIDE);
80 | }
81 | // To implement the volume Up and volume Down button press programatically.
82 |
83 | ```
84 |
--------------------------------------------------------------------------------
/android/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 |
--------------------------------------------------------------------------------
/android/.idea/.name:
--------------------------------------------------------------------------------
1 | volume
--------------------------------------------------------------------------------
/android/.idea/caches/build_file_checksums.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/android/.idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/android/.idea/caches/gradle_models.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/android/.idea/caches/gradle_models.ser
--------------------------------------------------------------------------------
/android/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | xmlns:android
14 |
15 | ^$
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | xmlns:.*
25 |
26 | ^$
27 |
28 |
29 | BY_NAME
30 |
31 |
32 |
33 |
34 |
35 |
36 | .*:id
37 |
38 | http://schemas.android.com/apk/res/android
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | .*:name
48 |
49 | http://schemas.android.com/apk/res/android
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | name
59 |
60 | ^$
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | style
70 |
71 | ^$
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | .*
81 |
82 | ^$
83 |
84 |
85 | BY_NAME
86 |
87 |
88 |
89 |
90 |
91 |
92 | .*
93 |
94 | http://schemas.android.com/apk/res/android
95 |
96 |
97 | ANDROID_ATTRIBUTE_ORDER
98 |
99 |
100 |
101 |
102 |
103 |
104 | .*
105 |
106 | .*
107 |
108 |
109 | BY_NAME
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/android/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
--------------------------------------------------------------------------------
/android/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/android/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | volume
4 | Project volume created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | arguments=
2 | auto.sync=false
3 | build.scans.enabled=false
4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5 | connection.project.dir=../example/android
6 | eclipse.preferences.version=1
7 | gradle.user.home=
8 | java.home=/usr/lib/jvm/java-11-openjdk-amd64
9 | jvm.arguments=
10 | offline.mode=false
11 | override.workspace.settings=true
12 | show.console.view=true
13 | show.executions.view=true
14 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 |
2 | group 'com.example.volume'
3 | version '1.0-SNAPSHOT'
4 |
5 | buildscript {
6 | repositories {
7 | google()
8 | jcenter()
9 | }
10 |
11 | dependencies {
12 | classpath 'com.android.tools.build:gradle:3.5.3'
13 | }
14 | }
15 | rootProject.allprojects {
16 | repositories {
17 | google()
18 | jcenter()
19 | }
20 | }
21 |
22 | apply plugin: 'com.android.library'
23 |
24 | android {
25 | compileSdkVersion 29
26 |
27 | defaultConfig {
28 | minSdkVersion 16
29 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
30 | }
31 | lintOptions {
32 | disable 'InvalidPackage'
33 | }
34 | }
35 |
36 | dependencies {
37 | implementation 'androidx.annotation:annotation:1.1.0'
38 | }
39 |
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | android.enableJetifier=true
2 | android.useAndroidX=true
3 | org.gradle.jvmargs=-Xmx1536M
4 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Sat Apr 11 14:36:42 IST 2020
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'volume'
2 |
--------------------------------------------------------------------------------
/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
--------------------------------------------------------------------------------
/android/src/main/java/com/example/volume/VolumePlugin.java:
--------------------------------------------------------------------------------
1 |
2 | package com.example.volume;
3 |
4 | import android.app.Activity;
5 | import android.content.Context;
6 | import android.media.AudioManager;
7 |
8 | import androidx.annotation.NonNull;
9 |
10 | import io.flutter.embedding.engine.plugins.FlutterPlugin;
11 | import io.flutter.embedding.engine.plugins.activity.ActivityAware;
12 | import io.flutter.embedding.engine.plugins.activity.ActivityPluginBinding;
13 | import io.flutter.plugin.common.MethodCall;
14 | import io.flutter.plugin.common.MethodChannel;
15 | import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
16 | import io.flutter.plugin.common.MethodChannel.Result;
17 | import io.flutter.plugin.common.PluginRegistry.Registrar;
18 |
19 | /**
20 | * VolumePlugin
21 | */
22 | public class VolumePlugin implements FlutterPlugin, ActivityAware, MethodCallHandler {
23 |
24 | private MethodChannel channel;
25 | private Activity activity;
26 | private AudioManager audioManager;
27 | private int streamType;
28 |
29 | /**
30 | * v2 plugin embedding
31 | */
32 | @Override
33 | public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) {
34 | channel = new MethodChannel(
35 | binding.getBinaryMessenger(), "volume");
36 | channel.setMethodCallHandler(this);
37 | }
38 |
39 | @Override
40 | public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) {
41 | channel.setMethodCallHandler(null);
42 | channel = null;
43 | }
44 |
45 | @Override
46 | public void onAttachedToActivity(ActivityPluginBinding binding) {
47 | activity = binding.getActivity();
48 | }
49 |
50 | @Override
51 | public void onDetachedFromActivity() {
52 | activity = null;
53 | }
54 |
55 | @Override
56 | public void onReattachedToActivityForConfigChanges(ActivityPluginBinding binding) {
57 | activity = binding.getActivity();
58 | }
59 |
60 | @Override
61 | public void onDetachedFromActivityForConfigChanges() {
62 | activity = null;
63 | }
64 |
65 | /**
66 | * Deprecated plugin registration.
67 | */
68 | public static void registerWith(Registrar registrar) {
69 | VolumePlugin instance = new VolumePlugin();
70 | instance.channel = new MethodChannel(registrar.messenger(), "volume");
71 | instance.activity = registrar.activity();
72 | instance.channel.setMethodCallHandler(instance);
73 | }
74 |
75 | @Override
76 | public void onMethodCall(MethodCall call, @NonNull Result result) {
77 | if (call.method.equals("controlVolume")) {
78 | int i = call.argument("streamType");
79 | streamType = i;
80 | controlVolume(i);
81 | result.success(null);
82 | } else if (call.method.equals("getMaxVol")) {
83 | result.success(getMaxVol());
84 | } else if (call.method.equals("getVol")) {
85 | result.success(getVol());
86 | } else if (call.method.equals("setVol")) {
87 | int i = call.argument("newVol");
88 | int showUiFlag = call.argument("showVolumeUiFlag");
89 | setVol(i,showUiFlag);
90 | result.success(0);
91 | } else {
92 | result.notImplemented();
93 | }
94 | }
95 |
96 | private void controlVolume(int i) {
97 | this.activity.setVolumeControlStream(i);
98 | }
99 |
100 | private void initAudioManager() {
101 | audioManager = (AudioManager) this.activity.getApplicationContext().getSystemService(Context.AUDIO_SERVICE);
102 | }
103 |
104 | private int getMaxVol() {
105 | initAudioManager();
106 | return audioManager.getStreamMaxVolume(streamType);
107 | }
108 |
109 | private int getVol() {
110 | initAudioManager();
111 | return audioManager.getStreamVolume(streamType);
112 | }
113 |
114 | private int setVol(int i, int showVolumeUiFlag) {
115 | initAudioManager();
116 | audioManager.setStreamVolume(streamType, i, showVolumeUiFlag);
117 | return audioManager.getStreamVolume(streamType);
118 | }
119 | }
--------------------------------------------------------------------------------
/example/.flutter-plugins-dependencies:
--------------------------------------------------------------------------------
1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"system_shortcuts","path":"/home/aman/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/system_shortcuts-1.0.0/","dependencies":[]}],"android":[{"name":"system_shortcuts","path":"/home/aman/Desktop/flutter/.pub-cache/hosted/pub.dartlang.org/system_shortcuts-1.0.0/","dependencies":[]},{"name":"volume","path":"/media/aman/Projects/Flutter/FlutterApps/volume/","dependencies":["system_shortcuts"]}],"macos":[],"linux":[],"windows":[],"web":[]},"dependencyGraph":[{"name":"system_shortcuts","dependencies":[]},{"name":"volume","dependencies":["system_shortcuts"]}],"date_created":"2020-07-15 23:01:54.398157","version":"1.19.0-4.3.pre"}
--------------------------------------------------------------------------------
/example/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.lock
4 | *.log
5 | *.pyc
6 | *.swp
7 | .DS_Store
8 | .atom/
9 | .buildlog/
10 | .history
11 | .svn/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # Visual Studio Code related
20 | .vscode/
21 |
22 | # Flutter/Dart/Pub related
23 | **/doc/api/
24 | .dart_tool/
25 | .flutter-plugins
26 | .packages
27 | .pub-cache/
28 | .pub/
29 | build/
30 |
31 | # Android related
32 | **/android/**/gradle-wrapper.jar
33 | **/android/.gradle
34 | **/android/captures/
35 | **/android/gradlew
36 | **/android/gradlew.bat
37 | **/android/local.properties
38 | **/android/**/GeneratedPluginRegistrant.java
39 |
40 | # iOS/XCode related
41 | **/ios/**/*.mode1v3
42 | **/ios/**/*.mode2v3
43 | **/ios/**/*.moved-aside
44 | **/ios/**/*.pbxuser
45 | **/ios/**/*.perspectivev3
46 | **/ios/**/*sync/
47 | **/ios/**/.sconsign.dblite
48 | **/ios/**/.tags*
49 | **/ios/**/.vagrant/
50 | **/ios/**/DerivedData/
51 | **/ios/**/Icon?
52 | **/ios/**/Pods/
53 | **/ios/**/.symlinks/
54 | **/ios/**/profile
55 | **/ios/**/xcuserdata
56 | **/ios/.generated/
57 | **/ios/Flutter/App.framework
58 | **/ios/Flutter/Flutter.framework
59 | **/ios/Flutter/Generated.xcconfig
60 | **/ios/Flutter/app.flx
61 | **/ios/Flutter/app.zip
62 | **/ios/Flutter/flutter_assets/
63 | **/ios/ServiceDefinitions.json
64 | **/ios/Runner/GeneratedPluginRegistrant.*
65 |
66 | # Exceptions to above rules.
67 | !**/ios/**/default.mode1v3
68 | !**/ios/**/default.mode2v3
69 | !**/ios/**/default.pbxuser
70 | !**/ios/**/default.perspectivev3
71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
72 |
--------------------------------------------------------------------------------
/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
8 | channel: beta
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/example/README.md:
--------------------------------------------------------------------------------
1 | ```
2 | import 'package:flutter/material.dart';
3 | import 'dart:async';
4 | import 'package:volume/volume.dart';
5 |
6 | void main() => runApp(MyApp());
7 |
8 | class MyApp extends StatefulWidget {
9 | @override
10 | _MyAppState createState() => _MyAppState();
11 | }
12 |
13 | class _MyAppState extends State {
14 | AudioManager audioManager;
15 | int maxVol, currentVol;
16 | ShowVolumeUI showVolumeUI = ShowVolumeUI.SHOW;
17 |
18 | @override
19 | void initState() {
20 | super.initState();
21 | audioManager = AudioManager.STREAM_SYSTEM;
22 | initAudioStreamType();
23 | updateVolumes();
24 | }
25 |
26 | Future initAudioStreamType() async {
27 | await Volume.controlVolume(AudioManager.STREAM_SYSTEM);
28 | }
29 |
30 | updateVolumes() async {
31 | // get Max Volume
32 | maxVol = await Volume.getMaxVol;
33 | // get Current Volume
34 | currentVol = await Volume.getVol;
35 | setState(() {});
36 | }
37 |
38 | setVol(int i) async {
39 | await Volume.setVol(i, showVolumeUI: showVolumeUI);
40 | }
41 |
42 | @override
43 | Widget build(BuildContext context) {
44 | return MaterialApp(
45 | home: Scaffold(
46 | appBar: AppBar(
47 | title: const Text('Plugin example app'),
48 | ),
49 | body: Center(
50 | child: Column(
51 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
52 | children: [
53 | DropdownButton(
54 | value: audioManager,
55 | items: [
56 | DropdownMenuItem(
57 | child: Text("In Call Volume"),
58 | value: AudioManager.STREAM_VOICE_CALL,
59 | ),
60 | DropdownMenuItem(
61 | child: Text("System Volume"),
62 | value: AudioManager.STREAM_SYSTEM,
63 | ),
64 | DropdownMenuItem(
65 | child: Text("Ring Volume"),
66 | value: AudioManager.STREAM_RING,
67 | ),
68 | DropdownMenuItem(
69 | child: Text("Media Volume"),
70 | value: AudioManager.STREAM_MUSIC,
71 | ),
72 | DropdownMenuItem(
73 | child: Text("Alarm volume"),
74 | value: AudioManager.STREAM_ALARM,
75 | ),
76 | DropdownMenuItem(
77 | child: Text("Notifications Volume"),
78 | value: AudioManager.STREAM_NOTIFICATION,
79 | ),
80 | ],
81 | isDense: true,
82 | onChanged: (AudioManager aM) async {
83 | print(aM.toString());
84 | setState(() {
85 | audioManager = aM;
86 | });
87 | await Volume.controlVolume(aM);
88 | },
89 | ),
90 | ToggleButtons(
91 | // renderBorder: false,
92 | borderRadius: BorderRadius.all(Radius.circular(10.0)),
93 | children: [
94 | Padding(
95 | padding: const EdgeInsets.all(20.0),
96 | child: Text(
97 | "Show UI",
98 | ),
99 | ),
100 | Padding(
101 | padding: const EdgeInsets.all(20.0),
102 | child: Text(
103 | "Hide UI",
104 | ),
105 | ),
106 | ],
107 | isSelected: [
108 | showVolumeUI == ShowVolumeUI.SHOW,
109 | showVolumeUI == ShowVolumeUI.HIDE
110 | ],
111 | onPressed: (int i){
112 | setState(() {
113 | if(i == 0){
114 | showVolumeUI = ShowVolumeUI.SHOW;
115 | }else if (i == 1){
116 | showVolumeUI = ShowVolumeUI.HIDE;
117 | }
118 | });
119 | },
120 | ),
121 | (currentVol != null || maxVol != null)
122 | ? Slider(
123 | value: currentVol / 1.0,
124 | divisions: maxVol,
125 | max: maxVol / 1.0,
126 | min: 0,
127 | onChanged: (double d) {
128 | setVol(d.toInt());
129 | updateVolumes();
130 | },
131 | )
132 | : Container(),
133 |
134 | // FlatButton(
135 | // child: Text("Vol Up"),
136 | // onPressed: (){
137 | // Volume.volUp();
138 | // updateVolumes();
139 | // },
140 | // ),
141 | // FlatButton(
142 | // child: Text("Vol Down"),
143 | // onPressed: (){
144 | // Volume.volDown();
145 | // updateVolumes();
146 | // },
147 | // )
148 | ],
149 | ),
150 | ),
151 | ),
152 | );
153 | }
154 | }
155 | ```
--------------------------------------------------------------------------------
/example/android/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | android
4 | Project android created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.buildship.core.gradleprojectbuilder
10 |
11 |
12 |
13 |
14 |
15 | org.eclipse.buildship.core.gradleprojectnature
16 |
17 |
18 |
--------------------------------------------------------------------------------
/example/android/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | arguments=
2 | auto.sync=false
3 | build.scans.enabled=false
4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5 | connection.project.dir=
6 | eclipse.preferences.version=1
7 | gradle.user.home=
8 | java.home=/usr/lib/jvm/java-11-openjdk-amd64
9 | jvm.arguments=
10 | offline.mode=false
11 | override.workspace.settings=true
12 | show.console.view=true
13 | show.executions.view=true
14 |
--------------------------------------------------------------------------------
/example/android/app/.classpath:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/example/android/app/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | app
4 | Project app created by Buildship.
5 |
6 |
7 |
8 |
9 | org.eclipse.jdt.core.javabuilder
10 |
11 |
12 |
13 |
14 | org.eclipse.buildship.core.gradleprojectbuilder
15 |
16 |
17 |
18 |
19 |
20 | org.eclipse.jdt.core.javanature
21 | org.eclipse.buildship.core.gradleprojectnature
22 |
23 |
24 |
--------------------------------------------------------------------------------
/example/android/app/.settings/org.eclipse.buildship.core.prefs:
--------------------------------------------------------------------------------
1 | connection.project.dir=..
2 | eclipse.preferences.version=1
3 |
--------------------------------------------------------------------------------
/example/android/app/build.gradle:
--------------------------------------------------------------------------------
1 |
2 | def localProperties = new Properties()
3 | def localPropertiesFile = rootProject.file('local.properties')
4 | if (localPropertiesFile.exists()) {
5 | localPropertiesFile.withReader('UTF-8') { reader ->
6 | localProperties.load(reader)
7 | }
8 | }
9 |
10 | def flutterRoot = localProperties.getProperty('flutter.sdk')
11 | if (flutterRoot == null) {
12 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
13 | }
14 |
15 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
16 | if (flutterVersionCode == null) {
17 | flutterVersionCode = '1'
18 | }
19 |
20 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
21 | if (flutterVersionName == null) {
22 | flutterVersionName = '1.0'
23 | }
24 |
25 | apply plugin: 'com.android.application'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 29
30 |
31 | lintOptions {
32 | disable 'InvalidPackage'
33 | }
34 |
35 | defaultConfig {
36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
37 | applicationId "com.example.volumeexample"
38 | minSdkVersion 16
39 | targetSdkVersion 29
40 | versionCode flutterVersionCode.toInteger()
41 | versionName flutterVersionName
42 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
43 | }
44 |
45 | buildTypes {
46 | release {
47 | // TODO: Add your own signing config for the release build.
48 | // Signing with the debug keys for now, so `flutter run --release` works.
49 | signingConfig signingConfigs.debug
50 | }
51 | }
52 | }
53 |
54 | flutter {
55 | source '../..'
56 | }
57 |
58 | dependencies {
59 | testImplementation 'junit:junit:4.12'
60 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
61 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
62 | }
63 |
--------------------------------------------------------------------------------
/example/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
11 |
17 |
18 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/example/volumeexample/EmbeddingV1Activity.java:
--------------------------------------------------------------------------------
1 | package com.example.volumeexample;
2 |
3 | import android.os.Bundle;
4 |
5 | import com.example.volume.VolumePlugin;
6 |
7 | import io.flutter.app.FlutterActivity;
8 |
9 | public class EmbeddingV1Activity extends FlutterActivity {
10 | @Override
11 | protected void onCreate(Bundle savedInstanceState) {
12 | super.onCreate(savedInstanceState);
13 | VolumePlugin.registerWith(registrarFor("com.example.volume.VolumePlugin"));
14 | }
15 | }
--------------------------------------------------------------------------------
/example/android/app/src/main/java/com/example/volumeexample/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.volumeexample;
2 |
3 | import io.flutter.embedding.android.FlutterActivity;
4 |
5 | public class MainActivity extends FlutterActivity {
6 | //
7 | }
8 |
9 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | repositories {
3 | google()
4 | jcenter()
5 | }
6 |
7 | dependencies {
8 | classpath 'com.android.tools.build:gradle:3.5.3'
9 | }
10 | }
11 |
12 | allprojects {
13 | repositories {
14 | google()
15 | jcenter()
16 | }
17 | }
18 |
19 | rootProject.buildDir = '../build'
20 | subprojects {
21 | project.buildDir = "${rootProject.buildDir}/${project.name}"
22 | }
23 | subprojects {
24 | project.evaluationDependsOn(':app')
25 | }
26 |
27 | task clean(type: Delete) {
28 | delete rootProject.buildDir
29 | }
30 |
--------------------------------------------------------------------------------
/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 |
2 | org.gradle.jvmargs=-Xmx1536M
3 | android.enableR8=true
4 | android.useAndroidX=true
5 | android.enableJetifier=true
6 |
--------------------------------------------------------------------------------
/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 |
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
7 |
8 |
--------------------------------------------------------------------------------
/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/example/ios/Flutter/flutter_export_environment.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # This is a generated file; do not edit or check into version control.
3 | export "FLUTTER_ROOT=/home/aman/Desktop/flutter"
4 | export "FLUTTER_APPLICATION_PATH=/media/aman/Projects/Flutter/FlutterApps/volume/example"
5 | export "FLUTTER_TARGET=lib/main.dart"
6 | export "FLUTTER_BUILD_DIR=build"
7 | export "SYMROOT=${SOURCE_ROOT}/../build/ios"
8 | export "OTHER_LDFLAGS=$(inherited) -framework Flutter"
9 | export "FLUTTER_FRAMEWORK_DIR=/home/aman/Desktop/flutter/bin/cache/artifacts/engine/ios"
10 | export "FLUTTER_BUILD_NAME=1.0.0"
11 | export "FLUTTER_BUILD_NUMBER=1"
12 | export "DART_OBFUSCATION=false"
13 | export "TRACK_WIDGET_CREATION=false"
14 | export "TREE_SHAKE_ICONS=false"
15 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
18 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
19 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
20 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
21 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
22 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXCopyFilesBuildPhase section */
26 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
27 | isa = PBXCopyFilesBuildPhase;
28 | buildActionMask = 2147483647;
29 | dstPath = "";
30 | dstSubfolderSpec = 10;
31 | files = (
32 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
33 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
34 | );
35 | name = "Embed Frameworks";
36 | runOnlyForDeploymentPostprocessing = 0;
37 | };
38 | /* End PBXCopyFilesBuildPhase section */
39 |
40 | /* Begin PBXFileReference section */
41 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
42 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
43 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
44 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
45 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
46 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
47 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
48 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
49 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
50 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
51 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
52 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
53 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
54 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
55 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
56 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
57 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
58 | /* End PBXFileReference section */
59 |
60 | /* Begin PBXFrameworksBuildPhase section */
61 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
66 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
67 | );
68 | runOnlyForDeploymentPostprocessing = 0;
69 | };
70 | /* End PBXFrameworksBuildPhase section */
71 |
72 | /* Begin PBXGroup section */
73 | 9740EEB11CF90186004384FC /* Flutter */ = {
74 | isa = PBXGroup;
75 | children = (
76 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
77 | 3B80C3931E831B6300D905FE /* App.framework */,
78 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
79 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
80 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
81 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
82 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
83 | );
84 | name = Flutter;
85 | sourceTree = "";
86 | };
87 | 97C146E51CF9000F007C117D = {
88 | isa = PBXGroup;
89 | children = (
90 | 9740EEB11CF90186004384FC /* Flutter */,
91 | 97C146F01CF9000F007C117D /* Runner */,
92 | 97C146EF1CF9000F007C117D /* Products */,
93 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
94 | );
95 | sourceTree = "";
96 | };
97 | 97C146EF1CF9000F007C117D /* Products */ = {
98 | isa = PBXGroup;
99 | children = (
100 | 97C146EE1CF9000F007C117D /* Runner.app */,
101 | );
102 | name = Products;
103 | sourceTree = "";
104 | };
105 | 97C146F01CF9000F007C117D /* Runner */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
109 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
110 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
111 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
112 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
113 | 97C147021CF9000F007C117D /* Info.plist */,
114 | 97C146F11CF9000F007C117D /* Supporting Files */,
115 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
116 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
117 | );
118 | path = Runner;
119 | sourceTree = "";
120 | };
121 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
122 | isa = PBXGroup;
123 | children = (
124 | 97C146F21CF9000F007C117D /* main.m */,
125 | );
126 | name = "Supporting Files";
127 | sourceTree = "";
128 | };
129 | /* End PBXGroup section */
130 |
131 | /* Begin PBXNativeTarget section */
132 | 97C146ED1CF9000F007C117D /* Runner */ = {
133 | isa = PBXNativeTarget;
134 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
135 | buildPhases = (
136 | 9740EEB61CF901F6004384FC /* Run Script */,
137 | 97C146EA1CF9000F007C117D /* Sources */,
138 | 97C146EB1CF9000F007C117D /* Frameworks */,
139 | 97C146EC1CF9000F007C117D /* Resources */,
140 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
141 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142 | );
143 | buildRules = (
144 | );
145 | dependencies = (
146 | );
147 | name = Runner;
148 | productName = Runner;
149 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
150 | productType = "com.apple.product-type.application";
151 | };
152 | /* End PBXNativeTarget section */
153 |
154 | /* Begin PBXProject section */
155 | 97C146E61CF9000F007C117D /* Project object */ = {
156 | isa = PBXProject;
157 | attributes = {
158 | LastUpgradeCheck = 0910;
159 | ORGANIZATIONNAME = "The Chromium Authors";
160 | TargetAttributes = {
161 | 97C146ED1CF9000F007C117D = {
162 | CreatedOnToolsVersion = 7.3.1;
163 | };
164 | };
165 | };
166 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
167 | compatibilityVersion = "Xcode 3.2";
168 | developmentRegion = English;
169 | hasScannedForEncodings = 0;
170 | knownRegions = (
171 | en,
172 | Base,
173 | );
174 | mainGroup = 97C146E51CF9000F007C117D;
175 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
176 | projectDirPath = "";
177 | projectRoot = "";
178 | targets = (
179 | 97C146ED1CF9000F007C117D /* Runner */,
180 | );
181 | };
182 | /* End PBXProject section */
183 |
184 | /* Begin PBXResourcesBuildPhase section */
185 | 97C146EC1CF9000F007C117D /* Resources */ = {
186 | isa = PBXResourcesBuildPhase;
187 | buildActionMask = 2147483647;
188 | files = (
189 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
190 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
191 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
192 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
193 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | };
198 | /* End PBXResourcesBuildPhase section */
199 |
200 | /* Begin PBXShellScriptBuildPhase section */
201 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
202 | isa = PBXShellScriptBuildPhase;
203 | buildActionMask = 2147483647;
204 | files = (
205 | );
206 | inputPaths = (
207 | );
208 | name = "Thin Binary";
209 | outputPaths = (
210 | );
211 | runOnlyForDeploymentPostprocessing = 0;
212 | shellPath = /bin/sh;
213 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
214 | };
215 | 9740EEB61CF901F6004384FC /* Run Script */ = {
216 | isa = PBXShellScriptBuildPhase;
217 | buildActionMask = 2147483647;
218 | files = (
219 | );
220 | inputPaths = (
221 | );
222 | name = "Run Script";
223 | outputPaths = (
224 | );
225 | runOnlyForDeploymentPostprocessing = 0;
226 | shellPath = /bin/sh;
227 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
228 | };
229 | /* End PBXShellScriptBuildPhase section */
230 |
231 | /* Begin PBXSourcesBuildPhase section */
232 | 97C146EA1CF9000F007C117D /* Sources */ = {
233 | isa = PBXSourcesBuildPhase;
234 | buildActionMask = 2147483647;
235 | files = (
236 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
237 | 97C146F31CF9000F007C117D /* main.m in Sources */,
238 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
239 | );
240 | runOnlyForDeploymentPostprocessing = 0;
241 | };
242 | /* End PBXSourcesBuildPhase section */
243 |
244 | /* Begin PBXVariantGroup section */
245 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
246 | isa = PBXVariantGroup;
247 | children = (
248 | 97C146FB1CF9000F007C117D /* Base */,
249 | );
250 | name = Main.storyboard;
251 | sourceTree = "";
252 | };
253 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
254 | isa = PBXVariantGroup;
255 | children = (
256 | 97C147001CF9000F007C117D /* Base */,
257 | );
258 | name = LaunchScreen.storyboard;
259 | sourceTree = "";
260 | };
261 | /* End PBXVariantGroup section */
262 |
263 | /* Begin XCBuildConfiguration section */
264 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
265 | isa = XCBuildConfiguration;
266 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
267 | buildSettings = {
268 | ALWAYS_SEARCH_USER_PATHS = NO;
269 | CLANG_ANALYZER_NONNULL = YES;
270 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
271 | CLANG_CXX_LIBRARY = "libc++";
272 | CLANG_ENABLE_MODULES = YES;
273 | CLANG_ENABLE_OBJC_ARC = YES;
274 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
275 | CLANG_WARN_BOOL_CONVERSION = YES;
276 | CLANG_WARN_COMMA = YES;
277 | CLANG_WARN_CONSTANT_CONVERSION = YES;
278 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
279 | CLANG_WARN_EMPTY_BODY = YES;
280 | CLANG_WARN_ENUM_CONVERSION = YES;
281 | CLANG_WARN_INFINITE_RECURSION = YES;
282 | CLANG_WARN_INT_CONVERSION = YES;
283 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
284 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
285 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
286 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
287 | CLANG_WARN_STRICT_PROTOTYPES = YES;
288 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
289 | CLANG_WARN_UNREACHABLE_CODE = YES;
290 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
291 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
292 | COPY_PHASE_STRIP = NO;
293 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
294 | ENABLE_NS_ASSERTIONS = NO;
295 | ENABLE_STRICT_OBJC_MSGSEND = YES;
296 | GCC_C_LANGUAGE_STANDARD = gnu99;
297 | GCC_NO_COMMON_BLOCKS = YES;
298 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
299 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
300 | GCC_WARN_UNDECLARED_SELECTOR = YES;
301 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
302 | GCC_WARN_UNUSED_FUNCTION = YES;
303 | GCC_WARN_UNUSED_VARIABLE = YES;
304 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
305 | MTL_ENABLE_DEBUG_INFO = NO;
306 | SDKROOT = iphoneos;
307 | TARGETED_DEVICE_FAMILY = "1,2";
308 | VALIDATE_PRODUCT = YES;
309 | };
310 | name = Profile;
311 | };
312 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
313 | isa = XCBuildConfiguration;
314 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
315 | buildSettings = {
316 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
317 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
318 | DEVELOPMENT_TEAM = S8QB4VV633;
319 | ENABLE_BITCODE = NO;
320 | FRAMEWORK_SEARCH_PATHS = (
321 | "$(inherited)",
322 | "$(PROJECT_DIR)/Flutter",
323 | );
324 | INFOPLIST_FILE = Runner/Info.plist;
325 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
326 | LIBRARY_SEARCH_PATHS = (
327 | "$(inherited)",
328 | "$(PROJECT_DIR)/Flutter",
329 | );
330 | PRODUCT_BUNDLE_IDENTIFIER = com.example.volumeExample;
331 | PRODUCT_NAME = "$(TARGET_NAME)";
332 | VERSIONING_SYSTEM = "apple-generic";
333 | };
334 | name = Profile;
335 | };
336 | 97C147031CF9000F007C117D /* Debug */ = {
337 | isa = XCBuildConfiguration;
338 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
339 | buildSettings = {
340 | ALWAYS_SEARCH_USER_PATHS = NO;
341 | CLANG_ANALYZER_NONNULL = YES;
342 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
343 | CLANG_CXX_LIBRARY = "libc++";
344 | CLANG_ENABLE_MODULES = YES;
345 | CLANG_ENABLE_OBJC_ARC = YES;
346 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
347 | CLANG_WARN_BOOL_CONVERSION = YES;
348 | CLANG_WARN_COMMA = YES;
349 | CLANG_WARN_CONSTANT_CONVERSION = YES;
350 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
351 | CLANG_WARN_EMPTY_BODY = YES;
352 | CLANG_WARN_ENUM_CONVERSION = YES;
353 | CLANG_WARN_INFINITE_RECURSION = YES;
354 | CLANG_WARN_INT_CONVERSION = YES;
355 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
356 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
357 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
358 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
359 | CLANG_WARN_STRICT_PROTOTYPES = YES;
360 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
361 | CLANG_WARN_UNREACHABLE_CODE = YES;
362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
363 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
364 | COPY_PHASE_STRIP = NO;
365 | DEBUG_INFORMATION_FORMAT = dwarf;
366 | ENABLE_STRICT_OBJC_MSGSEND = YES;
367 | ENABLE_TESTABILITY = YES;
368 | GCC_C_LANGUAGE_STANDARD = gnu99;
369 | GCC_DYNAMIC_NO_PIC = NO;
370 | GCC_NO_COMMON_BLOCKS = YES;
371 | GCC_OPTIMIZATION_LEVEL = 0;
372 | GCC_PREPROCESSOR_DEFINITIONS = (
373 | "DEBUG=1",
374 | "$(inherited)",
375 | );
376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
378 | GCC_WARN_UNDECLARED_SELECTOR = YES;
379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
380 | GCC_WARN_UNUSED_FUNCTION = YES;
381 | GCC_WARN_UNUSED_VARIABLE = YES;
382 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
383 | MTL_ENABLE_DEBUG_INFO = YES;
384 | ONLY_ACTIVE_ARCH = YES;
385 | SDKROOT = iphoneos;
386 | TARGETED_DEVICE_FAMILY = "1,2";
387 | };
388 | name = Debug;
389 | };
390 | 97C147041CF9000F007C117D /* Release */ = {
391 | isa = XCBuildConfiguration;
392 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
393 | buildSettings = {
394 | ALWAYS_SEARCH_USER_PATHS = NO;
395 | CLANG_ANALYZER_NONNULL = YES;
396 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
397 | CLANG_CXX_LIBRARY = "libc++";
398 | CLANG_ENABLE_MODULES = YES;
399 | CLANG_ENABLE_OBJC_ARC = YES;
400 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
401 | CLANG_WARN_BOOL_CONVERSION = YES;
402 | CLANG_WARN_COMMA = YES;
403 | CLANG_WARN_CONSTANT_CONVERSION = YES;
404 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
405 | CLANG_WARN_EMPTY_BODY = YES;
406 | CLANG_WARN_ENUM_CONVERSION = YES;
407 | CLANG_WARN_INFINITE_RECURSION = YES;
408 | CLANG_WARN_INT_CONVERSION = YES;
409 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
410 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
412 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
413 | CLANG_WARN_STRICT_PROTOTYPES = YES;
414 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
415 | CLANG_WARN_UNREACHABLE_CODE = YES;
416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
417 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
418 | COPY_PHASE_STRIP = NO;
419 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
420 | ENABLE_NS_ASSERTIONS = NO;
421 | ENABLE_STRICT_OBJC_MSGSEND = YES;
422 | GCC_C_LANGUAGE_STANDARD = gnu99;
423 | GCC_NO_COMMON_BLOCKS = YES;
424 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
425 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
426 | GCC_WARN_UNDECLARED_SELECTOR = YES;
427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
428 | GCC_WARN_UNUSED_FUNCTION = YES;
429 | GCC_WARN_UNUSED_VARIABLE = YES;
430 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
431 | MTL_ENABLE_DEBUG_INFO = NO;
432 | SDKROOT = iphoneos;
433 | TARGETED_DEVICE_FAMILY = "1,2";
434 | VALIDATE_PRODUCT = YES;
435 | };
436 | name = Release;
437 | };
438 | 97C147061CF9000F007C117D /* Debug */ = {
439 | isa = XCBuildConfiguration;
440 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
441 | buildSettings = {
442 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
443 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
444 | ENABLE_BITCODE = NO;
445 | FRAMEWORK_SEARCH_PATHS = (
446 | "$(inherited)",
447 | "$(PROJECT_DIR)/Flutter",
448 | );
449 | INFOPLIST_FILE = Runner/Info.plist;
450 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
451 | LIBRARY_SEARCH_PATHS = (
452 | "$(inherited)",
453 | "$(PROJECT_DIR)/Flutter",
454 | );
455 | PRODUCT_BUNDLE_IDENTIFIER = com.example.volumeExample;
456 | PRODUCT_NAME = "$(TARGET_NAME)";
457 | VERSIONING_SYSTEM = "apple-generic";
458 | };
459 | name = Debug;
460 | };
461 | 97C147071CF9000F007C117D /* Release */ = {
462 | isa = XCBuildConfiguration;
463 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
464 | buildSettings = {
465 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
466 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
467 | ENABLE_BITCODE = NO;
468 | FRAMEWORK_SEARCH_PATHS = (
469 | "$(inherited)",
470 | "$(PROJECT_DIR)/Flutter",
471 | );
472 | INFOPLIST_FILE = Runner/Info.plist;
473 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
474 | LIBRARY_SEARCH_PATHS = (
475 | "$(inherited)",
476 | "$(PROJECT_DIR)/Flutter",
477 | );
478 | PRODUCT_BUNDLE_IDENTIFIER = com.example.volumeExample;
479 | PRODUCT_NAME = "$(TARGET_NAME)";
480 | VERSIONING_SYSTEM = "apple-generic";
481 | };
482 | name = Release;
483 | };
484 | /* End XCBuildConfiguration section */
485 |
486 | /* Begin XCConfigurationList section */
487 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
488 | isa = XCConfigurationList;
489 | buildConfigurations = (
490 | 97C147031CF9000F007C117D /* Debug */,
491 | 97C147041CF9000F007C117D /* Release */,
492 | 249021D3217E4FDB00AE95B9 /* Profile */,
493 | );
494 | defaultConfigurationIsVisible = 0;
495 | defaultConfigurationName = Release;
496 | };
497 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
498 | isa = XCConfigurationList;
499 | buildConfigurations = (
500 | 97C147061CF9000F007C117D /* Debug */,
501 | 97C147071CF9000F007C117D /* Release */,
502 | 249021D4217E4FDB00AE95B9 /* Profile */,
503 | );
504 | defaultConfigurationIsVisible = 0;
505 | defaultConfigurationName = Release;
506 | };
507 | /* End XCConfigurationList section */
508 | };
509 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
510 | }
511 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/example/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/example/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/example/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | volume_example
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/example/ios/Runner/main.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "AppDelegate.h"
4 |
5 | int main(int argc, char* argv[]) {
6 | @autoreleasepool {
7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/example/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'dart:async';
3 | import 'package:volume/volume.dart';
4 |
5 | void main() => runApp(MyApp());
6 |
7 | class MyApp extends StatefulWidget {
8 | @override
9 | _MyAppState createState() => _MyAppState();
10 | }
11 |
12 | class _MyAppState extends State {
13 | AudioManager audioManager;
14 | int maxVol, currentVol;
15 | ShowVolumeUI showVolumeUI = ShowVolumeUI.SHOW;
16 |
17 | @override
18 | void initState() {
19 | super.initState();
20 | audioManager = AudioManager.STREAM_SYSTEM;
21 | initAudioStreamType();
22 | updateVolumes();
23 | }
24 |
25 | Future initAudioStreamType() async {
26 | await Volume.controlVolume(AudioManager.STREAM_SYSTEM);
27 | }
28 |
29 | updateVolumes() async {
30 | // get Max Volume
31 | maxVol = await Volume.getMaxVol;
32 | // get Current Volume
33 | currentVol = await Volume.getVol;
34 | setState(() {});
35 | }
36 |
37 | setVol(int i) async {
38 | await Volume.setVol(i, showVolumeUI: showVolumeUI);
39 | }
40 |
41 | @override
42 | Widget build(BuildContext context) {
43 | return MaterialApp(
44 | home: Scaffold(
45 | appBar: AppBar(
46 | title: const Text('Plugin example app'),
47 | ),
48 | body: Center(
49 | child: Column(
50 | mainAxisAlignment: MainAxisAlignment.spaceEvenly,
51 | children: [
52 | DropdownButton(
53 | value: audioManager,
54 | items: [
55 | DropdownMenuItem(
56 | child: Text("In Call Volume"),
57 | value: AudioManager.STREAM_VOICE_CALL,
58 | ),
59 | DropdownMenuItem(
60 | child: Text("System Volume"),
61 | value: AudioManager.STREAM_SYSTEM,
62 | ),
63 | DropdownMenuItem(
64 | child: Text("Ring Volume"),
65 | value: AudioManager.STREAM_RING,
66 | ),
67 | DropdownMenuItem(
68 | child: Text("Media Volume"),
69 | value: AudioManager.STREAM_MUSIC,
70 | ),
71 | DropdownMenuItem(
72 | child: Text("Alarm volume"),
73 | value: AudioManager.STREAM_ALARM,
74 | ),
75 | DropdownMenuItem(
76 | child: Text("Notifications Volume"),
77 | value: AudioManager.STREAM_NOTIFICATION,
78 | ),
79 | ],
80 | isDense: true,
81 | onChanged: (AudioManager aM) async {
82 | print(aM.toString());
83 | setState(() {
84 | audioManager = aM;
85 | });
86 | await Volume.controlVolume(aM);
87 | },
88 | ),
89 | ToggleButtons(
90 | // renderBorder: false,
91 | borderRadius: BorderRadius.all(Radius.circular(10.0)),
92 | children: [
93 | Padding(
94 | padding: const EdgeInsets.all(20.0),
95 | child: Text(
96 | "Show UI",
97 | ),
98 | ),
99 | Padding(
100 | padding: const EdgeInsets.all(20.0),
101 | child: Text(
102 | "Hide UI",
103 | ),
104 | ),
105 | ],
106 | isSelected: [
107 | showVolumeUI == ShowVolumeUI.SHOW,
108 | showVolumeUI == ShowVolumeUI.HIDE
109 | ],
110 | onPressed: (int i){
111 | setState(() {
112 | if(i == 0){
113 | showVolumeUI = ShowVolumeUI.SHOW;
114 | }else if (i == 1){
115 | showVolumeUI = ShowVolumeUI.HIDE;
116 | }
117 | });
118 | },
119 | ),
120 | (currentVol != null || maxVol != null)
121 | ? Slider(
122 | value: currentVol / 1.0,
123 | divisions: maxVol,
124 | max: maxVol / 1.0,
125 | min: 0,
126 | onChanged: (double d) {
127 | setVol(d.toInt());
128 | updateVolumes();
129 | },
130 | )
131 | : Container(),
132 |
133 | // FlatButton(
134 | // child: Text("Vol Up"),
135 | // onPressed: (){
136 | // Volume.volUp();
137 | // updateVolumes();
138 | // },
139 | // ),
140 | // FlatButton(
141 | // child: Text("Vol Down"),
142 | // onPressed: (){
143 | // Volume.volDown();
144 | // updateVolumes();
145 | // },
146 | // )
147 | ],
148 | ),
149 | ),
150 | ),
151 | );
152 | }
153 | }
154 |
--------------------------------------------------------------------------------
/example/pubspec.yaml:
--------------------------------------------------------------------------------
1 |
2 | name: volume_example
3 | description: Demonstrates how to use the volume plugin.
4 | publish_to: 'none'
5 |
6 | environment:
7 | sdk: ">=2.0.0 <3.0.0"
8 | flutter: ^1.10.0
9 |
10 |
11 | dependencies:
12 | flutter:
13 | sdk: flutter
14 |
15 | # The following adds the Cupertino Icons font to your application.
16 | # Use with the CupertinoIcons class for iOS style icons.
17 | cupertino_icons: ^0.1.3
18 |
19 | dev_dependencies:
20 | flutter_test:
21 | sdk: flutter
22 |
23 | volume:
24 | path: ../
25 |
26 | # For information on the generic Dart part of this file, see the
27 | # following page: https://www.dartlang.org/tools/pub/pubspec
28 |
29 | # The following section is specific to Flutter.
30 | flutter:
31 |
32 | # The following line ensures that the Material Icons font is
33 | # included with your application, so that you can use the icons in
34 | # the material Icons class.
35 | uses-material-design: true
36 |
37 | # To add assets to your application, add an assets section, like this:
38 | # assets:
39 | # - images/a_dot_burr.jpeg
40 | # - images/a_dot_ham.jpeg
41 |
42 | # An image asset can refer to one or more resolution-specific "variants", see
43 | # https://flutter.io/assets-and-images/#resolution-aware.
44 |
45 | # For details regarding adding assets from package dependencies, see
46 | # https://flutter.io/assets-and-images/#from-packages
47 |
48 | # To add custom fonts to your application, add a fonts section here,
49 | # in this "flutter" section. Each entry in this list should have a
50 | # "family" key with the font family name, and a "fonts" key with a
51 | # list giving the asset and other descriptors for the font. For
52 | # example:
53 | # fonts:
54 | # - family: Schyler
55 | # fonts:
56 | # - asset: fonts/Schyler-Regular.ttf
57 | # - asset: fonts/Schyler-Italic.ttf
58 | # style: italic
59 | # - family: Trajan Pro
60 | # fonts:
61 | # - asset: fonts/TrajanPro.ttf
62 | # - asset: fonts/TrajanPro_Bold.ttf
63 | # weight: 700
64 | #
65 | # For details regarding fonts from package dependencies,
66 | # see https://flutter.io/custom-fonts/#from-packages
67 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | .idea/
2 | .vagrant/
3 | .sconsign.dblite
4 | .svn/
5 |
6 | .DS_Store
7 | *.swp
8 | profile
9 |
10 | DerivedData/
11 | build/
12 | GeneratedPluginRegistrant.h
13 | GeneratedPluginRegistrant.m
14 |
15 | .generated/
16 |
17 | *.pbxuser
18 | *.mode1v3
19 | *.mode2v3
20 | *.perspectivev3
21 |
22 | !default.pbxuser
23 | !default.mode1v3
24 | !default.mode2v3
25 | !default.perspectivev3
26 |
27 | xcuserdata
28 |
29 | *.moved-aside
30 |
31 | *.pyc
32 | *sync/
33 | Icon?
34 | .tags*
35 |
36 | /Flutter/Generated.xcconfig
37 |
--------------------------------------------------------------------------------
/ios/Assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Aman-Malhotra/Volume_Flutter/93647ac2830f9eb0a277b1cdf316b42c1efb1b5a/ios/Assets/.gitkeep
--------------------------------------------------------------------------------
/ios/Classes/VolumePlugin.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface VolumePlugin : NSObject
4 | @end
5 |
--------------------------------------------------------------------------------
/ios/Classes/VolumePlugin.m:
--------------------------------------------------------------------------------
1 | #import "VolumePlugin.h"
2 |
3 | @implementation VolumePlugin
4 | + (void)registerWithRegistrar:(NSObject*)registrar {
5 | FlutterMethodChannel* channel = [FlutterMethodChannel
6 | methodChannelWithName:@"volume"
7 | binaryMessenger:[registrar messenger]];
8 | VolumePlugin* instance = [[VolumePlugin alloc] init];
9 | [registrar addMethodCallDelegate:instance channel:channel];
10 | }
11 |
12 | - (void)handleMethodCall:(FlutterMethodCall*)call result:(FlutterResult)result {
13 | if ([@"getPlatformVersion" isEqualToString:call.method]) {
14 | result([@"iOS " stringByAppendingString:[[UIDevice currentDevice] systemVersion]]);
15 | } else {
16 | result(FlutterMethodNotImplemented);
17 | }
18 | }
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/ios/volume.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
3 | #
4 | Pod::Spec.new do |s|
5 | s.name = 'volume'
6 | s.version = '0.0.1'
7 | s.summary = 'A new flutter plugin project.'
8 | s.description = <<-DESC
9 | A new flutter plugin project.
10 | DESC
11 | s.homepage = 'http://example.com'
12 | s.license = { :file => '../LICENSE' }
13 | s.author = { 'Your Company' => 'email@example.com' }
14 | s.source = { :path => '.' }
15 | s.source_files = 'Classes/**/*'
16 | s.public_header_files = 'Classes/**/*.h'
17 | s.dependency 'Flutter'
18 |
19 | s.ios.deployment_target = '8.0'
20 | end
21 |
22 |
--------------------------------------------------------------------------------
/lib/volume.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'package:flutter/services.dart';
3 |
4 | /// AudioManager Streams control the type of volume the getVol and setVol function will control.
5 | enum AudioManager {
6 | /// Controls the Voice Call volume
7 | STREAM_VOICE_CALL,
8 |
9 | /// Controls the system volume
10 | STREAM_SYSTEM,
11 |
12 | /// Controls the ringer volume
13 | STREAM_RING,
14 |
15 | /// Controls the media volume
16 | STREAM_MUSIC,
17 |
18 | // Controls the alarm volume
19 | STREAM_ALARM,
20 |
21 | /// Controls the notification volume
22 | STREAM_NOTIFICATION
23 | }
24 |
25 | enum ShowVolumeUI {
26 | /// HIDE System UI while changing volume,
27 | SHOW,
28 |
29 | /// HIDE System UI while changing volume,
30 | HIDE
31 | }
32 |
33 | /// You can control VoiceCall, System, Ringer, Media, Alarm, Notification
34 | /// volume and get the max possible volumes for the respective.
35 | ///
36 | /// Call the controlVolume ( AudioManager ) function in initState ()
37 | ///
38 | /// to to make sure the setVol ( int ) , getMaxVol, and getVol control
39 | ///
40 | /// the volume passed as the parameter to the controlVolume ( AudioManager )
41 | /// function.
42 | class Volume {
43 | static const MethodChannel _channel = const MethodChannel('volume');
44 |
45 | /// Pass any AudioManager Stream as a parameter to this function and the
46 | /// volume buttons and setVol (...) function will control that particular volume.
47 | static Future controlVolume(AudioManager audioManager) async {
48 | Map map = {};
49 | map.putIfAbsent("streamType", () {
50 | return _getStreamInt(audioManager);
51 | });
52 | await _channel.invokeMethod('controlVolume', map);
53 | return null;
54 | }
55 |
56 | /// Returns an int which is the Max Possible volume for the selected
57 | /// AudioManager Stream same as that passed in the
58 | /// controlVolume ( AudioManager ) function.
59 | ///
60 | /// Can be implemented like this :-
61 | ///
62 | /// int maxVol = await Volume.getMaxVol;
63 | static Future get getMaxVol async {
64 | int maxVol = await _channel.invokeMethod('getMaxVol');
65 | return maxVol;
66 | }
67 |
68 | /// Returns an int which is the current volume for the selected
69 | /// AudioManager Stream same as that passed in the
70 | /// controlVolume ( AudioManager ) function.
71 | ///
72 | /// Can be implemented like this :-
73 | ///
74 | /// int currentVol = await Volume.getVol;
75 | static Future get getVol async {
76 | int vol = await _channel.invokeMethod('getVol');
77 | return vol;
78 | }
79 |
80 | /// Call this function with an integer value to set the volume of the selected.
81 | /// OPTIONAL PARAMETER [ShowVolumeUI showVolumeUI]
82 | /// to show or hide system Volume UI while changing the volume.
83 | /// AudioManager stream but value should be less then value returned by getMaxVol getter
84 | ///
85 | /// Can be implemented as :-
86 | ///
87 | /// await Volume.setVol ( int i, ShowVolumeUI showVolumeUI );
88 | ///
89 | /// where value of 'i' is less then Volume.getMaxVol
90 | ///
91 | /// value of showVolumeUI can have two values [ShowVolumeUI.SHOW] and [ShowVolumeUI.HIDE]
92 | static Future setVol(int i,
93 | {ShowVolumeUI showVolumeUI = ShowVolumeUI.SHOW}) async {
94 | Map map = {};
95 | map.putIfAbsent("newVol", () {
96 | return i;
97 | });
98 | map.putIfAbsent("showVolumeUiFlag", () {
99 | return _getShowVolumeUiInt(showVolumeUI);
100 | });
101 | int vol = await _channel.invokeMethod('setVol', map);
102 | return vol;
103 | }
104 |
105 | /// Press VolumeUp button programmatically.
106 | /// It returns a null.
107 | ///
108 | /// Implementation :-
109 | ///
110 | /// Volume.volUp()
111 | // static Future volUp() async{
112 | // await SystemShortcuts.volUp();
113 | // }
114 |
115 | /// Press VolumeDown button programmatically.
116 | /// It returns a null.
117 | ///
118 | /// Implementation :-
119 | ///
120 | /// Volume.volDown()
121 | // static Future volDown() async{
122 | // await SystemShortcuts.volDown();
123 | // }
124 | }
125 |
126 | int _getShowVolumeUiInt(ShowVolumeUI showVolumeUI) {
127 | switch (showVolumeUI) {
128 | case ShowVolumeUI.SHOW:
129 | return 1;
130 | case ShowVolumeUI.HIDE:
131 | return 0;
132 | default:
133 | return 1;
134 | }
135 | }
136 |
137 | int _getStreamInt(AudioManager audioManager) {
138 | switch (audioManager) {
139 | case AudioManager.STREAM_VOICE_CALL:
140 | return 0;
141 | case AudioManager.STREAM_SYSTEM:
142 | return 1;
143 | case AudioManager.STREAM_RING:
144 | return 2;
145 | case AudioManager.STREAM_MUSIC:
146 | return 3;
147 | case AudioManager.STREAM_ALARM:
148 | return 4;
149 | case AudioManager.STREAM_NOTIFICATION:
150 | return 5;
151 | default:
152 | return null;
153 | }
154 | }
155 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 |
2 | name: volume
3 | description: Volume plugin to control device VOLUME for Android. Pull request for IOS implementation is welcome.
4 | version: 1.0.1
5 | homepage: https://github.com/aman-malhotra-1999/Volume_Flutter.git
6 |
7 | environment:
8 | sdk: ">=2.0.0 <3.0.0"
9 | flutter: ^1.10.0
10 | dependencies:
11 | flutter:
12 | sdk: flutter
13 |
14 | system_shortcuts: ^1.0.0
15 |
16 | flutter:
17 | plugin:
18 | platforms:
19 | android:
20 | package: com.example.volume
21 | pluginClass: VolumePlugin
22 |
--------------------------------------------------------------------------------
/volume.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------