Browse Source

init commit

rhyme 5 years ago
commit
c06a8ab93d
100 changed files with 3064 additions and 0 deletions
  1. 22 0
      .gitignore
  2. 77 0
      CHANGELOG.md
  3. 21 0
      LICENSE
  4. BIN
      Logotype primary.png
  5. 250 0
      README.md
  6. 8 0
      android/.gitignore
  7. 37 0
      android/build.gradle
  8. 1 0
      android/gradle.properties
  9. 1 0
      android/settings.gradle
  10. 3 0
      android/src/main/AndroidManifest.xml
  11. 17 0
      android/src/main/java/com/dooboolab/fluttersound/AudioInterface.java
  12. 69 0
      android/src/main/java/com/dooboolab/fluttersound/AudioModel.java
  13. 463 0
      android/src/main/java/com/dooboolab/fluttersound/FlutterSoundPlugin.java
  14. 1 0
      example/.flutter-plugins-dependencies
  15. 9 0
      example/.gitignore
  16. 8 0
      example/.metadata
  17. 28 0
      example/README.md
  18. 10 0
      example/android/.gitignore
  19. 62 0
      example/android/app/build.gradle
  20. 41 0
      example/android/app/src/main/AndroidManifest.xml
  21. 13 0
      example/android/app/src/main/java/com/dooboolab/fluttersoundexample/MainActivity.java
  22. 12 0
      example/android/app/src/main/res/drawable/launch_background.xml
  23. BIN
      example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  24. BIN
      example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  25. BIN
      example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  26. BIN
      example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  27. BIN
      example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  28. 8 0
      example/android/app/src/main/res/values/styles.xml
  29. 29 0
      example/android/build.gradle
  30. 2 0
      example/android/gradle.properties
  31. BIN
      example/android/gradle/wrapper/gradle-wrapper.jar
  32. 6 0
      example/android/gradle/wrapper/gradle-wrapper.properties
  33. 160 0
      example/android/gradlew
  34. 90 0
      example/android/gradlew.bat
  35. 15 0
      example/android/settings.gradle
  36. 18 0
      example/flutter_sound_example.iml
  37. 27 0
      example/flutter_sound_example_android.iml
  38. 45 0
      example/ios/.gitignore
  39. 26 0
      example/ios/Flutter/AppFrameworkInfo.plist
  40. 2 0
      example/ios/Flutter/Debug.xcconfig
  41. 2 0
      example/ios/Flutter/Release.xcconfig
  42. 63 0
      example/ios/Podfile
  43. 22 0
      example/ios/Podfile.lock
  44. 503 0
      example/ios/Runner.xcodeproj/project.pbxproj
  45. 7 0
      example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  46. 93 0
      example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
  47. 10 0
      example/ios/Runner.xcworkspace/contents.xcworkspacedata
  48. 8 0
      example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
  49. 8 0
      example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  50. 6 0
      example/ios/Runner/AppDelegate.h
  51. 13 0
      example/ios/Runner/AppDelegate.m
  52. 122 0
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
  53. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
  54. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
  55. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
  56. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
  57. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
  58. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
  59. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
  60. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
  61. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
  62. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
  63. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
  64. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
  65. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
  66. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
  67. BIN
      example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
  68. 23 0
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
  69. BIN
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
  70. BIN
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
  71. BIN
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
  72. 5 0
      example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
  73. 37 0
      example/ios/Runner/Base.lproj/LaunchScreen.storyboard
  74. 26 0
      example/ios/Runner/Base.lproj/Main.storyboard
  75. 53 0
      example/ios/Runner/Info.plist
  76. 9 0
      example/ios/Runner/main.m
  77. 305 0
      example/lib/main.dart
  78. 84 0
      example/pubspec.yaml
  79. BIN
      example/res/icons/2.0x/ic_mic.png
  80. BIN
      example/res/icons/2.0x/ic_pause.png
  81. BIN
      example/res/icons/2.0x/ic_play.png
  82. BIN
      example/res/icons/2.0x/ic_stop.png
  83. BIN
      example/res/icons/2.0x/ic_volume_down.png
  84. BIN
      example/res/icons/2.0x/ic_volume_up.png
  85. BIN
      example/res/icons/3.0x/ic_mic.png
  86. BIN
      example/res/icons/3.0x/ic_pause.png
  87. BIN
      example/res/icons/3.0x/ic_play.png
  88. BIN
      example/res/icons/3.0x/ic_stop.png
  89. BIN
      example/res/icons/3.0x/ic_volume_down.png
  90. BIN
      example/res/icons/3.0x/ic_volume_up.png
  91. BIN
      example/res/icons/ic_mic.png
  92. BIN
      example/res/icons/ic_pause.png
  93. BIN
      example/res/icons/ic_play.png
  94. BIN
      example/res/icons/ic_stop.png
  95. BIN
      example/res/icons/ic_volume_down.png
  96. BIN
      example/res/icons/ic_volume_up.png
  97. 39 0
      example/test/widget_test.dart
  98. 36 0
      ios/.gitignore
  99. 0 0
      ios/Assets/.gitkeep
  100. 9 0
      ios/Classes/FlutterSoundPlugin.h

+ 22 - 0
.gitignore

@@ -0,0 +1,22 @@
+.DS_Store
+.dart_tool/
+
+.packages
+.pub/
+pubspec.lock
+
+build/
+
+.idea/
+flutter_sound.iml
+flutter_sound_android.iml
+android/.settings/org.eclipse.buildship.core.prefs
+.vscode/launch.json
+android/.classpath
+android/.project
+example/android/.project
+example/android/.settings/org.eclipse.buildship.core.prefs
+example/android/app/.classpath
+example/android/app/.project
+example/android/app/.settings/org.eclipse.buildship.core.prefs
+flutter_export_environment*

+ 77 - 0
CHANGELOG.md

@@ -0,0 +1,77 @@
+## 1.6.0
++ Set android default encoding option to `AAC`.
++ Fix android default poor sound.
+  - Resolve [#155](https://github.com/dooboolab/flutter_sound/issues/155)
+  - Resolve [#95](https://github.com/dooboolab/flutter_sound/issues/95)
+  - Resolve [#75](https://github.com/dooboolab/flutter_sound/issues/79)
+## 1.5.2
++ Postfix `GetDirectoryType` to avoid conflicts [#147](https://github.com/dooboolab/flutter_sound/pull/147)
+## 1.5.1
++ Set android recorder encoder default value to `AndroidEncoder.DEFAULT`.
+## 1.5.0
++ Use `NSCachesDirectory` instead of `NSTemporaryDirectory` [#141](https://github.com/dooboolab/flutter_sound/pull/141)
+## 1.4.8
++ Resolve [#129](https://github.com/dooboolab/flutter_sound/issues/129)
+## 1.4.7
++ Resolve few issues on `ios` record path.
++ Resolve issue `playing` status so player can resume.
++ Resolve [#134](https://github.com/dooboolab/flutter_sound/issues/134)
++ Resolve [#135](https://github.com/dooboolab/flutter_sound/issues/135)
+## 1.4.4
++ Stopped recording generating infinite db values [#131](https://github.com/dooboolab/flutter_sound/pull/131)
+## 1.4.3
++ Improved db calcs [#123](https://github.com/dooboolab/flutter_sound/pull/123)
+## 1.4.2
++ Fixed 'mediaplayer went away with unhandled events' bug [#104](https://github.com/dooboolab/flutter_sound/pull/104)
+## 1.4.1
++ Fixed 'mediaplayer went away with unhandled events' bug [#83](https://github.com/dooboolab/flutter_sound/pull/83)
+## 1.4.0
++ AndroidX compatibility improved [#68](https://github.com/dooboolab/flutter_sound/pull/68)
++ iOS: Fixes for seekToPlayer [#72](https://github.com/dooboolab/flutter_sound/pull/72)
++ iOS: Setup configuration for using bluetooth microphone recording input [#73](https://github.com/dooboolab/flutter_sound/pull/73)
+
+## 1.3.6
++ Android: Adds a single threaded command scheduler for all recording related
+  commands.
++ Switch source & target compability to Java 8
++ Bump gradle plugin version dependencies
+
+## 1.3.+
++ Support db/meter [#41](https://github.com/dooboolab/flutter_sound/pull/41)
++ Show wrong recorder timer text [#47](https://github.com/dooboolab/flutter_sound/pull/47)
++ Add ability to specify Android & iOS encoder [#49](https://github.com/dooboolab/flutter_sound/pull/49)
++ Adjust db range and fix nullable check in ios [#59](https://github.com/dooboolab/flutter_sound/pull/59)
++ Android: Recording operations on a separate command queue [#66](https://github.com/dooboolab/flutter_sound/pull/66)
++ Android: Remove reference to non-AndroidX classes which improves compatibility
+
+## 1.2.+
+* Fixed sound distorting when playing recorded audio again. Issue [#14](https://github.com/dooboolab/flutter_sound/issues/14).
+* Fixed `seekToPlayer` for android. Issue [#10](https://github.com/dooboolab/flutter_sound/issues/10).
++ Expose recorder `sampleRate` and `numChannel`.
++ Do not append `tmp` when filePath provided in `ios`.
++ Resolve `regression` issue in `1.2.3` which caused in `1.2.2`.
++ Reduce the size of audio file in `1.2.4`. Related [#26](https://github.com/dooboolab/flutter_sound/issues/26).
++ Fixed `recording` issue in android in `1.2.5`.
++ Changed `seekToPlayer` to place exact `secs` instead adding it.
++ Fix file URI for recording and playing in iOS.
+## 1.1.+
+* Released 1.1.0 with beautiful logo from mansa.
+* Improved readme.
+* Resolve #7.
+* Fixed missing break in switch statement.
+## 1.0.9
+* Reimport `intl` which is needed to format date in Dart.
+## 1.0.8
+* Implemented `setVolume` method.
+* Specific error messages given in android.
+* Manage ios player thread when audio is not loaded.
+## 1.0.7
+* Safer handling of progressUpdate in ios when audio is invalid.
+## 1.0.6
+* Fixed bug in platform specific code.
+## 1.0.5
+* Fixed pug in `seekToPlayer` in `ios`.
+## 1.0.3
+* Added license.
+## 1.0.0
+* Released preview version for audio `recorder` and `player`.

+ 21 - 0
LICENSE

@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 dooboolab
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

BIN
Logotype primary.png


+ 250 - 0
README.md

@@ -0,0 +1,250 @@
+# flutter_sound
+
+<img src="https://raw.githubusercontent.com/dooboolab/flutter_sound/master/Logotype primary.png" width="70%" height="70%" />
+
+<p align="left">
+  <a href="https://pub.dartlang.org/packages/flutter_sound"><img alt="pub version" src="https://img.shields.io/pub/v/flutter_sound.svg?style=flat-square"></a>
+</p>
+This plugin provides simple recorder and player functionalities for both `android` and `ios` platforms. This only supports default file extension for each platform.
+This plugin handles file from remote url.
+This plugin can handle playback stream from native (To sync exact time with bridging).
+<br/><img src="https://firebasestorage.googleapis.com/v0/b/flutterdart-5d354.appspot.com/o/flutter_sound.gif?alt=media&token=f9e01ee6-0dc6-4988-b96a-52cc4f4824c4"/>
+
+## Free Read
+[Medium Blog](https://medium.com/@dooboolab/flutter-sound-plugin-audio-recorder-player-e5a455a8beaf)
+
+## Getting Started
+For help getting started with Flutter, view our online
+[documentation](https://flutter.io/).
+
+## Install
+Add ```flutter_sound``` as a dependency in pubspec.yaml
+For help on adding as a dependency, view the [documentation](https://flutter.io/using-packages/).
+
+## Post Installation
+On *iOS* you need to add a usage description to `info.plist`:
+
+```xml
+<key>NSMicrophoneUsageDescription</key>
+<string>This sample uses the microphone to record your speech and convert it to text.</string>
+<key>UIBackgroundModes</key>
+<array>
+	<string>audio</string>
+</array>
+```
+
+On *Android* you need to add a permission to `AndroidManifest.xml`:
+```xml
+<uses-permission android:name="android.permission.RECORD_AUDIO" />
+<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+```
+
+## Methods
+| Func  | Param  | Return | Description |
+| :------------ |:---------------:| :---------------:| :-----|
+| setSubscriptionDuration | `double sec` | `String` message | Set subscription timer in seconds. Default is `0.01` if not using this method.|
+| startRecorder | `String uri`, `int sampleRate`, `int numChannels` | `String` uri | Start recording. This will return uri used. |
+| stopRecorder | | `String` message | Stop recording.  |
+| startPlayer | `String uri` | `String` message | Start playing.  |
+| stopPlayer | | `String` message | Stop playing. |
+| pausePlayer | | `String` message | Pause playing. |
+| resumePlayer | | `String` message | Resume playing. |
+| seekToPlayer | `int milliSecs` position to goTo | `String` message | Seek audio to selected position in seconds. Parameter should be less than audio duration to correctly placed. |
+
+## Subscriptions
+| Subscription | Return | Description |
+| :------------ |:---------------:| :---------------:|
+| onRecorderStateChanged | `<RecordStatus>` | Able to listen to subscription when recorder starts. |
+| onPlayerStateChanged | `<PlayStatus>` | Able to listen to subscription when player starts. |
+
+
+## Default uri path
+When uri path is not set during the `function call` in `startRecorder` or `startPlayer`, they are saved in below path depending on the platform.
++ Default path for android
+  * `sdcard/sound.aac`.
++ Default path for ios
+  * `sound.aac`.
+
+## Usage
+#### Creating instance.
+In your view/page/dialog widget's State class, create an instance of FlutterSound.
+
+```dart
+FlutterSound flutterSound = new FlutterSound();
+```
+
+#### Starting recorder with listener.
+```dart
+Future<String> result = await flutterSound.startRecorder(null);
+
+result.then(path) {
+	print('startRecorder: $path');
+
+	_recorderSubscription = flutterSound.onRecorderStateChanged.listen((e) {
+	DateTime date = new DateTime.fromMillisecondsSinceEpoch(e.currentPosition.toInt());
+	String txt = DateFormat('mm:ss:SS', 'en_US').format(date);
+	});
+}
+```
+
+If you want to take your own path specify it like below.
+```
+String path = await flutterSound.startRecorder(Platform.isIOS ? 'ios.aac' : 'android.aac');
+```
+
+#### Stop recorder
+```dart
+Future<String> result = await flutterSound.stopRecorder();
+
+result.then(value) {
+	print('stopRecorder: $value');
+
+	if (_recorderSubscription != null) {
+		_recorderSubscription.cancel();
+		_recorderSubscription = null;
+	}
+}
+```
+
+You MUST ensure that the recorder has been stopped when your widget is detached from the ui.
+Overload your widget's dispose() method to stop the recorder when your widget is disposed.
+
+```dart
+@override
+void dispose() {
+	flutterSound.stopRecorder();
+	super.dispose();
+}
+```
+
+#### Start player
+To start playback of a recording call startPlayer.
+
+You must wait for the return value to complete before attempting to add any listeners
+to ensure that the player has fully initialised.
+
+```dart
+Future<String> result = await flutterSound.startPlayer(null);
+
+result.then(path) {
+	print('startPlayer: $path');
+
+	_playerSubscription = flutterSound.onPlayerStateChanged.listen((e) {
+		if (e != null) {
+			DateTime date = new DateTime.fromMillisecondsSinceEpoch(e.currentPosition.toInt());
+			String txt = DateFormat('mm:ss:SS', 'en_US').format(date);
+			this.setState(() {
+				this._isPlaying = true;
+				this._playerTxt = txt.substring(0, 8);
+			});
+		}
+	});
+}
+```
+
+#### Stop player
+
+
+```dart
+Future<String> result = await flutterSound.stopPlayer();
+
+result.then(value) {
+	print('stopPlayer: $result');
+	if (_playerSubscription != null) {
+		_playerSubscription.cancel();
+		_playerSubscription = null;
+	}
+}
+```
+
+You MUST ensure that the player has been stopped when your widget is detached from the ui.
+Overload your widget's dispose() method to stop the player when your widget is disposed.
+
+```dart
+@override
+void dispose() {
+	flutterSound.stopPlayer();
+	super.dispose();
+}
+```
+
+#### Pause player
+```dart
+Future<String> result = await flutterSound.pausePlayer();
+```
+
+#### Resume player
+```dart
+Future<String> result = await flutterSound.resumePlayer();
+```
+
+#### Seek player
+
+To seek to a new location the player must already be playing.
+```dart
+String Future<result> = await flutterSound.seekToPlayer(miliSecs);
+```
+
+#### Setting subscription duration (Optional). 0.01 is default value when not set.
+```dart
+/// 0.01 is default
+flutterSound.setSubscriptionDuration(0.01);
+```
+
+#### Setting volume.
+```dart
+/// 1.0 is default
+/// Currently, volume can be changed when player is running. Try manage this right after player starts.
+String path = await flutterSound.startPlayer(null);
+await flutterSound.setVolume(0.1);
+```
+
+#### Using the amplitude meter
+The amplitude meter allows displaying a basic representation of the input sound.
+When enabled, it returns values ranging 0-120dB.
+
+```dart
+//// By default this option is disabled, you can enable it by calling
+setDbLevelEnabled(true);
+```
+
+```dart
+//// You can tweak the frequency of updates by calling this function (unit is seconds)
+updateDbPeakProgress(0.8);
+```
+
+```dart
+//// You need to subscribe in order to receive the value updates
+_dbPeakSubscription = flutterSound.onRecorderDbPeakChanged.listen((value) {
+  setState(() {
+    this._dbLevel = value;
+  });
+});
+```
+
+### TODO
+- [ ] Seeking example in `Example` project
+- [x] Volume Control
+- [x] Sync timing for recorder callback handler
+
+
+### DEBUG
+When you face below error,
+```
+* What went wrong:
+A problem occurred evaluating project ':app'.
+> versionCode not found. Define flutter.versionCode in the local.properties file.
+```
+Please add below to your `example/android/local.properties` file.
+```
+flutter.versionName=1.0.0
+flutter.versionCode=1
+flutter.buildMode=debug
+```
+
+
+## Help Maintenance
+I've been maintaining quite many repos these days and burning out slowly. If you could help me cheer up, buying me a cup of coffee will make my life really happy and get much energy out of it.
+<br/>
+<a href="https://www.buymeacoffee.com/dooboolab" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/purple_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>
+[![Paypal](https://www.paypalobjects.com/webstatic/mktg/Logo/pp-logo-100px.png)](https://paypal.me/dooboolab)

+ 8 - 0
android/.gitignore

@@ -0,0 +1,8 @@
+*.iml
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures

+ 37 - 0
android/build.gradle

@@ -0,0 +1,37 @@
+group 'com.dooboolab.fluttersound'
+version '1.0-SNAPSHOT'
+
+buildscript {
+    repositories {
+        google()
+        jcenter()
+    }
+
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.4.0'
+    }
+}
+
+rootProject.allprojects {
+    repositories {
+        google()
+        jcenter()
+    }
+}
+
+apply plugin: 'com.android.library'
+
+android {
+    compileSdkVersion 28
+
+    defaultConfig {
+        minSdkVersion 16
+    }
+    lintOptions {
+        disable 'InvalidPackage'
+    }
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+}

+ 1 - 0
android/gradle.properties

@@ -0,0 +1 @@
+org.gradle.jvmargs=-Xmx1536M

+ 1 - 0
android/settings.gradle

@@ -0,0 +1 @@
+rootProject.name = 'flutter_sound'

+ 3 - 0
android/src/main/AndroidManifest.xml

@@ -0,0 +1,3 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+  package="com.dooboolab.fluttersound">
+</manifest>

+ 17 - 0
android/src/main/java/com/dooboolab/fluttersound/AudioInterface.java

@@ -0,0 +1,17 @@
+package com.dooboolab.fluttersound;
+
+import io.flutter.plugin.common.MethodChannel;
+
+interface AudioInterface {
+  void startRecorder(Integer numChannels, Integer sampleRate, Integer bitRate, int androidEncoder, int androidAudioSource, int androidOutputFormat, String path, MethodChannel.Result result);
+  void stopRecorder(MethodChannel.Result result);
+  void startPlayer(String path, MethodChannel.Result result);
+  void stopPlayer(MethodChannel.Result result);
+  void pausePlayer(MethodChannel.Result result);
+  void resumePlayer(MethodChannel.Result result);
+  void seekToPlayer(int sec, MethodChannel.Result result);
+  void setVolume(double volume, MethodChannel.Result result);
+  void setSubscriptionDuration(double sec, MethodChannel.Result result);
+  void setDbPeakLevelUpdate(double intervalInSecs, MethodChannel.Result result);
+  void setDbLevelEnabled(boolean enabled, MethodChannel.Result result);
+}

+ 69 - 0
android/src/main/java/com/dooboolab/fluttersound/AudioModel.java

@@ -0,0 +1,69 @@
+package com.dooboolab.fluttersound;
+
+import android.media.MediaPlayer;
+import android.media.MediaRecorder;
+import android.os.Environment;
+
+public class AudioModel {
+  final public static String DEFAULT_FILE_LOCATION = Environment.getExternalStorageDirectory().getPath() + "/default.aac";
+  public int subsDurationMillis = 10;
+  public long peakLevelUpdateMillis = 800;
+  public boolean shouldProcessDbLevel = true;
+
+  private MediaRecorder mediaRecorder;
+  private Runnable recorderTicker;
+  private Runnable dbLevelTicker;
+  private long recordTime = 0;
+  public final double micLevelBase = 2700;
+
+  private MediaPlayer mediaPlayer;
+  private long playTime = 0;
+
+  public MediaRecorder getMediaRecorder() {
+    return mediaRecorder;
+  }
+
+  public void setMediaRecorder(MediaRecorder mediaRecorder) {
+    this.mediaRecorder = mediaRecorder;
+  }
+
+  public Runnable getRecorderTicker() {
+    return recorderTicker;
+  }
+
+  public void setRecorderTicker(Runnable recorderTicker) {
+    this.recorderTicker = recorderTicker;
+  }
+
+  public Runnable getDbLevelTicker() {
+    return dbLevelTicker;
+  }
+
+  public void setDbLevelTicker(Runnable ticker){
+    this.dbLevelTicker = ticker;
+  }
+
+  public long getRecordTime() {
+    return recordTime;
+  }
+
+  public void setRecordTime(long recordTime) {
+    this.recordTime = recordTime;
+  }
+
+  public MediaPlayer getMediaPlayer() {
+    return mediaPlayer;
+  }
+
+  public void setMediaPlayer(MediaPlayer mediaPlayer) {
+    this.mediaPlayer = mediaPlayer;
+  }
+
+  public long getPlayTime() {
+    return playTime;
+  }
+
+  public void setPlayTime(long playTime) {
+    this.playTime = playTime;
+  }
+}

+ 463 - 0
android/src/main/java/com/dooboolab/fluttersound/FlutterSoundPlugin.java

@@ -0,0 +1,463 @@
+package com.dooboolab.fluttersound;
+
+import android.Manifest;
+import android.content.pm.PackageManager;
+import android.media.MediaPlayer;
+import android.media.MediaRecorder;
+import android.os.Build;
+import android.os.Handler;
+import android.os.SystemClock;
+import android.util.Log;
+import android.os.Environment;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import io.flutter.plugin.common.MethodCall;
+import io.flutter.plugin.common.MethodChannel;
+import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
+import io.flutter.plugin.common.MethodChannel.Result;
+import io.flutter.plugin.common.PluginRegistry;
+import io.flutter.plugin.common.PluginRegistry.Registrar;
+
+/** FlutterSoundPlugin */
+public class FlutterSoundPlugin implements MethodCallHandler, PluginRegistry.RequestPermissionsResultListener, AudioInterface{   
+  final static String TAG = "FlutterSoundPlugin";
+  final static String RECORD_STREAM = "com.dooboolab.fluttersound/record";
+  final static String PLAY_STREAM= "com.dooboolab.fluttersound/play";
+
+  private static final String ERR_UNKNOWN = "ERR_UNKNOWN";
+  private static final String ERR_PLAYER_IS_NULL = "ERR_PLAYER_IS_NULL";
+  private static final String ERR_PLAYER_IS_PLAYING = "ERR_PLAYER_IS_PLAYING";
+  private static final String ERR_RECORDER_IS_NULL = "ERR_RECORDER_IS_NULL";
+  private static final String ERR_RECORDER_IS_RECORDING = "ERR_RECORDER_IS_RECORDING";
+
+  private final ExecutorService taskScheduler = Executors.newSingleThreadExecutor();
+
+  private static Registrar reg;
+  final private AudioModel model = new AudioModel();
+  private Timer mTimer = new Timer();
+  final private Handler recordHandler = new Handler();
+  //mainThread handler
+  final private Handler mainHandler = new Handler();
+  final private Handler dbPeakLevelHandler = new Handler();
+  private static MethodChannel channel;
+
+  /** Plugin registration. */
+  public static void registerWith(Registrar registrar) {
+    channel = new MethodChannel(registrar.messenger(), "flutter_sound");
+    channel.setMethodCallHandler(new FlutterSoundPlugin());
+    reg = registrar;
+  }
+
+  @Override
+  public void onMethodCall(final MethodCall call, final Result result) {
+    final String path = call.argument("path");
+    switch (call.method) {
+      case "startRecorder":
+        taskScheduler.submit(() -> {
+          Integer sampleRate = call.argument("sampleRate");
+          Integer numChannels = call.argument("numChannels");
+          Integer bitRate = call.argument("bitRate");
+          int androidEncoder = call.argument("androidEncoder");
+          int androidAudioSource = call.argument("androidAudioSource");
+          int androidOutputFormat = call.argument("androidOutputFormat");
+          startRecorder(numChannels, sampleRate, bitRate, androidEncoder, androidAudioSource, androidOutputFormat, path, result);
+        });
+        break;
+      case "stopRecorder":
+        taskScheduler.submit(() -> stopRecorder(result));
+        break;
+      case "startPlayer":
+        this.startPlayer(path, result);
+        break;
+      case "stopPlayer":
+        this.stopPlayer(result);
+        break;
+      case "pausePlayer":
+        this.pausePlayer(result);
+        break;
+      case "resumePlayer":
+        this.resumePlayer(result);
+        break;
+      case "seekToPlayer":
+        int sec = call.argument("sec");
+        this.seekToPlayer(sec, result);
+        break;
+      case "setVolume":
+        double volume = call.argument("volume");
+        this.setVolume(volume, result);
+        break;
+      case "setDbPeakLevelUpdate":
+        double intervalInSecs = call.argument("intervalInSecs");
+        this.setDbPeakLevelUpdate(intervalInSecs, result);
+        break;
+      case "setDbLevelEnabled":
+        boolean enabled = call.argument("enabled");
+        this.setDbLevelEnabled(enabled, result);
+        break;
+      case "setSubscriptionDuration":
+        if (call.argument("sec") == null) return;
+        double duration = call.argument("sec");
+        this.setSubscriptionDuration(duration, result);
+        break;
+      default:
+        result.notImplemented();
+        break;
+    }
+  }
+
+  @Override
+  public boolean onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
+    final int REQUEST_RECORD_AUDIO_PERMISSION = 200;
+    switch (requestCode) {
+      case REQUEST_RECORD_AUDIO_PERMISSION:
+        if (grantResults[0] == PackageManager.PERMISSION_GRANTED)
+          return true;
+        break;
+    }
+    return false;
+  }
+
+  @Override
+  public void startRecorder(Integer numChannels, Integer sampleRate, Integer bitRate, int androidEncoder, int androidAudioSource, int androidOutputFormat, String path, final Result result) {
+    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+      if (
+          reg.activity().checkSelfPermission(Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED
+              || reg.activity().checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED
+          ) {
+        reg.activity().requestPermissions(new String[]{
+            Manifest.permission.RECORD_AUDIO,
+            Manifest.permission.WRITE_EXTERNAL_STORAGE,
+        }, 0);
+        result.error(TAG, "NO PERMISSION GRANTED", Manifest.permission.RECORD_AUDIO + " or " + Manifest.permission.WRITE_EXTERNAL_STORAGE);
+        return;
+      }
+    }
+
+    if (path == null) {
+      path = AudioModel.DEFAULT_FILE_LOCATION;
+    }
+
+    if (this.model.getMediaRecorder() == null) {
+      this.model.setMediaRecorder(new MediaRecorder());
+      this.model.getMediaRecorder().setAudioSource(androidAudioSource);
+      this.model.getMediaRecorder().setOutputFormat(androidOutputFormat);
+      this.model.getMediaRecorder().setAudioEncoder(androidEncoder);
+
+      this.model.getMediaRecorder().setOutputFile(path);
+
+      if (numChannels != null) {
+        this.model.getMediaRecorder().setAudioChannels(numChannels);
+      }
+
+      if (sampleRate != null) {
+        this.model.getMediaRecorder().setAudioSamplingRate(sampleRate);
+      }
+
+      // If bitrate is defined, then use it, otherwise use the OS default
+      if (bitRate != null) {
+        this.model.getMediaRecorder().setAudioEncodingBitRate(bitRate);
+      }
+    }
+
+    try {
+      this.model.getMediaRecorder().prepare();
+      this.model.getMediaRecorder().start();
+
+      // Remove all pending runnables, this is just for safety (should never happen)
+      recordHandler.removeCallbacksAndMessages(null);
+      final long systemTime = SystemClock.elapsedRealtime();
+      this.model.setRecorderTicker(() -> {
+
+        long time = SystemClock.elapsedRealtime() - systemTime;
+//          Log.d(TAG, "elapsedTime: " + SystemClock.elapsedRealtime());
+//          Log.d(TAG, "time: " + time);
+
+//          DateFormat format = new SimpleDateFormat("mm:ss:SS", Locale.US);
+//          String displayTime = format.format(time);
+//          model.setRecordTime(time);
+        try {
+          JSONObject json = new JSONObject();
+          json.put("current_position", String.valueOf(time));
+          channel.invokeMethod("updateRecorderProgress", json.toString());
+          recordHandler.postDelayed(model.getRecorderTicker(), model.subsDurationMillis);
+        } catch (JSONException je) {
+          Log.d(TAG, "Json Exception: " + je.toString());
+        }
+      });
+      recordHandler.post(this.model.getRecorderTicker());
+
+      if(this.model.shouldProcessDbLevel) {
+        dbPeakLevelHandler.removeCallbacksAndMessages(null);
+        this.model.setDbLevelTicker(() -> {
+
+          MediaRecorder recorder = model.getMediaRecorder();
+          if (recorder != null) {
+            double maxAmplitude = recorder.getMaxAmplitude();
+
+            // Calculate db based on the following article.
+            // https://stackoverflow.com/questions/10655703/what-does-androids-getmaxamplitude-function-for-the-mediarecorder-actually-gi
+            // 
+            double ref_pressure = 51805.5336;
+            double p = maxAmplitude  / ref_pressure;
+            double p0 = 0.0002;
+
+            double db = 20.0 * Math.log10(p / p0);
+
+            // if the microphone is off we get 0 for the amplitude which causes
+            // db to be infinite.
+            if (Double.isInfinite(db))
+              db = 0.0;
+
+            Log.d(TAG, "rawAmplitude: " + maxAmplitude + " Base DB: " + db);
+
+            channel.invokeMethod("updateDbPeakProgress", db);
+            dbPeakLevelHandler.postDelayed(model.getDbLevelTicker(),
+            (FlutterSoundPlugin.this.model.peakLevelUpdateMillis));
+          }
+        });
+        dbPeakLevelHandler.post(this.model.getDbLevelTicker());
+      }
+
+
+      String finalPath = path;
+      mainHandler.post(new Runnable() {
+        @Override
+        public void run() {
+          result.success(finalPath);
+        }
+      });
+    } catch (Exception e) {
+      Log.e(TAG, "Exception: ", e);
+    }
+  }
+
+  @Override
+  public void stopRecorder(final Result result) {
+    // This remove all pending runnables
+    recordHandler.removeCallbacksAndMessages(null);
+    dbPeakLevelHandler.removeCallbacksAndMessages(null);
+
+    if (this.model.getMediaRecorder() == null) {
+      Log.d(TAG, "mediaRecorder is null");
+      result.error(ERR_RECORDER_IS_NULL, ERR_RECORDER_IS_NULL, ERR_RECORDER_IS_NULL);
+      return;
+    }
+    this.model.getMediaRecorder().stop();
+    this.model.getMediaRecorder().reset();
+    this.model.getMediaRecorder().release();
+    this.model.setMediaRecorder(null);
+    mainHandler.post(new Runnable(){
+      @Override
+      public void run() {
+        result.success("recorder stopped.");
+      }
+    });
+
+  }
+
+  @Override
+  public void startPlayer(final String path, final Result result) {
+    if (this.model.getMediaPlayer() != null) {
+      Boolean isPaused = !this.model.getMediaPlayer().isPlaying()
+          && this.model.getMediaPlayer().getCurrentPosition() > 1;
+
+      if (isPaused) {
+        this.model.getMediaPlayer().start();
+        result.success("player resumed.");
+        return;
+      }
+
+      Log.e(TAG, "Player is already running. Stop it first.");
+      result.success("player is already running.");
+      return;
+    } else {
+      this.model.setMediaPlayer(new MediaPlayer());
+    }
+    mTimer = new Timer();
+
+    try {
+      if (path == null) {
+        this.model.getMediaPlayer().setDataSource(AudioModel.DEFAULT_FILE_LOCATION);
+      } else {
+        this.model.getMediaPlayer().setDataSource(path);
+      }
+
+      this.model.getMediaPlayer().setOnPreparedListener(mp -> {
+        Log.d(TAG, "mediaPlayer prepared and start");
+        mp.start();
+
+        /*
+         * Set timer task to send event to RN.
+         */
+        TimerTask mTask = new TimerTask() {
+          @Override
+          public void run() {
+            // long time = mp.getCurrentPosition();
+            // DateFormat format = new SimpleDateFormat("mm:ss:SS", Locale.US);
+            // final String displayTime = format.format(time);
+            try {
+              JSONObject json = new JSONObject();
+              json.put("duration", String.valueOf(mp.getDuration()));
+              json.put("current_position", String.valueOf(mp.getCurrentPosition()));
+              mainHandler.post(new Runnable() {
+                @Override
+                public void run() {
+                  channel.invokeMethod("updateProgress", json.toString());
+                }
+              });
+
+            } catch (JSONException je) {
+              Log.d(TAG, "Json Exception: " + je.toString());
+            }
+          }
+        };
+
+        mTimer.schedule(mTask, 0, model.subsDurationMillis);
+        String resolvedPath = path == null ? AudioModel.DEFAULT_FILE_LOCATION : path;
+        result.success((resolvedPath));
+      });
+      /*
+       * Detect when finish playing.
+       */
+      this.model.getMediaPlayer().setOnCompletionListener(mp -> {
+        /*
+         * Reset player.
+         */
+        Log.d(TAG, "Plays completed.");
+        try {
+          JSONObject json = new JSONObject();
+          json.put("duration", String.valueOf(mp.getDuration()));
+          json.put("current_position", String.valueOf(mp.getCurrentPosition()));
+          channel.invokeMethod("audioPlayerDidFinishPlaying", json.toString());
+        } catch (JSONException je) {
+          Log.d(TAG, "Json Exception: " + je.toString());
+        }
+        mTimer.cancel();
+        if(mp.isPlaying())
+        {
+          mp.stop();
+        }
+        mp.reset();
+        mp.release();
+        model.setMediaPlayer(null);
+      });
+      this.model.getMediaPlayer().prepare();
+    } catch (Exception e) {
+      Log.e(TAG, "startPlayer() exception");
+      result.error(ERR_UNKNOWN, ERR_UNKNOWN, e.getMessage());
+    }
+  }
+
+  @Override
+  public void stopPlayer(final Result result) {
+    mTimer.cancel();
+
+    if (this.model.getMediaPlayer() == null) {
+      result.error(ERR_PLAYER_IS_NULL, ERR_PLAYER_IS_NULL, ERR_PLAYER_IS_NULL);
+      return;
+    }
+
+    try {
+      this.model.getMediaPlayer().stop();
+      this.model.getMediaPlayer().reset();
+      this.model.getMediaPlayer().release();
+      this.model.setMediaPlayer(null);
+      result.success("stopped player.");
+    } catch (Exception e) {
+      Log.e(TAG, "stopPlay exception: " + e.getMessage());
+      result.error(ERR_UNKNOWN, ERR_UNKNOWN, e.getMessage());
+    }
+  }
+
+  @Override
+  public void pausePlayer(final Result result) {
+    if (this.model.getMediaPlayer() == null) {
+      result.error(ERR_PLAYER_IS_NULL, ERR_PLAYER_IS_NULL, ERR_PLAYER_IS_NULL);
+      return;
+    }
+
+    try {
+      this.model.getMediaPlayer().pause();
+      result.success("paused player.");
+    } catch (Exception e) {
+      Log.e(TAG, "pausePlay exception: " + e.getMessage());
+      result.error(ERR_UNKNOWN, ERR_UNKNOWN, e.getMessage());
+    }
+  }
+
+  @Override
+  public void resumePlayer(final Result result) {
+    if (this.model.getMediaPlayer() == null) {
+      result.error(ERR_PLAYER_IS_NULL, ERR_PLAYER_IS_NULL, ERR_PLAYER_IS_NULL);
+      return;
+    }
+
+    if (this.model.getMediaPlayer().isPlaying()) {
+      result.error(ERR_PLAYER_IS_PLAYING, ERR_PLAYER_IS_PLAYING, ERR_PLAYER_IS_PLAYING);
+      return;
+    }
+
+    try {
+      this.model.getMediaPlayer().seekTo(this.model.getMediaPlayer().getCurrentPosition());
+      this.model.getMediaPlayer().start();
+      result.success("resumed player.");
+    } catch (Exception e) {
+      Log.e(TAG, "mediaPlayer resume: " + e.getMessage());
+      result.error(ERR_UNKNOWN, ERR_UNKNOWN, e.getMessage());
+    }
+  }
+
+  @Override
+  public void seekToPlayer(int millis, final Result result) {
+    if (this.model.getMediaPlayer() == null) {
+      result.error(ERR_PLAYER_IS_NULL, ERR_PLAYER_IS_NULL, ERR_PLAYER_IS_NULL);
+      return;
+    }
+
+    int currentMillis = this.model.getMediaPlayer().getCurrentPosition();
+    Log.d(TAG, "currentMillis: " + currentMillis);
+    // millis += currentMillis; [This was the problem for me]
+
+    Log.d(TAG, "seekTo: " + millis);
+
+    this.model.getMediaPlayer().seekTo(millis);
+    result.success(String.valueOf(millis));
+  }
+
+  @Override
+  public void setVolume(double volume, final Result result) {
+    if (this.model.getMediaPlayer() == null) {
+      result.error(ERR_PLAYER_IS_NULL, ERR_PLAYER_IS_NULL, ERR_PLAYER_IS_NULL);
+      return;
+    }
+
+    float mVolume = (float) volume;
+    this.model.getMediaPlayer().setVolume(mVolume, mVolume);
+    result.success("Set volume");
+  }
+
+  @Override
+  public void setDbPeakLevelUpdate(double intervalInSecs, Result result) {
+    this.model.peakLevelUpdateMillis = (long) (intervalInSecs * 1000);
+    result.success("setDbPeakLevelUpdate: " + this.model.peakLevelUpdateMillis);
+  }
+
+  @Override
+  public void setDbLevelEnabled(boolean enabled, MethodChannel.Result result) {
+    this.model.shouldProcessDbLevel = enabled;
+    result.success("setDbLevelEnabled: " + this.model.shouldProcessDbLevel);
+  }
+
+  @Override
+  public void setSubscriptionDuration(double sec, Result result) {
+    this.model.subsDurationMillis = (int) (sec * 1000);
+    result.success("setSubscriptionDuration: " + this.model.subsDurationMillis);
+  }
+}

+ 1 - 0
example/.flutter-plugins-dependencies

@@ -0,0 +1 @@
+{"_info":"// This is a generated file; do not edit or check into version control.","dependencyGraph":[{"name":"flutter_sound","dependencies":[]}]}

+ 9 - 0
example/.gitignore

@@ -0,0 +1,9 @@
+.DS_Store
+.dart_tool/
+
+.packages
+.pub/
+
+build/
+
+.flutter-plugins

+ 8 - 0
example/.metadata

@@ -0,0 +1,8 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+  revision: 66091f969653fd3535b265ddcd87436901858a1d
+  channel: dev

+ 28 - 0
example/README.md

@@ -0,0 +1,28 @@
+# flutter_sound_example
+This is not a playlist audio module and this library provides simple recorder and player functionalities for both `android` and `ios` platforms. This only supports default file extension for each platform. This module can also handle file from url.
+
+## Getting Started
+
+For help getting started with Flutter, view our online
+[documentation](https://flutter.io/).
+
+## Install
+Add ```flutter_sound``` as a dependency in pubspec.yaml
+For help on adding as a dependency, view the [documentation](https://flutter.io/using-packages/).
+
+## Post Installation
+On *iOS* you need to add a usage description to `info.plist`:
+
+```xml
+<key>NSMicrophoneUsageDescription</key>
+<string>This sample uses the microphone to record your speech and convert it to text.</string>
+<key>UIBackgroundModes</key>
+<array>
+	<string>audio</string>
+</array>
+```
+
+On *Android* you need to add a permission to `AndroidManifest.xml`:
+```xml
+<uses-permission android:name="android.permission.RECORD_AUDIO" />
+```

+ 10 - 0
example/android/.gitignore

@@ -0,0 +1,10 @@
+*.iml
+*.class
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
+GeneratedPluginRegistrant.java

+ 62 - 0
example/android/app/build.gradle

@@ -0,0 +1,62 @@
+def localProperties = new Properties()
+def localPropertiesFile = rootProject.file('local.properties')
+if (localPropertiesFile.exists()) {
+    localPropertiesFile.withReader('UTF-8') { reader ->
+        localProperties.load(reader)
+    }
+}
+
+def flutterRoot = localProperties.getProperty('flutter.sdk')
+if (flutterRoot == null) {
+    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
+}
+
+def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
+if (flutterVersionCode == null) {
+    throw new GradleException("versionCode not found. Define flutter.versionCode in the local.properties file.")
+}
+
+def flutterVersionName = localProperties.getProperty('flutter.versionName')
+if (flutterVersionName == null) {
+    throw new GradleException("versionName not found. Define flutter.versionName in the local.properties file.")
+}
+
+apply plugin: 'com.android.application'
+apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
+
+android {
+    compileSdkVersion 28
+
+    lintOptions {
+        disable 'InvalidPackage'
+    }
+
+    defaultConfig {
+        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+        applicationId "com.dooboolab.fluttersoundexample"
+        minSdkVersion 16
+        targetSdkVersion 28
+        versionCode flutterVersionCode.toInteger()
+        versionName flutterVersionName
+    }
+
+    buildTypes {
+        release {
+            // TODO: Add your own signing config for the release build.
+            // Signing with the debug keys for now, so `flutter run --release` works.
+            signingConfig signingConfigs.debug
+        }
+    }
+    compileOptions {
+        sourceCompatibility JavaVersion.VERSION_1_8
+        targetCompatibility JavaVersion.VERSION_1_8
+    }
+}
+
+flutter {
+    source '../..'
+}
+
+dependencies {
+    testImplementation 'junit:junit:4.12'
+}

+ 41 - 0
example/android/app/src/main/AndroidManifest.xml

@@ -0,0 +1,41 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.dooboolab.fluttersoundexample">
+
+    <!-- The INTERNET permission is required for development. Specifically,
+         flutter needs it to communicate with the running application
+         to allow setting breakpoints, to provide hot reload, etc.
+    -->
+    <uses-permission android:name="android.permission.INTERNET"/>
+    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+
+    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
+         calls FlutterMain.startInitialization(this); in its onCreate method.
+         In most cases you can leave this as-is, but you if you want to provide
+         additional functionality it is fine to subclass or reimplement
+         FlutterApplication and put your custom class here. -->
+    <application
+        android:name="io.flutter.app.FlutterApplication"
+        android:label="flutter_sound_example"
+        android:icon="@mipmap/ic_launcher">
+        <activity
+            android:name=".MainActivity"
+            android:launchMode="singleTop"
+            android:theme="@style/LaunchTheme"
+            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density"
+            android:hardwareAccelerated="true"
+            android:windowSoftInputMode="adjustResize">
+            <!-- This keeps the window background of the activity showing
+                 until Flutter renders its first frame. It can be removed if
+                 there is no splash screen (such as the default splash screen
+                 defined in @style/LaunchTheme). -->
+            <meta-data
+                android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
+                android:value="true" />
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
+            </intent-filter>
+        </activity>
+    </application>
+</manifest>

+ 13 - 0
example/android/app/src/main/java/com/dooboolab/fluttersoundexample/MainActivity.java

@@ -0,0 +1,13 @@
+package com.dooboolab.fluttersoundexample;
+
+import android.os.Bundle;
+import io.flutter.app.FlutterActivity;
+import io.flutter.plugins.GeneratedPluginRegistrant;
+
+public class MainActivity extends FlutterActivity {
+  @Override
+  protected void onCreate(Bundle savedInstanceState) {
+    super.onCreate(savedInstanceState);
+    GeneratedPluginRegistrant.registerWith(this);
+  }
+}

+ 12 - 0
example/android/app/src/main/res/drawable/launch_background.xml

@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Modify this file to customize your launch splash screen -->
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:drawable="@android:color/white" />
+
+    <!-- You can insert your own image assets here -->
+    <!-- <item>
+        <bitmap
+            android:gravity="center"
+            android:src="@mipmap/launch_image" />
+    </item> -->
+</layer-list>

BIN
example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png


BIN
example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png


BIN
example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png


BIN
example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png


BIN
example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png


+ 8 - 0
example/android/app/src/main/res/values/styles.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
+        <!-- Show a splash screen on the activity. Automatically removed when
+             Flutter draws its first frame -->
+        <item name="android:windowBackground">@drawable/launch_background</item>
+    </style>
+</resources>

+ 29 - 0
example/android/build.gradle

@@ -0,0 +1,29 @@
+buildscript {
+    repositories {
+        google()
+        jcenter()
+    }
+
+    dependencies {
+        classpath 'com.android.tools.build:gradle:3.4.0'
+    }
+}
+
+allprojects {
+    repositories {
+        google()
+        jcenter()
+    }
+}
+
+rootProject.buildDir = '../build'
+subprojects {
+    project.buildDir = "${rootProject.buildDir}/${project.name}"
+}
+subprojects {
+    project.evaluationDependsOn(':app')
+}
+
+task clean(type: Delete) {
+    delete rootProject.buildDir
+}

+ 2 - 0
example/android/gradle.properties

@@ -0,0 +1,2 @@
+org.gradle.jvmargs=-Xmx1536M
+android.enableR8=true

BIN
example/android/gradle/wrapper/gradle-wrapper.jar


+ 6 - 0
example/android/gradle/wrapper/gradle-wrapper.properties

@@ -0,0 +1,6 @@
+#Thu May 09 09:01:19 CEST 2019
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

+ 160 - 0
example/android/gradlew

@@ -0,0 +1,160 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+esac
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

+ 90 - 0
example/android/gradlew.bat

@@ -0,0 +1,90 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

+ 15 - 0
example/android/settings.gradle

@@ -0,0 +1,15 @@
+include ':app'
+
+def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
+
+def plugins = new Properties()
+def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
+if (pluginsFile.exists()) {
+    pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
+}
+
+plugins.each { name, path ->
+    def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
+    include ":$name"
+    project(":$name").projectDir = pluginDirectory
+}

+ 18 - 0
example/flutter_sound_example.iml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/lib" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
+      <excludeFolder url="file://$MODULE_DIR$/.idea" />
+      <excludeFolder url="file://$MODULE_DIR$/.pub" />
+      <excludeFolder url="file://$MODULE_DIR$/build" />
+    </content>
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Dart SDK" level="project" />
+    <orderEntry type="library" name="Flutter Plugins" level="project" />
+    <orderEntry type="library" name="Dart Packages" level="project" />
+  </component>
+</module>

+ 27 - 0
example/flutter_sound_example_android.iml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="FacetManager">
+    <facet type="android" name="Android">
+      <configuration>
+        <option name="ALLOW_USER_CONFIGURATION" value="false" />
+        <option name="GEN_FOLDER_RELATIVE_PATH_APT" value="/android/gen" />
+        <option name="GEN_FOLDER_RELATIVE_PATH_AIDL" value="/android/gen" />
+        <option name="MANIFEST_FILE_RELATIVE_PATH" value="/android/AndroidManifest.xml" />
+        <option name="RES_FOLDER_RELATIVE_PATH" value="/android/res" />
+        <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/android/assets" />
+        <option name="LIBS_FOLDER_RELATIVE_PATH" value="/android/libs" />
+        <option name="PROGUARD_LOGS_FOLDER_RELATIVE_PATH" value="/android/proguard_logs" />
+      </configuration>
+    </facet>
+  </component>
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$/android">
+      <sourceFolder url="file://$MODULE_DIR$/android/app/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/android/gen" isTestSource="false" generated="true" />
+    </content>
+    <orderEntry type="jdk" jdkName="Android API 25 Platform" jdkType="Android SDK" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Flutter for Android" level="project" />
+  </component>
+</module>

+ 45 - 0
example/ios/.gitignore

@@ -0,0 +1,45 @@
+.idea/
+.vagrant/
+.sconsign.dblite
+.svn/
+
+.DS_Store
+*.swp
+profile
+
+DerivedData/
+build/
+GeneratedPluginRegistrant.h
+GeneratedPluginRegistrant.m
+
+.generated/
+
+*.pbxuser
+*.mode1v3
+*.mode2v3
+*.perspectivev3
+
+!default.pbxuser
+!default.mode1v3
+!default.mode2v3
+!default.perspectivev3
+
+xcuserdata
+
+*.moved-aside
+
+*.pyc
+*sync/
+Icon?
+.tags*
+
+/Flutter/app.flx
+/Flutter/app.zip
+/Flutter/flutter_assets/
+/Flutter/App.framework
+/Flutter/Flutter.framework
+/Flutter/Generated.xcconfig
+/ServiceDefinitions.json
+
+Pods/
+.symlinks/

+ 26 - 0
example/ios/Flutter/AppFrameworkInfo.plist

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+  <key>CFBundleDevelopmentRegion</key>
+  <string>en</string>
+  <key>CFBundleExecutable</key>
+  <string>App</string>
+  <key>CFBundleIdentifier</key>
+  <string>io.flutter.flutter.app</string>
+  <key>CFBundleInfoDictionaryVersion</key>
+  <string>6.0</string>
+  <key>CFBundleName</key>
+  <string>App</string>
+  <key>CFBundlePackageType</key>
+  <string>FMWK</string>
+  <key>CFBundleShortVersionString</key>
+  <string>1.0</string>
+  <key>CFBundleSignature</key>
+  <string>????</string>
+  <key>CFBundleVersion</key>
+  <string>1.0</string>
+  <key>MinimumOSVersion</key>
+  <string>8.0</string>
+</dict>
+</plist>

+ 2 - 0
example/ios/Flutter/Debug.xcconfig

@@ -0,0 +1,2 @@
+#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"

+ 2 - 0
example/ios/Flutter/Release.xcconfig

@@ -0,0 +1,2 @@
+#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"

+ 63 - 0
example/ios/Podfile

@@ -0,0 +1,63 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '9.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+def parse_KV_file(file, separator='=')
+  file_abs_path = File.expand_path(file)
+  if !File.exists? file_abs_path
+    return [];
+  end
+  pods_ary = []
+  skip_line_start_symbols = ["#", "/"]
+  File.foreach(file_abs_path) { |line|
+      next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
+      plugin = line.split(pattern=separator)
+      if plugin.length == 2
+        podname = plugin[0].strip()
+        path = plugin[1].strip()
+        podpath = File.expand_path("#{path}", file_abs_path)
+        pods_ary.push({:name => podname, :path => podpath});
+      else
+        puts "Invalid plugin specification: #{line}"
+      end
+  }
+  return pods_ary
+end
+
+target 'Runner' do
+  # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
+  # referring to absolute paths on developers' machines.
+  system('rm -rf .symlinks')
+  system('mkdir -p .symlinks/plugins')
+
+  # Flutter Pods
+  generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
+  if generated_xcode_build_settings.empty?
+    puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
+  end
+  generated_xcode_build_settings.map { |p|
+    if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
+      symlink = File.join('.symlinks', 'flutter')
+      File.symlink(File.dirname(p[:path]), symlink)
+      pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
+    end
+  }
+
+  # Plugin Pods
+  plugin_pods = parse_KV_file('../.flutter-plugins')
+  plugin_pods.map { |p|
+    symlink = File.join('.symlinks', 'plugins', p[:name])
+    File.symlink(p[:path], symlink)
+    pod p[:name], :path => File.join(symlink, 'ios')
+  }
+end
+
+post_install do |installer|
+  installer.pods_project.targets.each do |target|
+    target.build_configurations.each do |config|
+      config.build_settings['ENABLE_BITCODE'] = 'NO'
+    end
+  end
+end

+ 22 - 0
example/ios/Podfile.lock

@@ -0,0 +1,22 @@
+PODS:
+  - Flutter (1.0.0)
+  - flutter_sound (0.0.1):
+    - Flutter
+
+DEPENDENCIES:
+  - Flutter (from `.symlinks/flutter/ios`)
+  - flutter_sound (from `.symlinks/plugins/flutter_sound/ios`)
+
+EXTERNAL SOURCES:
+  Flutter:
+    :path: ".symlinks/flutter/ios"
+  flutter_sound:
+    :path: ".symlinks/plugins/flutter_sound/ios"
+
+SPEC CHECKSUMS:
+  Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
+  flutter_sound: 0e8163ceac1e00eb6d894e2ae4641ba726a2c479
+
+PODFILE CHECKSUM: 1e5af4103afd21ca5ead147d7b81d06f494f51a2
+
+COCOAPODS: 1.8.4

+ 503 - 0
example/ios/Runner.xcodeproj/project.pbxproj

@@ -0,0 +1,503 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+		3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+		3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
+		3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+		670E0D016E1F72A7F08D9336 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 909073FE6D93D73F20886D46 /* libPods-Runner.a */; };
+		9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
+		9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+		9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
+		9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
+		978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
+		97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
+		97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+		97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+		97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+		9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+			isa = PBXCopyFilesBuildPhase;
+			buildActionMask = 2147483647;
+			dstPath = "";
+			dstSubfolderSpec = 10;
+			files = (
+				3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
+				9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
+			);
+			name = "Embed Frameworks";
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+		1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
+		1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
+		3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
+		3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
+		41BBA7DEA380B74B9DF5B72D /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
+		7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
+		7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+		7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+		909073FE6D93D73F20886D46 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
+		9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
+		9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
+		9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
+		97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+		97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
+		97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+		97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
+		97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+		DE83E239C9FEB56014FBE936 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		97C146EB1CF9000F007C117D /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
+				3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
+				670E0D016E1F72A7F08D9336 /* libPods-Runner.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		0D58E6287861059622ADCC0D /* Pods */ = {
+			isa = PBXGroup;
+			children = (
+				41BBA7DEA380B74B9DF5B72D /* Pods-Runner.debug.xcconfig */,
+				DE83E239C9FEB56014FBE936 /* Pods-Runner.release.xcconfig */,
+			);
+			name = Pods;
+			sourceTree = "<group>";
+		};
+		721C0A64B6CD929BA300D8E8 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				909073FE6D93D73F20886D46 /* libPods-Runner.a */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		9740EEB11CF90186004384FC /* Flutter */ = {
+			isa = PBXGroup;
+			children = (
+				3B80C3931E831B6300D905FE /* App.framework */,
+				3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+				9740EEBA1CF902C7004384FC /* Flutter.framework */,
+				9740EEB21CF90195004384FC /* Debug.xcconfig */,
+				7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+				9740EEB31CF90195004384FC /* Generated.xcconfig */,
+			);
+			name = Flutter;
+			sourceTree = "<group>";
+		};
+		97C146E51CF9000F007C117D = {
+			isa = PBXGroup;
+			children = (
+				9740EEB11CF90186004384FC /* Flutter */,
+				97C146F01CF9000F007C117D /* Runner */,
+				97C146EF1CF9000F007C117D /* Products */,
+				0D58E6287861059622ADCC0D /* Pods */,
+				721C0A64B6CD929BA300D8E8 /* Frameworks */,
+			);
+			sourceTree = "<group>";
+		};
+		97C146EF1CF9000F007C117D /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				97C146EE1CF9000F007C117D /* Runner.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		97C146F01CF9000F007C117D /* Runner */ = {
+			isa = PBXGroup;
+			children = (
+				7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
+				7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
+				97C146FA1CF9000F007C117D /* Main.storyboard */,
+				97C146FD1CF9000F007C117D /* Assets.xcassets */,
+				97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+				97C147021CF9000F007C117D /* Info.plist */,
+				97C146F11CF9000F007C117D /* Supporting Files */,
+				1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+				1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+			);
+			path = Runner;
+			sourceTree = "<group>";
+		};
+		97C146F11CF9000F007C117D /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				97C146F21CF9000F007C117D /* main.m */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		97C146ED1CF9000F007C117D /* Runner */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+			buildPhases = (
+				3C49738EF121C0734DEBB06E /* [CP] Check Pods Manifest.lock */,
+				9740EEB61CF901F6004384FC /* Run Script */,
+				97C146EA1CF9000F007C117D /* Sources */,
+				97C146EB1CF9000F007C117D /* Frameworks */,
+				97C146EC1CF9000F007C117D /* Resources */,
+				9705A1C41CF9048500538489 /* Embed Frameworks */,
+				3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+				3FB3430227C5B6501D990378 /* [CP] Embed Pods Frameworks */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+			);
+			name = Runner;
+			productName = Runner;
+			productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		97C146E61CF9000F007C117D /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0910;
+				ORGANIZATIONNAME = "The Chromium Authors";
+				TargetAttributes = {
+					97C146ED1CF9000F007C117D = {
+						CreatedOnToolsVersion = 7.3.1;
+						DevelopmentTeam = LCXV255WTL;
+						SystemCapabilities = {
+							com.apple.BackgroundModes = {
+								enabled = 1;
+							};
+						};
+					};
+				};
+			};
+			buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = 97C146E51CF9000F007C117D;
+			productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+			projectDirPath = "";
+			projectRoot = "";
+			targets = (
+				97C146ED1CF9000F007C117D /* Runner */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+		97C146EC1CF9000F007C117D /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+				9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */,
+				3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+				9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
+				97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+				97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+		3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Thin Binary";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
+		};
+		3C49738EF121C0734DEBB06E /* [CP] Check Pods Manifest.lock */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+				"${PODS_ROOT}/Manifest.lock",
+			);
+			name = "[CP] Check Pods Manifest.lock";
+			outputPaths = (
+				"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+			showEnvVarsInLog = 0;
+		};
+		3FB3430227C5B6501D990378 /* [CP] Embed Pods Frameworks */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
+				"${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
+			);
+			name = "[CP] Embed Pods Frameworks";
+			outputPaths = (
+				"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+			showEnvVarsInLog = 0;
+		};
+		9740EEB61CF901F6004384FC /* Run Script */ = {
+			isa = PBXShellScriptBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+			);
+			inputPaths = (
+			);
+			name = "Run Script";
+			outputPaths = (
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+			shellPath = /bin/sh;
+			shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+		};
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		97C146EA1CF9000F007C117D /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
+				97C146F31CF9000F007C117D /* main.m in Sources */,
+				1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+		97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				97C146FB1CF9000F007C117D /* Base */,
+			);
+			name = Main.storyboard;
+			sourceTree = "<group>";
+		};
+		97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+			isa = PBXVariantGroup;
+			children = (
+				97C147001CF9000F007C117D /* Base */,
+			);
+			name = LaunchScreen.storyboard;
+			sourceTree = "<group>";
+		};
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+		97C147031CF9000F007C117D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = dwarf;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				ENABLE_TESTABILITY = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				MTL_ENABLE_DEBUG_INFO = YES;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+			};
+			name = Debug;
+		};
+		97C147041CF9000F007C117D /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_ANALYZER_NONNULL = YES;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_COMMA = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INFINITE_RECURSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+				CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+				CLANG_WARN_STRICT_PROTOTYPES = YES;
+				CLANG_WARN_SUSPICIOUS_MOVE = YES;
+				CLANG_WARN_UNREACHABLE_CODE = YES;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COPY_PHASE_STRIP = NO;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				ENABLE_STRICT_OBJC_MSGSEND = YES;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_NO_COMMON_BLOCKS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+				MTL_ENABLE_DEBUG_INFO = NO;
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		97C147061CF9000F007C117D /* Debug */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				DEVELOPMENT_TEAM = LCXV255WTL;
+				ENABLE_BITCODE = NO;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.dooboolab.flutterSoundExample;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Debug;
+		};
+		97C147071CF9000F007C117D /* Release */ = {
+			isa = XCBuildConfiguration;
+			baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+				DEVELOPMENT_TEAM = LCXV255WTL;
+				ENABLE_BITCODE = NO;
+				FRAMEWORK_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				INFOPLIST_FILE = Runner/Info.plist;
+				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"$(PROJECT_DIR)/Flutter",
+				);
+				PRODUCT_BUNDLE_IDENTIFIER = com.dooboolab.flutterSoundExample;
+				PRODUCT_NAME = "$(TARGET_NAME)";
+				VERSIONING_SYSTEM = "apple-generic";
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				97C147031CF9000F007C117D /* Debug */,
+				97C147041CF9000F007C117D /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				97C147061CF9000F007C117D /* Debug */,
+				97C147071CF9000F007C117D /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}

+ 7 - 0
example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:Runner.xcodeproj">
+   </FileRef>
+</Workspace>

+ 93 - 0
example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0910"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+               BuildableName = "Runner.app"
+               BlueprintName = "Runner"
+               ReferencedContainer = "container:Runner.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      language = ""
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      language = ""
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "97C146ED1CF9000F007C117D"
+            BuildableName = "Runner.app"
+            BlueprintName = "Runner"
+            ReferencedContainer = "container:Runner.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 10 - 0
example/ios/Runner.xcworkspace/contents.xcworkspacedata

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+   version = "1.0">
+   <FileRef
+      location = "group:Runner.xcodeproj">
+   </FileRef>
+   <FileRef
+      location = "group:Pods/Pods.xcodeproj">
+   </FileRef>
+</Workspace>

+ 8 - 0
example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IDEDidComputeMac32BitWarning</key>
+	<true/>
+</dict>
+</plist>

+ 8 - 0
example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>BuildSystemType</key>
+	<string>Original</string>
+</dict>
+</plist>

+ 6 - 0
example/ios/Runner/AppDelegate.h

@@ -0,0 +1,6 @@
+#import <Flutter/Flutter.h>
+#import <UIKit/UIKit.h>
+
+@interface AppDelegate : FlutterAppDelegate
+
+@end

+ 13 - 0
example/ios/Runner/AppDelegate.m

@@ -0,0 +1,13 @@
+#include "AppDelegate.h"
+#include "GeneratedPluginRegistrant.h"
+
+@implementation AppDelegate
+
+- (BOOL)application:(UIApplication *)application
+    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+  [GeneratedPluginRegistrant registerWithRegistry:self];
+  // Override point for customization after application launch.
+  return [super application:application didFinishLaunchingWithOptions:launchOptions];
+}
+
+@end

+ 122 - 0
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,122 @@
+{
+  "images" : [
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-20x20@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-20x20@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-29x29@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-40x40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-40x40@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-60x60@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "60x60",
+      "idiom" : "iphone",
+      "filename" : "Icon-App-60x60@3x.png",
+      "scale" : "3x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-20x20@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "20x20",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-20x20@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-29x29@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "29x29",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-29x29@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-40x40@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "40x40",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-40x40@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-76x76@1x.png",
+      "scale" : "1x"
+    },
+    {
+      "size" : "76x76",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-76x76@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "83.5x83.5",
+      "idiom" : "ipad",
+      "filename" : "Icon-App-83.5x83.5@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "size" : "1024x1024",
+      "idiom" : "ios-marketing",
+      "filename" : "Icon-App-1024x1024@1x.png",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png


BIN
example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png


+ 23 - 0
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "LaunchImage@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png


BIN
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png


BIN
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png


+ 5 - 0
example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md

@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+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.

+ 37 - 0
example/ios/Runner/Base.lproj/LaunchScreen.storyboard

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="EHf-IW-A2E">
+            <objects>
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
+                        <viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <subviews>
+                            <imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
+                            </imageView>
+                        </subviews>
+                        <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+                        <constraints>
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
+                            <constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
+                        </constraints>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="53" y="375"/>
+        </scene>
+    </scenes>
+    <resources>
+        <image name="LaunchImage" width="168" height="185"/>
+    </resources>
+</document>

+ 26 - 0
example/ios/Runner/Base.lproj/Main.storyboard

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
+    </dependencies>
+    <scenes>
+        <!--Flutter View Controller-->
+        <scene sceneID="tne-QT-ifu">
+            <objects>
+                <viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
+                        <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
+            </objects>
+        </scene>
+    </scenes>
+</document>

+ 53 - 0
example/ios/Runner/Info.plist

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>$(EXECUTABLE_NAME)</string>
+	<key>CFBundleIdentifier</key>
+	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>flutter_sound_example</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>$(FLUTTER_BUILD_NAME)</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>$(FLUTTER_BUILD_NUMBER)</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>NSMicrophoneUsageDescription</key>
+	<string>This sample uses the microphone to record your speech and convert it to text.</string>
+	<key>UIBackgroundModes</key>
+	<array>
+		<string>audio</string>
+		<string>fetch</string>
+		<string>remote-notification</string>
+	</array>
+	<key>UILaunchStoryboardName</key>
+	<string>LaunchScreen</string>
+	<key>UIMainStoryboardFile</key>
+	<string>Main</string>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UIViewControllerBasedStatusBarAppearance</key>
+	<false/>
+</dict>
+</plist>

+ 9 - 0
example/ios/Runner/main.m

@@ -0,0 +1,9 @@
+#import <Flutter/Flutter.h>
+#import <UIKit/UIKit.h>
+#import "AppDelegate.h"
+
+int main(int argc, char* argv[]) {
+  @autoreleasepool {
+    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+  }
+}

+ 305 - 0
example/lib/main.dart

@@ -0,0 +1,305 @@
+import 'dart:io';
+import 'package:flutter/material.dart';
+import 'package:intl/intl.dart' show DateFormat;
+import 'package:intl/date_symbol_data_local.dart';
+
+import 'dart:async';
+import 'package:flutter_sound/flutter_sound.dart';
+import 'package:flutter_sound/android_encoder.dart';
+
+void main() {
+  runApp(new MyApp());
+}
+
+class MyApp extends StatefulWidget {
+  @override
+  _MyAppState createState() => new _MyAppState();
+}
+
+class _MyAppState extends State<MyApp> {
+  bool _isRecording = false;
+  String _path;
+  // bool _isPlaying = false;
+  StreamSubscription _recorderSubscription;
+  StreamSubscription _dbPeakSubscription;
+  StreamSubscription _playerSubscription;
+  FlutterSound flutterSound;
+
+  String _recorderTxt = '00:00:00';
+  String _playerTxt = '00:00:00';
+  double _dbLevel;
+
+  double sliderCurrentPosition = 0.0;
+  double maxDuration = 1.0;
+
+
+  @override
+  void initState() {
+    super.initState();
+    flutterSound = new FlutterSound();
+    flutterSound.setSubscriptionDuration(0.01);
+    flutterSound.setDbPeakLevelUpdate(0.8);
+    flutterSound.setDbLevelEnabled(true);
+    initializeDateFormatting();
+  }
+
+  void startRecorder() async{
+    try {
+      String path = await flutterSound.startRecorder(
+        Platform.isIOS ? 'ios.aac' : 'android.aac',
+        androidEncoder: AndroidEncoder.AAC,
+        androidAudioSource: AndroidAudioSource.MIC,
+      );
+      print('startRecorder: $path');
+
+      _recorderSubscription = flutterSound.onRecorderStateChanged.listen((e) {
+        DateTime date = new DateTime.fromMillisecondsSinceEpoch(
+            e.currentPosition.toInt(),
+            isUtc: true);
+        String txt = DateFormat('mm:ss:SS', 'en_GB').format(date);
+
+        this.setState(() {
+          this._recorderTxt = txt.substring(0, 8);
+        });
+      });
+      _dbPeakSubscription =
+          flutterSound.onRecorderDbPeakChanged.listen((value) {
+            print("got update -> $value");
+            setState(() {
+              this._dbLevel = value;
+            });
+          });
+
+      this.setState(() {
+        this._isRecording = true;
+        this._path = path;
+      });
+    } catch (err) {
+      print('startRecorder error: $err');
+    }
+  }
+
+  void stopRecorder() async{
+    try {
+      String result = await flutterSound.stopRecorder();
+      print('stopRecorder: $result');
+
+      if (_recorderSubscription != null) {
+        _recorderSubscription.cancel();
+        _recorderSubscription = null;
+      }
+      if (_dbPeakSubscription != null) {
+        _dbPeakSubscription.cancel();
+        _dbPeakSubscription = null;
+      }
+
+      this.setState(() {
+        this._isRecording = false;
+      });
+    } catch (err) {
+      print('stopRecorder error: $err');
+    }
+  }
+
+  void startPlayer() async{
+    try {
+      String path = await flutterSound.startPlayer(this._path);
+      await flutterSound.setVolume(1.0);
+      print('startPlayer: $path');
+
+      _playerSubscription = flutterSound.onPlayerStateChanged.listen((e) {
+        if (e != null) {
+          sliderCurrentPosition = e.currentPosition;
+          maxDuration = e.duration;
+
+
+          DateTime date = new DateTime.fromMillisecondsSinceEpoch(
+              e.currentPosition.toInt(),
+              isUtc: true);
+          String txt = DateFormat('mm:ss:SS', 'en_GB').format(date);
+          this.setState(() {
+            //this._isPlaying = true;
+            this._playerTxt = txt.substring(0, 8);
+          });
+        }
+      });
+    } catch (err) {
+      print('error: $err');
+    }
+  }
+
+  void stopPlayer() async{
+    try {
+      String result = await flutterSound.stopPlayer();
+      print('stopPlayer: $result');
+      if (_playerSubscription != null) {
+        _playerSubscription.cancel();
+        _playerSubscription = null;
+      }
+
+      this.setState(() {
+        //this._isPlaying = false;
+      });
+    } catch (err) {
+      print('error: $err');
+    }
+  }
+
+  void pausePlayer() async{
+    String result = await flutterSound.pausePlayer();
+    print('pausePlayer: $result');
+  }
+
+  void resumePlayer() async{
+    String result = await flutterSound.resumePlayer();
+    print('resumePlayer: $result');
+  }
+
+  void seekToPlayer(int milliSecs) async{
+    String result = await flutterSound.seekToPlayer(milliSecs);
+    print('seekToPlayer: $result');
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    return MaterialApp(
+      home: Scaffold(
+        appBar: AppBar(
+          title: const Text('Flutter Sound'),
+        ),
+        body: ListView(
+          children: <Widget>[
+            Column(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.center,
+              children: <Widget>[
+                Container(
+                  margin: EdgeInsets.only(top: 24.0, bottom:16.0),
+                  child: Text(
+                    this._recorderTxt,
+                    style: TextStyle(
+                      fontSize: 48.0,
+                      color: Colors.black,
+                    ),
+                  ),
+                ),
+                _isRecording ? LinearProgressIndicator(
+                  value: 100.0 / 160.0 * (this._dbLevel ?? 1) / 100,
+                  valueColor: AlwaysStoppedAnimation<Color>(Colors.green),
+                  backgroundColor: Colors.red,
+                ) : Container()
+              ],
+            ),
+            Row(
+              children: <Widget>[
+                Container(
+                  width: 56.0,
+                  height: 56.0,
+                  child: ClipOval(
+                    child: FlatButton(
+                      onPressed: () {
+                        if (!this._isRecording) {
+                          return this.startRecorder();
+                        }
+                        this.stopRecorder();
+                      },
+                      padding: EdgeInsets.all(8.0),
+                      child: Image(
+                        image: this._isRecording ? AssetImage('res/icons/ic_stop.png') : AssetImage('res/icons/ic_mic.png'),
+                      ),
+                    ),
+                  ),
+                ),
+              ],
+              mainAxisAlignment: MainAxisAlignment.center,
+              crossAxisAlignment: CrossAxisAlignment.center,
+            ),
+            Column(
+              crossAxisAlignment: CrossAxisAlignment.center,
+              mainAxisAlignment: MainAxisAlignment.center,
+              children: <Widget>[
+                Container(
+                  margin: EdgeInsets.only(top: 60.0, bottom:16.0),
+                  child: Text(
+                    this._playerTxt,
+                    style: TextStyle(
+                      fontSize: 48.0,
+                      color: Colors.black,
+                    ),
+                  ),
+                ),
+              ],
+            ),
+            Row(
+              children: <Widget>[
+                Container(
+                  width: 56.0,
+                  height: 56.0,
+                  child: ClipOval(
+                    child: FlatButton(
+                      onPressed: () {
+                        startPlayer();
+                      },
+                      padding: EdgeInsets.all(8.0),
+                      child: Image(
+                        image: AssetImage('res/icons/ic_play.png'),
+                      ),
+                    ),
+                  ),
+                ),
+                Container(
+                  width: 56.0,
+                  height: 56.0,
+                  child: ClipOval(
+                    child: FlatButton(
+                      onPressed: () {
+                        pausePlayer();
+                      },
+                      padding: EdgeInsets.all(8.0),
+                      child: Image(
+                        width: 36.0,
+                        height: 36.0,
+                        image: AssetImage('res/icons/ic_pause.png'),
+                      ),
+                    ),
+                  ),
+                ),
+                Container(
+                  width: 56.0,
+                  height: 56.0,
+                  child: ClipOval(
+                    child: FlatButton(
+                      onPressed: () {
+                        stopPlayer();
+                      },
+                      padding: EdgeInsets.all(8.0),
+                      child: Image(
+                        width: 28.0,
+                        height: 28.0,
+                        image: AssetImage('res/icons/ic_stop.png'),
+                      ),
+                    ),
+                  ),
+                ),
+              ],
+              mainAxisAlignment: MainAxisAlignment.center,
+              crossAxisAlignment: CrossAxisAlignment.center,
+            ),
+            Container(
+              height: 56.0,
+              child: Slider(
+                value: sliderCurrentPosition,
+                min: 0.0,
+                max: maxDuration,
+                onChanged: (double value) async{
+                  await flutterSound.seekToPlayer(value.toInt());
+                },
+                divisions: maxDuration.toInt()
+              )
+            )
+          ],
+        ),
+      ),
+    );
+  }
+}

+ 84 - 0
example/pubspec.yaml

@@ -0,0 +1,84 @@
+name: flutter_sound_example
+description: Demonstrates how to use the flutter_sound plugin.
+
+# The following defines the version and build number for your application.
+# A version number is three numbers separated by dots, like 1.2.43
+# followed by an optional build number separated by a +.
+# Both the version and the builder number may be overridden in flutter
+# build by specifying --build-name and --build-number, respectively.
+# Read more about versioning at semver.org.
+version: 1.0.0+1
+
+dependencies:
+  flutter:
+    sdk: flutter
+
+  # The following adds the Cupertino Icons font to your application.
+  # Use with the CupertinoIcons class for iOS style icons.
+  intl: ^0.15.6
+  cupertino_icons: ^0.1.2
+
+dev_dependencies:
+  flutter_test:
+    sdk: flutter
+
+  flutter_sound:
+    path: ../
+
+# For information on the generic Dart part of this file, see the
+# following page: https://www.dartlang.org/tools/pub/pubspec
+
+# The following section is specific to Flutter.
+flutter:
+
+  # The following line ensures that the Material Icons font is
+  # included with your application, so that you can use the icons in
+  # the material Icons class.
+  uses-material-design: true
+
+  # To add assets to your application, add an assets section, like this:
+  assets:
+  - res/icons/ic_play.png
+  - res/icons/2.0x/ic_play.png
+  - res/icons/3.0x/ic_play.png
+  - res/icons/ic_stop.png
+  - res/icons/2.0x/ic_stop.png
+  - res/icons/3.0x/ic_stop.png
+  - res/icons/ic_pause.png
+  - res/icons/2.0x/ic_pause.png
+  - res/icons/3.0x/ic_pause.png
+  - res/icons/ic_mic.png
+  - res/icons/2.0x/ic_mic.png
+  - res/icons/3.0x/ic_mic.png
+  - res/icons/ic_volume_down.png
+  - res/icons/2.0x/ic_volume_down.png
+  - res/icons/3.0x/ic_volume_down.png
+  - res/icons/ic_volume_up.png
+  - res/icons/2.0x/ic_volume_up.png
+  - res/icons/3.0x/ic_volume_up.png
+
+  # An image asset can refer to one or more resolution-specific "variants", see
+  # https://flutter.io/assets-and-images/#resolution-aware.
+
+  # For details regarding adding assets from package dependencies, see
+  # https://flutter.io/assets-and-images/#from-packages
+
+  # To add custom fonts to your application, add a fonts section here,
+  # in this "flutter" section. Each entry in this list should have a
+  # "family" key with the font family name, and a "fonts" key with a
+  # list giving the asset and other descriptors for the font. For
+  # example:
+  # fonts:
+  #   - family: Schyler
+  #     fonts:
+  #       - asset: fonts/Schyler-Regular.ttf
+  #       - asset: fonts/Schyler-Italic.ttf
+  #         style: italic
+  #   - family: Trajan Pro
+  #     fonts:
+  #       - asset: fonts/TrajanPro.ttf
+  #       - asset: fonts/TrajanPro_Bold.ttf
+  #         weight: 700
+  #
+  # For details regarding fonts from package dependencies,
+  # see https://flutter.io/custom-fonts/#from-packages

BIN
example/res/icons/2.0x/ic_mic.png


BIN
example/res/icons/2.0x/ic_pause.png


BIN
example/res/icons/2.0x/ic_play.png


BIN
example/res/icons/2.0x/ic_stop.png


BIN
example/res/icons/2.0x/ic_volume_down.png


BIN
example/res/icons/2.0x/ic_volume_up.png


BIN
example/res/icons/3.0x/ic_mic.png


BIN
example/res/icons/3.0x/ic_pause.png


BIN
example/res/icons/3.0x/ic_play.png


BIN
example/res/icons/3.0x/ic_stop.png


BIN
example/res/icons/3.0x/ic_volume_down.png


BIN
example/res/icons/3.0x/ic_volume_up.png


BIN
example/res/icons/ic_mic.png


BIN
example/res/icons/ic_pause.png


BIN
example/res/icons/ic_play.png


BIN
example/res/icons/ic_stop.png


BIN
example/res/icons/ic_volume_down.png


BIN
example/res/icons/ic_volume_up.png


+ 39 - 0
example/test/widget_test.dart

@@ -0,0 +1,39 @@
+// This is a basic Flutter widget test.
+// To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter
+// provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to
+// find child widgets in the widget tree, read text, and verify that the values of widget properties
+// are correct.
+
+import 'package:flutter/material.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:flutter/services.dart';
+
+import 'package:flutter_sound_example/main.dart';
+
+void main() {
+  final List<MethodCall> log = <MethodCall>[];
+  MethodChannel channel = const MethodChannel('plugins.flutter_sound/flutter_sound');
+  channel.setMockMethodCallHandler((MethodCall methodCall) async {
+    log.add(methodCall);
+  });
+
+  test('Audio Recorder', () async {
+    expect(log, equals(<MethodCall>[new MethodCall('startRecorder', "")]));
+  });
+
+  // Unregister the mock handler.
+  channel.setMockMethodCallHandler(null);
+
+  testWidgets('Render test', (WidgetTester tester) async {
+    // Build our app and trigger a frame.
+    await tester.pumpWidget(new MyApp());
+
+    // Verify that platform version is retrieved.
+    expect(
+        find.byWidgetPredicate(
+              (Widget widget) =>
+          widget is Text && widget.data.startsWith('Flutter Sound'),
+        ),
+        findsOneWidget);
+  });
+}

+ 36 - 0
ios/.gitignore

@@ -0,0 +1,36 @@
+.idea/
+.vagrant/
+.sconsign.dblite
+.svn/
+
+.DS_Store
+*.swp
+profile
+
+DerivedData/
+build/
+GeneratedPluginRegistrant.h
+GeneratedPluginRegistrant.m
+
+.generated/
+
+*.pbxuser
+*.mode1v3
+*.mode2v3
+*.perspectivev3
+
+!default.pbxuser
+!default.mode1v3
+!default.mode2v3
+!default.perspectivev3
+
+xcuserdata
+
+*.moved-aside
+
+*.pyc
+*sync/
+Icon?
+.tags*
+
+/Flutter/Generated.xcconfig

+ 0 - 0
ios/Assets/.gitkeep


+ 9 - 0
ios/Classes/FlutterSoundPlugin.h

@@ -0,0 +1,9 @@
+#import <Flutter/Flutter.h>
+#import <AVFoundation/AVFoundation.h>
+
+@interface FlutterSoundPlugin : NSObject<FlutterPlugin, AVAudioPlayerDelegate>
+- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player
+        successfully:(BOOL)flag;
+- (void)updateProgress:(NSTimer*) timer;
+- (void)startTimer;
+@end

Some files were not shown because too many files changed in this diff