diff --git a/android/.project b/android/.project
deleted file mode 100644
index 9551783f6..000000000
--- a/android/.project
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- permission_handler
- Project permission_handler created by Buildship.
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.buildship.core.gradleprojectbuilder
-
-
-
-
-
- org.eclipse.jdt.core.javanature
- org.eclipse.buildship.core.gradleprojectnature
-
-
diff --git a/example/.idea/libraries/Dart_SDK.xml b/example/.idea/libraries/Dart_SDK.xml
deleted file mode 100644
index be31de242..000000000
--- a/example/.idea/libraries/Dart_SDK.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/example/.idea/libraries/Flutter_for_Android.xml b/example/.idea/libraries/Flutter_for_Android.xml
deleted file mode 100644
index 8e06791ca..000000000
--- a/example/.idea/libraries/Flutter_for_Android.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/example/.idea/modules.xml b/example/.idea/modules.xml
deleted file mode 100644
index 5c250154b..000000000
--- a/example/.idea/modules.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/example/.idea/runConfigurations/main_dart.xml b/example/.idea/runConfigurations/main_dart.xml
deleted file mode 100644
index aab7b5cd8..000000000
--- a/example/.idea/runConfigurations/main_dart.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/example/.idea/workspace.xml b/example/.idea/workspace.xml
deleted file mode 100644
index 5b3388cc1..000000000
--- a/example/.idea/workspace.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/android/.project b/example/android/.project
deleted file mode 100644
index 3964dd3f5..000000000
--- a/example/android/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
- android
- Project android created by Buildship.
-
-
-
-
- org.eclipse.buildship.core.gradleprojectbuilder
-
-
-
-
-
- org.eclipse.buildship.core.gradleprojectnature
-
-
diff --git a/example/android/gradle/wrapper/gradle-wrapper.jar b/example/android/gradle/wrapper/gradle-wrapper.jar
deleted file mode 100644
index 13372aef5..000000000
Binary files a/example/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ
diff --git a/example/android/gradlew b/example/android/gradlew
deleted file mode 100755
index 9d82f7891..000000000
--- a/example/android/gradlew
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/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 "$@"
diff --git a/example/android/gradlew.bat b/example/android/gradlew.bat
deleted file mode 100644
index 8a0b282aa..000000000
--- a/example/android/gradlew.bat
+++ /dev/null
@@ -1,90 +0,0 @@
-@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
diff --git a/example/permission_handler_example.iml b/example/permission_handler_example.iml
deleted file mode 100644
index e5c837191..000000000
--- a/example/permission_handler_example.iml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/lib/permission_handler.dart b/lib/permission_handler.dart
deleted file mode 100644
index bc2088324..000000000
--- a/lib/permission_handler.dart
+++ /dev/null
@@ -1,4 +0,0 @@
-library permission_handler;
-
-export 'src/permission_enums.dart';
-export 'src/permission_handler.dart';
diff --git a/permission_handler.iml b/permission_handler.iml
deleted file mode 100644
index 73e7ebd0d..000000000
--- a/permission_handler.iml
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/CHANGELOG.md b/permission_handler/CHANGELOG.md
similarity index 92%
rename from CHANGELOG.md
rename to permission_handler/CHANGELOG.md
index 0fb338ea7..e21117828 100644
--- a/CHANGELOG.md
+++ b/permission_handler/CHANGELOG.md
@@ -1,7 +1,9 @@
-## vNext
+## 4.4.0
+* Updated plugin structure to confirm to the Flutter federated plugin architecture. This will make it easier to add new platform implementations (see: https://medium.com/flutter/how-to-write-a-flutter-web-plugin-part-2-afdddb69ece6);
* Android: Migrate to FlutterPlugin Android API (better support for Add-to-App);
-* Android: Suppress JAVA warnings which are generated to old platform code (only executes on older platforms).
+* Android: Suppress JAVA warnings which are generated to old platform code (only executes on older platforms);
+* Android: Fixed issue which sometimes resulting in illegal cast exception.
## 4.3.0
diff --git a/LICENSE b/permission_handler/LICENSE
similarity index 100%
rename from LICENSE
rename to permission_handler/LICENSE
diff --git a/README.md b/permission_handler/README.md
similarity index 98%
rename from README.md
rename to permission_handler/README.md
index f040c91e4..9ca7f679e 100644
--- a/README.md
+++ b/permission_handler/README.md
@@ -17,7 +17,7 @@ To use this plugin, add `permission_handler` as a [dependency in your pubspec.ya
```yaml
dependencies:
- permission_handler: '^4.3.0'
+ permission_handler: '^4.4.0'
```
> **NOTE:** As of version 3.1.0 the permission_handler plugin switched to the AndroidX version of the Android Support Libraries. This means you need to make sure your Android project is also upgraded to support AndroidX. Detailed instructions can be found [here](https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility).
@@ -312,7 +312,7 @@ Please file any issues, bugs or feature request as an issue on our [GitHub](http
## Want to contribute
-If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our [contribution guide](CONTRIBUTING.md) and send us your [pull request](https://github.com/Baseflow/flutter-permission-handler/pulls).
+If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our [contribution guide](../CONTRIBUTING.md) and send us your [pull request](https://github.com/Baseflow/flutter-permission-handler/pulls).
## Author
diff --git a/analysis_options.yaml b/permission_handler/analysis_options.yaml
similarity index 100%
rename from analysis_options.yaml
rename to permission_handler/analysis_options.yaml
diff --git a/android/.classpath b/permission_handler/android/.classpath
similarity index 100%
rename from android/.classpath
rename to permission_handler/android/.classpath
diff --git a/android/.gitignore b/permission_handler/android/.gitignore
similarity index 100%
rename from android/.gitignore
rename to permission_handler/android/.gitignore
diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/permission_handler/android/.settings/org.eclipse.buildship.core.prefs
similarity index 100%
rename from android/.settings/org.eclipse.buildship.core.prefs
rename to permission_handler/android/.settings/org.eclipse.buildship.core.prefs
diff --git a/android/build.gradle b/permission_handler/android/build.gradle
similarity index 100%
rename from android/build.gradle
rename to permission_handler/android/build.gradle
diff --git a/android/gradle.properties b/permission_handler/android/gradle.properties
similarity index 100%
rename from android/gradle.properties
rename to permission_handler/android/gradle.properties
diff --git a/android/settings.gradle b/permission_handler/android/settings.gradle
similarity index 100%
rename from android/settings.gradle
rename to permission_handler/android/settings.gradle
diff --git a/android/src/main/AndroidManifest.xml b/permission_handler/android/src/main/AndroidManifest.xml
similarity index 100%
rename from android/src/main/AndroidManifest.xml
rename to permission_handler/android/src/main/AndroidManifest.xml
diff --git a/android/src/main/java/com/baseflow/permissionhandler/AppSettingsManager.java b/permission_handler/android/src/main/java/com/baseflow/permissionhandler/AppSettingsManager.java
similarity index 100%
rename from android/src/main/java/com/baseflow/permissionhandler/AppSettingsManager.java
rename to permission_handler/android/src/main/java/com/baseflow/permissionhandler/AppSettingsManager.java
diff --git a/android/src/main/java/com/baseflow/permissionhandler/MethodCallHandlerImpl.java b/permission_handler/android/src/main/java/com/baseflow/permissionhandler/MethodCallHandlerImpl.java
similarity index 100%
rename from android/src/main/java/com/baseflow/permissionhandler/MethodCallHandlerImpl.java
rename to permission_handler/android/src/main/java/com/baseflow/permissionhandler/MethodCallHandlerImpl.java
diff --git a/android/src/main/java/com/baseflow/permissionhandler/PermissionConstants.java b/permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionConstants.java
similarity index 100%
rename from android/src/main/java/com/baseflow/permissionhandler/PermissionConstants.java
rename to permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionConstants.java
diff --git a/android/src/main/java/com/baseflow/permissionhandler/PermissionHandlerPlugin.java b/permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionHandlerPlugin.java
similarity index 100%
rename from android/src/main/java/com/baseflow/permissionhandler/PermissionHandlerPlugin.java
rename to permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionHandlerPlugin.java
diff --git a/android/src/main/java/com/baseflow/permissionhandler/PermissionManager.java b/permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionManager.java
similarity index 100%
rename from android/src/main/java/com/baseflow/permissionhandler/PermissionManager.java
rename to permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionManager.java
diff --git a/android/src/main/java/com/baseflow/permissionhandler/PermissionUtils.java b/permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionUtils.java
similarity index 100%
rename from android/src/main/java/com/baseflow/permissionhandler/PermissionUtils.java
rename to permission_handler/android/src/main/java/com/baseflow/permissionhandler/PermissionUtils.java
diff --git a/android/src/main/java/com/baseflow/permissionhandler/ServiceManager.java b/permission_handler/android/src/main/java/com/baseflow/permissionhandler/ServiceManager.java
similarity index 100%
rename from android/src/main/java/com/baseflow/permissionhandler/ServiceManager.java
rename to permission_handler/android/src/main/java/com/baseflow/permissionhandler/ServiceManager.java
diff --git a/example/.gitignore b/permission_handler/example/.gitignore
similarity index 100%
rename from example/.gitignore
rename to permission_handler/example/.gitignore
diff --git a/example/.metadata b/permission_handler/example/.metadata
similarity index 100%
rename from example/.metadata
rename to permission_handler/example/.metadata
diff --git a/example/README.md b/permission_handler/example/README.md
similarity index 100%
rename from example/README.md
rename to permission_handler/example/README.md
diff --git a/example/android/.settings/org.eclipse.buildship.core.prefs b/permission_handler/example/android/.settings/org.eclipse.buildship.core.prefs
similarity index 100%
rename from example/android/.settings/org.eclipse.buildship.core.prefs
rename to permission_handler/example/android/.settings/org.eclipse.buildship.core.prefs
diff --git a/example/android/app/build.gradle b/permission_handler/example/android/app/build.gradle
similarity index 100%
rename from example/android/app/build.gradle
rename to permission_handler/example/android/app/build.gradle
diff --git a/example/android/app/src/main/AndroidManifest.xml b/permission_handler/example/android/app/src/main/AndroidManifest.xml
similarity index 100%
rename from example/android/app/src/main/AndroidManifest.xml
rename to permission_handler/example/android/app/src/main/AndroidManifest.xml
diff --git a/example/android/app/src/main/res/drawable/launch_background.xml b/permission_handler/example/android/app/src/main/res/drawable/launch_background.xml
similarity index 100%
rename from example/android/app/src/main/res/drawable/launch_background.xml
rename to permission_handler/example/android/app/src/main/res/drawable/launch_background.xml
diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/permission_handler/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
similarity index 100%
rename from example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
rename to permission_handler/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/permission_handler/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
similarity index 100%
rename from example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
rename to permission_handler/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/permission_handler/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
similarity index 100%
rename from example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
rename to permission_handler/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/permission_handler/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
similarity index 100%
rename from example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
rename to permission_handler/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/permission_handler/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
similarity index 100%
rename from example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
rename to permission_handler/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
diff --git a/example/android/app/src/main/res/values/styles.xml b/permission_handler/example/android/app/src/main/res/values/styles.xml
similarity index 100%
rename from example/android/app/src/main/res/values/styles.xml
rename to permission_handler/example/android/app/src/main/res/values/styles.xml
diff --git a/example/android/app/src/profile/AndroidManifest.xml b/permission_handler/example/android/app/src/profile/AndroidManifest.xml
similarity index 100%
rename from example/android/app/src/profile/AndroidManifest.xml
rename to permission_handler/example/android/app/src/profile/AndroidManifest.xml
diff --git a/example/android/build.gradle b/permission_handler/example/android/build.gradle
similarity index 100%
rename from example/android/build.gradle
rename to permission_handler/example/android/build.gradle
diff --git a/example/android/gradle.properties b/permission_handler/example/android/gradle.properties
similarity index 100%
rename from example/android/gradle.properties
rename to permission_handler/example/android/gradle.properties
diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/permission_handler/example/android/gradle/wrapper/gradle-wrapper.properties
similarity index 100%
rename from example/android/gradle/wrapper/gradle-wrapper.properties
rename to permission_handler/example/android/gradle/wrapper/gradle-wrapper.properties
diff --git a/example/android/settings.gradle b/permission_handler/example/android/settings.gradle
similarity index 100%
rename from example/android/settings.gradle
rename to permission_handler/example/android/settings.gradle
diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/permission_handler/example/ios/Flutter/AppFrameworkInfo.plist
similarity index 100%
rename from example/ios/Flutter/AppFrameworkInfo.plist
rename to permission_handler/example/ios/Flutter/AppFrameworkInfo.plist
diff --git a/example/ios/Flutter/Debug.xcconfig b/permission_handler/example/ios/Flutter/Debug.xcconfig
similarity index 100%
rename from example/ios/Flutter/Debug.xcconfig
rename to permission_handler/example/ios/Flutter/Debug.xcconfig
diff --git a/example/ios/Flutter/Flutter.podspec b/permission_handler/example/ios/Flutter/Flutter.podspec
similarity index 100%
rename from example/ios/Flutter/Flutter.podspec
rename to permission_handler/example/ios/Flutter/Flutter.podspec
diff --git a/example/ios/Flutter/Release.xcconfig b/permission_handler/example/ios/Flutter/Release.xcconfig
similarity index 100%
rename from example/ios/Flutter/Release.xcconfig
rename to permission_handler/example/ios/Flutter/Release.xcconfig
diff --git a/example/ios/Podfile b/permission_handler/example/ios/Podfile
similarity index 100%
rename from example/ios/Podfile
rename to permission_handler/example/ios/Podfile
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/permission_handler/example/ios/Runner.xcodeproj/project.pbxproj
similarity index 100%
rename from example/ios/Runner.xcodeproj/project.pbxproj
rename to permission_handler/example/ios/Runner.xcodeproj/project.pbxproj
diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/permission_handler/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
similarity index 100%
rename from example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
rename to permission_handler/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/permission_handler/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
similarity index 100%
rename from example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
rename to permission_handler/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/permission_handler/example/ios/Runner.xcworkspace/contents.xcworkspacedata
similarity index 100%
rename from example/ios/Runner.xcworkspace/contents.xcworkspacedata
rename to permission_handler/example/ios/Runner.xcworkspace/contents.xcworkspacedata
diff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/permission_handler/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
similarity index 100%
rename from example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
rename to permission_handler/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/permission_handler/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
similarity index 100%
rename from example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
rename to permission_handler/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
diff --git a/example/ios/Runner/AppDelegate.h b/permission_handler/example/ios/Runner/AppDelegate.h
similarity index 100%
rename from example/ios/Runner/AppDelegate.h
rename to permission_handler/example/ios/Runner/AppDelegate.h
diff --git a/example/ios/Runner/AppDelegate.m b/permission_handler/example/ios/Runner/AppDelegate.m
similarity index 100%
rename from example/ios/Runner/AppDelegate.m
rename to permission_handler/example/ios/Runner/AppDelegate.m
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/permission_handler/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
rename to permission_handler/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/permission_handler/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/permission_handler/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/permission_handler/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
rename to permission_handler/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/permission_handler/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
similarity index 100%
rename from example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
rename to permission_handler/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
diff --git a/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/permission_handler/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
similarity index 100%
rename from example/ios/Runner/Base.lproj/LaunchScreen.storyboard
rename to permission_handler/example/ios/Runner/Base.lproj/LaunchScreen.storyboard
diff --git a/example/ios/Runner/Base.lproj/Main.storyboard b/permission_handler/example/ios/Runner/Base.lproj/Main.storyboard
similarity index 100%
rename from example/ios/Runner/Base.lproj/Main.storyboard
rename to permission_handler/example/ios/Runner/Base.lproj/Main.storyboard
diff --git a/example/ios/Runner/Info.plist b/permission_handler/example/ios/Runner/Info.plist
similarity index 100%
rename from example/ios/Runner/Info.plist
rename to permission_handler/example/ios/Runner/Info.plist
diff --git a/example/ios/Runner/Runner.entitlements b/permission_handler/example/ios/Runner/Runner.entitlements
similarity index 100%
rename from example/ios/Runner/Runner.entitlements
rename to permission_handler/example/ios/Runner/Runner.entitlements
diff --git a/example/ios/Runner/main.m b/permission_handler/example/ios/Runner/main.m
similarity index 100%
rename from example/ios/Runner/main.m
rename to permission_handler/example/ios/Runner/main.m
diff --git a/example/lib/main.dart b/permission_handler/example/lib/main.dart
similarity index 100%
rename from example/lib/main.dart
rename to permission_handler/example/lib/main.dart
diff --git a/example/pubspec.yaml b/permission_handler/example/pubspec.yaml
similarity index 100%
rename from example/pubspec.yaml
rename to permission_handler/example/pubspec.yaml
diff --git a/ios/.gitignore b/permission_handler/ios/.gitignore
similarity index 100%
rename from ios/.gitignore
rename to permission_handler/ios/.gitignore
diff --git a/ios/Assets/.gitkeep b/permission_handler/ios/Assets/.gitkeep
similarity index 100%
rename from ios/Assets/.gitkeep
rename to permission_handler/ios/Assets/.gitkeep
diff --git a/ios/Classes/PermissionHandlerEnums.h b/permission_handler/ios/Classes/PermissionHandlerEnums.h
similarity index 100%
rename from ios/Classes/PermissionHandlerEnums.h
rename to permission_handler/ios/Classes/PermissionHandlerEnums.h
diff --git a/ios/Classes/PermissionHandlerPlugin.h b/permission_handler/ios/Classes/PermissionHandlerPlugin.h
similarity index 100%
rename from ios/Classes/PermissionHandlerPlugin.h
rename to permission_handler/ios/Classes/PermissionHandlerPlugin.h
diff --git a/ios/Classes/PermissionHandlerPlugin.m b/permission_handler/ios/Classes/PermissionHandlerPlugin.m
similarity index 100%
rename from ios/Classes/PermissionHandlerPlugin.m
rename to permission_handler/ios/Classes/PermissionHandlerPlugin.m
diff --git a/ios/Classes/PermissionManager.h b/permission_handler/ios/Classes/PermissionManager.h
similarity index 100%
rename from ios/Classes/PermissionManager.h
rename to permission_handler/ios/Classes/PermissionManager.h
diff --git a/ios/Classes/PermissionManager.m b/permission_handler/ios/Classes/PermissionManager.m
similarity index 100%
rename from ios/Classes/PermissionManager.m
rename to permission_handler/ios/Classes/PermissionManager.m
diff --git a/ios/Classes/strategies/AudioVideoPermissionStrategy.h b/permission_handler/ios/Classes/strategies/AudioVideoPermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/AudioVideoPermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/AudioVideoPermissionStrategy.h
diff --git a/ios/Classes/strategies/AudioVideoPermissionStrategy.m b/permission_handler/ios/Classes/strategies/AudioVideoPermissionStrategy.m
similarity index 100%
rename from ios/Classes/strategies/AudioVideoPermissionStrategy.m
rename to permission_handler/ios/Classes/strategies/AudioVideoPermissionStrategy.m
diff --git a/ios/Classes/strategies/ContactPermissionStrategy.h b/permission_handler/ios/Classes/strategies/ContactPermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/ContactPermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/ContactPermissionStrategy.h
diff --git a/ios/Classes/strategies/ContactPermissionStrategy.m b/permission_handler/ios/Classes/strategies/ContactPermissionStrategy.m
similarity index 100%
rename from ios/Classes/strategies/ContactPermissionStrategy.m
rename to permission_handler/ios/Classes/strategies/ContactPermissionStrategy.m
diff --git a/ios/Classes/strategies/EventPermissionStrategy.h b/permission_handler/ios/Classes/strategies/EventPermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/EventPermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/EventPermissionStrategy.h
diff --git a/ios/Classes/strategies/EventPermissionStrategy.m b/permission_handler/ios/Classes/strategies/EventPermissionStrategy.m
similarity index 100%
rename from ios/Classes/strategies/EventPermissionStrategy.m
rename to permission_handler/ios/Classes/strategies/EventPermissionStrategy.m
diff --git a/ios/Classes/strategies/LocationPermissionStrategy.h b/permission_handler/ios/Classes/strategies/LocationPermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/LocationPermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/LocationPermissionStrategy.h
diff --git a/ios/Classes/strategies/LocationPermissionStrategy.m b/permission_handler/ios/Classes/strategies/LocationPermissionStrategy.m
similarity index 100%
rename from ios/Classes/strategies/LocationPermissionStrategy.m
rename to permission_handler/ios/Classes/strategies/LocationPermissionStrategy.m
diff --git a/ios/Classes/strategies/MediaLibraryPermissionStrategy.h b/permission_handler/ios/Classes/strategies/MediaLibraryPermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/MediaLibraryPermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/MediaLibraryPermissionStrategy.h
diff --git a/ios/Classes/strategies/MediaLibraryPermissionStrategy.m b/permission_handler/ios/Classes/strategies/MediaLibraryPermissionStrategy.m
similarity index 100%
rename from ios/Classes/strategies/MediaLibraryPermissionStrategy.m
rename to permission_handler/ios/Classes/strategies/MediaLibraryPermissionStrategy.m
diff --git a/ios/Classes/strategies/NotificationPermissionStrategy.h b/permission_handler/ios/Classes/strategies/NotificationPermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/NotificationPermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/NotificationPermissionStrategy.h
diff --git a/ios/Classes/strategies/NotificationPermissionStrategy.m b/permission_handler/ios/Classes/strategies/NotificationPermissionStrategy.m
similarity index 100%
rename from ios/Classes/strategies/NotificationPermissionStrategy.m
rename to permission_handler/ios/Classes/strategies/NotificationPermissionStrategy.m
diff --git a/ios/Classes/strategies/PermissionStrategy.h b/permission_handler/ios/Classes/strategies/PermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/PermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/PermissionStrategy.h
diff --git a/ios/Classes/strategies/PhonePermissionStrategy.h b/permission_handler/ios/Classes/strategies/PhonePermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/PhonePermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/PhonePermissionStrategy.h
diff --git a/ios/Classes/strategies/PhonePermissionStrategy.m b/permission_handler/ios/Classes/strategies/PhonePermissionStrategy.m
similarity index 100%
rename from ios/Classes/strategies/PhonePermissionStrategy.m
rename to permission_handler/ios/Classes/strategies/PhonePermissionStrategy.m
diff --git a/ios/Classes/strategies/PhotoPermissionStrategy.h b/permission_handler/ios/Classes/strategies/PhotoPermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/PhotoPermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/PhotoPermissionStrategy.h
diff --git a/ios/Classes/strategies/PhotoPermissionStrategy.m b/permission_handler/ios/Classes/strategies/PhotoPermissionStrategy.m
similarity index 100%
rename from ios/Classes/strategies/PhotoPermissionStrategy.m
rename to permission_handler/ios/Classes/strategies/PhotoPermissionStrategy.m
diff --git a/ios/Classes/strategies/SensorPermissionStrategy.h b/permission_handler/ios/Classes/strategies/SensorPermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/SensorPermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/SensorPermissionStrategy.h
diff --git a/ios/Classes/strategies/SensorPermissionStrategy.m b/permission_handler/ios/Classes/strategies/SensorPermissionStrategy.m
similarity index 100%
rename from ios/Classes/strategies/SensorPermissionStrategy.m
rename to permission_handler/ios/Classes/strategies/SensorPermissionStrategy.m
diff --git a/ios/Classes/strategies/SpeechPermissionStrategy.h b/permission_handler/ios/Classes/strategies/SpeechPermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/SpeechPermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/SpeechPermissionStrategy.h
diff --git a/ios/Classes/strategies/SpeechPermissionStrategy.m b/permission_handler/ios/Classes/strategies/SpeechPermissionStrategy.m
similarity index 100%
rename from ios/Classes/strategies/SpeechPermissionStrategy.m
rename to permission_handler/ios/Classes/strategies/SpeechPermissionStrategy.m
diff --git a/ios/Classes/strategies/StoragePermissionStrategy.h b/permission_handler/ios/Classes/strategies/StoragePermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/StoragePermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/StoragePermissionStrategy.h
diff --git a/ios/Classes/strategies/StoragePermissionStrategy.m b/permission_handler/ios/Classes/strategies/StoragePermissionStrategy.m
similarity index 100%
rename from ios/Classes/strategies/StoragePermissionStrategy.m
rename to permission_handler/ios/Classes/strategies/StoragePermissionStrategy.m
diff --git a/ios/Classes/strategies/UnknownPermissionStrategy.h b/permission_handler/ios/Classes/strategies/UnknownPermissionStrategy.h
similarity index 100%
rename from ios/Classes/strategies/UnknownPermissionStrategy.h
rename to permission_handler/ios/Classes/strategies/UnknownPermissionStrategy.h
diff --git a/ios/Classes/strategies/UnknownPermissionStrategy.m b/permission_handler/ios/Classes/strategies/UnknownPermissionStrategy.m
similarity index 100%
rename from ios/Classes/strategies/UnknownPermissionStrategy.m
rename to permission_handler/ios/Classes/strategies/UnknownPermissionStrategy.m
diff --git a/ios/Classes/util/Codec.h b/permission_handler/ios/Classes/util/Codec.h
similarity index 100%
rename from ios/Classes/util/Codec.h
rename to permission_handler/ios/Classes/util/Codec.h
diff --git a/ios/Classes/util/Codec.m b/permission_handler/ios/Classes/util/Codec.m
similarity index 100%
rename from ios/Classes/util/Codec.m
rename to permission_handler/ios/Classes/util/Codec.m
diff --git a/ios/permission_handler.podspec b/permission_handler/ios/permission_handler.podspec
similarity index 100%
rename from ios/permission_handler.podspec
rename to permission_handler/ios/permission_handler.podspec
diff --git a/permission_handler/lib/permission_handler.dart b/permission_handler/lib/permission_handler.dart
new file mode 100644
index 000000000..18fee4941
--- /dev/null
+++ b/permission_handler/lib/permission_handler.dart
@@ -0,0 +1,45 @@
+import 'dart:async';
+import 'dart:io';
+
+import 'package:permission_handler_platform_interface/permission_handler_platform_interface.dart';
+
+export 'package:permission_handler_platform_interface/permission_handler_platform_interface.dart'
+ show PermissionGroup, PermissionStatus, ServiceStatus;
+
+/// The Android and iOS implementation of [PermissionHandlerPlatform].
+///
+/// This class implements the `package:permission_handler` functionality for
+/// the Android and iOS platforms.
+class PermissionHandler extends PermissionHandlerPlatform {
+ @override
+ Future checkServiceStatus(PermissionGroup permission) {
+ return PermissionHandlerPlatform.instance.checkServiceStatus(permission);
+ }
+
+ @override
+ Future checkPermissionStatus(PermissionGroup permission) {
+ return PermissionHandlerPlatform.instance.checkPermissionStatus(permission);
+ }
+
+ @override
+ Future openAppSettings() {
+ return PermissionHandlerPlatform.instance.openAppSettings();
+ }
+
+ @override
+ Future