diff --git a/file_picker/CHANGELOG.md b/CHANGELOG.md similarity index 100% rename from file_picker/CHANGELOG.md rename to CHANGELOG.md diff --git a/file_picker/LICENSE b/LICENSE similarity index 100% rename from file_picker/LICENSE rename to LICENSE diff --git a/file_picker/README.md b/README.md similarity index 100% rename from file_picker/README.md rename to README.md diff --git a/file_picker/android/.classpath b/android/.classpath similarity index 100% rename from file_picker/android/.classpath rename to android/.classpath diff --git a/file_picker/android/.gitignore b/android/.gitignore similarity index 100% rename from file_picker/android/.gitignore rename to android/.gitignore diff --git a/file_picker/android/.project b/android/.project similarity index 100% rename from file_picker/android/.project rename to android/.project diff --git a/file_picker/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from file_picker/android/.settings/org.eclipse.buildship.core.prefs rename to android/.settings/org.eclipse.buildship.core.prefs diff --git a/file_picker/android/build.gradle b/android/build.gradle similarity index 100% rename from file_picker/android/build.gradle rename to android/build.gradle diff --git a/file_picker/android/gradle.properties b/android/gradle.properties similarity index 100% rename from file_picker/android/gradle.properties rename to android/gradle.properties diff --git a/file_picker/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from file_picker/android/gradle/wrapper/gradle-wrapper.properties rename to android/gradle/wrapper/gradle-wrapper.properties diff --git a/file_picker/android/settings.gradle b/android/settings.gradle similarity index 100% rename from file_picker/android/settings.gradle rename to android/settings.gradle diff --git a/file_picker/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml similarity index 100% rename from file_picker/android/src/main/AndroidManifest.xml rename to android/src/main/AndroidManifest.xml diff --git a/file_picker/android/src/main/java/com/mr/flutter/plugin/filepicker/FileInfo.java b/android/src/main/java/com/mr/flutter/plugin/filepicker/FileInfo.java similarity index 100% rename from file_picker/android/src/main/java/com/mr/flutter/plugin/filepicker/FileInfo.java rename to android/src/main/java/com/mr/flutter/plugin/filepicker/FileInfo.java diff --git a/file_picker/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerDelegate.java b/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerDelegate.java similarity index 100% rename from file_picker/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerDelegate.java rename to android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerDelegate.java diff --git a/file_picker/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java b/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java similarity index 100% rename from file_picker/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java rename to android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java diff --git a/file_picker/android/src/main/java/com/mr/flutter/plugin/filepicker/FileUtils.java b/android/src/main/java/com/mr/flutter/plugin/filepicker/FileUtils.java similarity index 100% rename from file_picker/android/src/main/java/com/mr/flutter/plugin/filepicker/FileUtils.java rename to android/src/main/java/com/mr/flutter/plugin/filepicker/FileUtils.java diff --git a/file_picker/example/.gitignore b/example/.gitignore similarity index 100% rename from file_picker/example/.gitignore rename to example/.gitignore diff --git a/file_picker/example/.metadata b/example/.metadata similarity index 100% rename from file_picker/example/.metadata rename to example/.metadata diff --git a/file_picker/example/README.md b/example/README.md similarity index 100% rename from file_picker/example/README.md rename to example/README.md diff --git a/file_picker/example/android/.gitignore b/example/android/.gitignore similarity index 100% rename from file_picker/example/android/.gitignore rename to example/android/.gitignore diff --git a/file_picker/example/android/.project b/example/android/.project similarity index 100% rename from file_picker/example/android/.project rename to example/android/.project diff --git a/file_picker/example/android/.settings/org.eclipse.buildship.core.prefs b/example/android/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from file_picker/example/android/.settings/org.eclipse.buildship.core.prefs rename to example/android/.settings/org.eclipse.buildship.core.prefs diff --git a/file_picker/example/android/app/.classpath b/example/android/app/.classpath similarity index 100% rename from file_picker/example/android/app/.classpath rename to example/android/app/.classpath diff --git a/file_picker/example/android/app/.project b/example/android/app/.project similarity index 100% rename from file_picker/example/android/app/.project rename to example/android/app/.project diff --git a/file_picker/example/android/app/.settings/org.eclipse.buildship.core.prefs b/example/android/app/.settings/org.eclipse.buildship.core.prefs similarity index 100% rename from file_picker/example/android/app/.settings/org.eclipse.buildship.core.prefs rename to example/android/app/.settings/org.eclipse.buildship.core.prefs diff --git a/file_picker/example/android/app/build.gradle b/example/android/app/build.gradle similarity index 100% rename from file_picker/example/android/app/build.gradle rename to example/android/app/build.gradle diff --git a/file_picker/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml similarity index 100% rename from file_picker/example/android/app/src/debug/AndroidManifest.xml rename to example/android/app/src/debug/AndroidManifest.xml diff --git a/file_picker/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml similarity index 100% rename from file_picker/example/android/app/src/main/AndroidManifest.xml rename to example/android/app/src/main/AndroidManifest.xml diff --git a/file_picker/example/android/app/src/main/java/com/mr/flutter/plugin/filepickerexample/MainActivity.java b/example/android/app/src/main/java/com/mr/flutter/plugin/filepickerexample/MainActivity.java similarity index 100% rename from file_picker/example/android/app/src/main/java/com/mr/flutter/plugin/filepickerexample/MainActivity.java rename to example/android/app/src/main/java/com/mr/flutter/plugin/filepickerexample/MainActivity.java diff --git a/file_picker/example/android/app/src/main/kotlin/com/mr/flutter/plugin/example/MainActivity.kt b/example/android/app/src/main/kotlin/com/mr/flutter/plugin/example/MainActivity.kt similarity index 100% rename from file_picker/example/android/app/src/main/kotlin/com/mr/flutter/plugin/example/MainActivity.kt rename to example/android/app/src/main/kotlin/com/mr/flutter/plugin/example/MainActivity.kt diff --git a/file_picker/example/android/app/src/main/res/drawable/launch_background.xml b/example/android/app/src/main/res/drawable/launch_background.xml similarity index 100% rename from file_picker/example/android/app/src/main/res/drawable/launch_background.xml rename to example/android/app/src/main/res/drawable/launch_background.xml diff --git a/file_picker/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from file_picker/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png rename to example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/file_picker/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from file_picker/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png rename to example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/file_picker/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from file_picker/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png rename to example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/file_picker/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from file_picker/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png rename to example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/file_picker/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from file_picker/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png rename to example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/file_picker/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml similarity index 100% rename from file_picker/example/android/app/src/main/res/values/styles.xml rename to example/android/app/src/main/res/values/styles.xml diff --git a/file_picker/example/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml similarity index 100% rename from file_picker/example/android/app/src/profile/AndroidManifest.xml rename to example/android/app/src/profile/AndroidManifest.xml diff --git a/file_picker/example/android/build.gradle b/example/android/build.gradle similarity index 100% rename from file_picker/example/android/build.gradle rename to example/android/build.gradle diff --git a/file_picker/example/android/gradle.properties b/example/android/gradle.properties similarity index 100% rename from file_picker/example/android/gradle.properties rename to example/android/gradle.properties diff --git a/file_picker/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from file_picker/example/android/gradle/wrapper/gradle-wrapper.properties rename to example/android/gradle/wrapper/gradle-wrapper.properties diff --git a/file_picker/example/android/settings.gradle b/example/android/settings.gradle similarity index 100% rename from file_picker/example/android/settings.gradle rename to example/android/settings.gradle diff --git a/file_picker/example/example.gif b/example/example.gif similarity index 100% rename from file_picker/example/example.gif rename to example/example.gif diff --git a/file_picker/example/example_ios.gif b/example/example_ios.gif similarity index 100% rename from file_picker/example/example_ios.gif rename to example/example_ios.gif diff --git a/file_picker/example/ios/.gitignore b/example/ios/.gitignore similarity index 100% rename from file_picker/example/ios/.gitignore rename to example/ios/.gitignore diff --git a/file_picker/example/ios/Flutter/.last_build_id b/example/ios/Flutter/.last_build_id similarity index 100% rename from file_picker/example/ios/Flutter/.last_build_id rename to example/ios/Flutter/.last_build_id diff --git a/file_picker/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist similarity index 100% rename from file_picker/example/ios/Flutter/AppFrameworkInfo.plist rename to example/ios/Flutter/AppFrameworkInfo.plist diff --git a/file_picker/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig similarity index 100% rename from file_picker/example/ios/Flutter/Debug.xcconfig rename to example/ios/Flutter/Debug.xcconfig diff --git a/file_picker/example/ios/Flutter/Flutter.podspec b/example/ios/Flutter/Flutter.podspec similarity index 100% rename from file_picker/example/ios/Flutter/Flutter.podspec rename to example/ios/Flutter/Flutter.podspec diff --git a/file_picker/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig similarity index 100% rename from file_picker/example/ios/Flutter/Release.xcconfig rename to example/ios/Flutter/Release.xcconfig diff --git a/file_picker/example/ios/Podfile b/example/ios/Podfile similarity index 100% rename from file_picker/example/ios/Podfile rename to example/ios/Podfile diff --git a/file_picker/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj similarity index 100% rename from file_picker/example/ios/Runner.xcodeproj/project.pbxproj rename to example/ios/Runner.xcodeproj/project.pbxproj diff --git a/file_picker/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from file_picker/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/file_picker/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from file_picker/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/file_picker/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from file_picker/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/file_picker/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme similarity index 100% rename from file_picker/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme rename to example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme diff --git a/file_picker/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcworkspace/contents.xcworkspacedata similarity index 100% rename from file_picker/example/ios/Runner.xcworkspace/contents.xcworkspacedata rename to example/ios/Runner.xcworkspace/contents.xcworkspacedata diff --git a/file_picker/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from file_picker/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/file_picker/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from file_picker/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/file_picker/example/ios/Runner/AppDelegate.h b/example/ios/Runner/AppDelegate.h similarity index 100% rename from file_picker/example/ios/Runner/AppDelegate.h rename to example/ios/Runner/AppDelegate.h diff --git a/file_picker/example/ios/Runner/AppDelegate.m b/example/ios/Runner/AppDelegate.m similarity index 100% rename from file_picker/example/ios/Runner/AppDelegate.m rename to example/ios/Runner/AppDelegate.m diff --git a/file_picker/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift similarity index 100% rename from file_picker/example/ios/Runner/AppDelegate.swift rename to example/ios/Runner/AppDelegate.swift diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png rename to example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json rename to example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json diff --git a/file_picker/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png rename to example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png rename to example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png rename to example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png diff --git a/file_picker/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md similarity index 100% rename from file_picker/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md rename to example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md diff --git a/file_picker/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from file_picker/example/ios/Runner/Base.lproj/LaunchScreen.storyboard rename to example/ios/Runner/Base.lproj/LaunchScreen.storyboard diff --git a/file_picker/example/ios/Runner/Base.lproj/Main.storyboard b/example/ios/Runner/Base.lproj/Main.storyboard similarity index 100% rename from file_picker/example/ios/Runner/Base.lproj/Main.storyboard rename to example/ios/Runner/Base.lproj/Main.storyboard diff --git a/file_picker/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist similarity index 100% rename from file_picker/example/ios/Runner/Info.plist rename to example/ios/Runner/Info.plist diff --git a/file_picker/example/ios/Runner/Runner-Bridging-Header.h b/example/ios/Runner/Runner-Bridging-Header.h similarity index 100% rename from file_picker/example/ios/Runner/Runner-Bridging-Header.h rename to example/ios/Runner/Runner-Bridging-Header.h diff --git a/file_picker/example/ios/Runner/main.m b/example/ios/Runner/main.m similarity index 100% rename from file_picker/example/ios/Runner/main.m rename to example/ios/Runner/main.m diff --git a/file_picker/example/lib/generated_plugin_registrant.dart b/example/lib/generated_plugin_registrant.dart similarity index 100% rename from file_picker/example/lib/generated_plugin_registrant.dart rename to example/lib/generated_plugin_registrant.dart diff --git a/file_picker/example/lib/main.dart b/example/lib/main.dart similarity index 100% rename from file_picker/example/lib/main.dart rename to example/lib/main.dart diff --git a/file_picker/example/lib/main_desktop.dart b/example/lib/main_desktop.dart similarity index 100% rename from file_picker/example/lib/main_desktop.dart rename to example/lib/main_desktop.dart diff --git a/file_picker/example/lib/src/file_picker_demo.dart b/example/lib/src/file_picker_demo.dart similarity index 100% rename from file_picker/example/lib/src/file_picker_demo.dart rename to example/lib/src/file_picker_demo.dart diff --git a/file_picker/example/pubspec.yaml b/example/pubspec.yaml similarity index 100% rename from file_picker/example/pubspec.yaml rename to example/pubspec.yaml diff --git a/file_picker/example/web/favicon.png b/example/web/favicon.png similarity index 100% rename from file_picker/example/web/favicon.png rename to example/web/favicon.png diff --git a/file_picker/example/web/icons/Icon-192.png b/example/web/icons/Icon-192.png similarity index 100% rename from file_picker/example/web/icons/Icon-192.png rename to example/web/icons/Icon-192.png diff --git a/file_picker/example/web/icons/Icon-512.png b/example/web/icons/Icon-512.png similarity index 100% rename from file_picker/example/web/icons/Icon-512.png rename to example/web/icons/Icon-512.png diff --git a/file_picker/example/web/index.html b/example/web/index.html similarity index 100% rename from file_picker/example/web/index.html rename to example/web/index.html diff --git a/file_picker/example/web/manifest.json b/example/web/manifest.json similarity index 100% rename from file_picker/example/web/manifest.json rename to example/web/manifest.json diff --git a/file_picker_platform_interface/CHANGELOG.md b/file_picker_platform_interface/CHANGELOG.md deleted file mode 100644 index 978f2d6..0000000 --- a/file_picker_platform_interface/CHANGELOG.md +++ /dev/null @@ -1,39 +0,0 @@ -## [2.0.0] - Deprecates interface - -Deprecates interface in favor of standalone [file_picker](https://pub.dev/packages/file_picker) for all platforms. - -## [1.3.1] - Rollback `allowCompression` - -Removes `allowCompression` from interface as it should only be used from `file_picker` (Android & iOS). - -## [1.3.0] - Adds `allowCompression` parameter - -Adds `allowCompression` that will allow developers to set whether the picked media files (image/video) can be automatically compressed by OS or not. Defaults to `true`. - -## [1.2.0] - Adds FilePickerStatus - -Adds `onFiledLoading` that will provide an event handler with `FilePickerStatus` when picking files. - -## [1.1.0] - Adds directory pick - -Implements `getDirectoryPath()` - -## [1.0.0] - Updates method channel - -Implements `getFiles()` - -## [0.0.3] - Updates interface - -Removes `getFilePath()` - -## [0.0.2] - Updates interface - -Updates methods from File Picker interface - -## [0.0.1+1] - Update README - -Updates README - -## [0.0.1] - Create Platform Interface - -Added Filer Picker platform interface. diff --git a/file_picker_platform_interface/LICENSE b/file_picker_platform_interface/LICENSE deleted file mode 100644 index 6ceb585..0000000 --- a/file_picker_platform_interface/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Miguel Ruivo - -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 NON INFRINGEMENT. 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. \ No newline at end of file diff --git a/file_picker_platform_interface/README.md b/file_picker_platform_interface/README.md deleted file mode 100644 index 68d2f37..0000000 --- a/file_picker_platform_interface/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# MUST READ! - -The interface is deprectated in favor of standalone [file_picker](https://pub.dev/packages/file_picker) for all platforms where an interface is integrated. This should be the one used as this package is not longer mantained. - -# file_picker_platform_interface - -A common platform interface for the [`file_picker`][1] plugin. - -This interface allows platform-specific implementations of the `file_picker` -plugin, as well as the plugin itself, to ensure they are supporting the -same interface. - - -# Usage - -To implement a new platform-specific implementation of `file_picker`, extend -[`FilePickerPlatform`][2] with an implementation that performs the -platform-specific behavior, and when you register your plugin, set the default -`FilePickerPlatform` by calling -`FilePickerPlatform.instance = MyPlatformFilePicker()`. - -# Note on breaking changes - -Strongly prefer non-breaking changes (such as adding a method to the interface) -over breaking changes for this package. - -See https://flutter.dev/go/platform-interface-breaking-changes for a discussion -on why a less-clean interface is preferable to a breaking change. - -[1]: ../file_picker -[2]: lib/file_picker_platform_interface.dart diff --git a/file_picker_platform_interface/lib/file_picker_platform_interface.dart b/file_picker_platform_interface/lib/file_picker_platform_interface.dart deleted file mode 100644 index 0ae6e27..0000000 --- a/file_picker_platform_interface/lib/file_picker_platform_interface.dart +++ /dev/null @@ -1,77 +0,0 @@ -import 'package:plugin_platform_interface/plugin_platform_interface.dart'; - -import 'method_channel_file_picker.dart'; - -enum FileType { - any, - media, - image, - video, - audio, - custom, -} - -enum FilePickerStatus { - picking, - done, -} - -/// The interface that implementations of file_picker must implement. -/// -/// Platform implementations should extend this class rather than implement it as `file_picker` -/// does not consider newly added methods to be breaking changes. Extending this class -/// (using `extends`) ensures that the subclass will get the default implementation, while -/// platform implementations that `implements` this interface will be broken by newly added -/// [FilePickerPlatform] methods. -abstract class FilePickerPlatform extends PlatformInterface { - /// Constructs a UrlLauncherPlatform. - FilePickerPlatform() : super(token: _token); - - static final Object _token = Object(); - - static FilePickerPlatform _instance = MethodChannelFilePicker(); - - static FilePickerPlatform get instance => _instance; - - static set instance(FilePickerPlatform instance) { - PlatformInterface.verifyToken(instance, _token); - _instance = instance; - } - - /// Retrieves the file(s) from the underlying platform - /// - /// Default [type] set to `FileType.any` with [allowMultiple] set to `false` - /// Optionally, [allowedExtensions] might be provided (e.g. [`pdf`, `svg`, `jpg`].). - /// - /// If you want to track picking status, for example, because some files may take some time to be - /// cached (particularly those picked from cloud providers), you may want to set [onFileLoading] handler - /// that will give you the current status of picking. - /// - /// Allows `dynamic` return as files may be resolved to different types, based - /// on each platform implementation. For example, when using _dart:html_ with Flutter Web - /// or _dart:io_ with Flutter, different `File` instances could be used. - Future getFiles({ - FileType type = FileType.any, - List allowedExtensions, - bool allowMultiple = false, - Function(FilePickerStatus) onFileLoading, - }) async => - throw UnimplementedError('getFiles() has not been implemented.'); - - /// Asks the underlying platform to remove any temporary files created by this plugin. - /// - /// This typically relates to cached files that are stored in the cache directory of - /// each platform and it isn't required to invoke this as the system should take care - /// of it whenever needed. However, this will force the cleanup if you want to manage those on your own. - /// - /// Returns `true` if the files were removed with success, `false` otherwise. - Future clearTemporaryFiles() async => throw UnimplementedError( - 'clearTemporaryFiles() has not been implemented.'); - - /// Selects a directory and returns its absolute path. - /// - /// On Android, this requires to be running on SDK 21 or above, else won't work. - /// Returns `null` if folder path couldn't be resolved. - Future getDirectoryPath() async => - throw UnimplementedError('getDirectoryPath() has not been implemented.'); -} diff --git a/file_picker_platform_interface/lib/method_channel_file_picker.dart b/file_picker_platform_interface/lib/method_channel_file_picker.dart deleted file mode 100644 index be0e271..0000000 --- a/file_picker_platform_interface/lib/method_channel_file_picker.dart +++ /dev/null @@ -1,91 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/foundation.dart'; -import 'package:flutter/services.dart'; - -import 'file_picker_platform_interface.dart'; - -const MethodChannel _channel = - MethodChannel('miguelruivo.flutter.plugins.filepicker'); -const EventChannel _eventChannel = - EventChannel('miguelruivo.flutter.plugins.filepickerevent'); - -/// An implementation of [FilePickerPlatform] that uses method channels. -class MethodChannelFilePicker extends FilePickerPlatform { - static const String _tag = 'MethodChannelFilePicker'; - static StreamSubscription _eventSubscription; - - @override - Future getFiles({ - FileType type = FileType.any, - List allowedExtensions, - bool allowMultiple = false, - bool allowCompression = true, - Function(FilePickerStatus) onFileLoading, - }) => - _getPath(type, allowMultiple, allowCompression, allowedExtensions, - onFileLoading); - - @override - Future clearTemporaryFiles() async => - _channel.invokeMethod('clear'); - - @override - Future getDirectoryPath() async { - try { - return await _channel.invokeMethod('dir', {}); - } on PlatformException catch (ex) { - if (ex.code == "unknown_path") { - print( - '[$_tag] Could not resolve directory path. Maybe it\'s a protected one or unsupported (such as Downloads folder). If you are on Android, make sure that you are on SDK 21 or above.'); - } - return null; - } - } - - Future _getPath( - FileType fileType, - bool allowMultipleSelection, - bool allowCompression, - List allowedExtensions, - Function(FilePickerStatus) onFileLoading, - ) async { - final String type = describeEnum(fileType); - if (type != 'custom' && (allowedExtensions?.isNotEmpty ?? false)) { - throw Exception( - 'If you are using a custom extension filter, please use the FileType.custom instead.'); - } - try { - _eventSubscription?.cancel(); - if (onFileLoading != null) { - _eventSubscription = _eventChannel.receiveBroadcastStream().listen( - (data) => onFileLoading((data as bool) - ? FilePickerStatus.picking - : FilePickerStatus.done), - onError: (error) => throw Exception(error), - ); - } - - dynamic result = await _channel.invokeMethod(type, { - 'allowMultipleSelection': allowMultipleSelection, - 'allowedExtensions': allowedExtensions, - 'allowCompression': allowCompression, - }); - if (result != null && allowMultipleSelection) { - if (result is String) { - result = [result]; - } - return Map.fromIterable(result, - key: (path) => path.split('/').last, value: (path) => path); - } - return result; - } on PlatformException catch (e) { - print('[$_tag] Platform exception: $e'); - rethrow; - } catch (e) { - print( - '[$_tag] Unsupported operation. Method not found. The exception thrown was: $e'); - rethrow; - } - } -} diff --git a/file_picker_platform_interface/pubspec.yaml b/file_picker_platform_interface/pubspec.yaml deleted file mode 100644 index ccf6174..0000000 --- a/file_picker_platform_interface/pubspec.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: file_picker_platform_interface -description: A common platform interface for the file_picker plugin that must be used to share commom features -homepage: https://github.com/miguelpruivo/plugins_flutter_file_picker/file_picker_platform_interface -version: 2.0.0 - -environment: - sdk: ">=2.1.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - plugin_platform_interface: ^1.0.1 - -dev_dependencies: - flutter_test: - sdk: flutter diff --git a/file_picker_web/CHANGELOG.md b/file_picker_web/CHANGELOG.md deleted file mode 100644 index ea47c14..0000000 --- a/file_picker_web/CHANGELOG.md +++ /dev/null @@ -1,35 +0,0 @@ -## 2.0.0 - -Deprecates plugin in favor of standalone [file_picker](https://pub.dev/packages/file_picker) for all platforms. - -## 1.0.2+1 - -Fix custom filter String creation. - -## 1.0.2 - -Addresses an issue that would cause dot being required on filters for web (#343) - -## 1.0.1+2 - -Bumps file_picker_interface dependency version. - -## 1.0.1+1 - -Updates homepage & description. - -## 1.0.1 - -Updates API to support `onFileLoading` from FilePickerInterface. - -## 1.0.0 - -Adds public API documentation and updates file_picker_platform_interface dependency. - -## 0.0.2 - -Added no-op iOS podspec to prevent build issues on iOS. - -## 0.0.1 - -Creation of File Picker Web project draft (not yet usable) diff --git a/file_picker_web/LICENSE b/file_picker_web/LICENSE deleted file mode 100644 index 6ab60fa..0000000 --- a/file_picker_web/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2020 Miguel Ruivo - -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 NON INFRINGEMENT. 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. diff --git a/file_picker_web/README.md b/file_picker_web/README.md deleted file mode 100644 index 30cd96e..0000000 --- a/file_picker_web/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# MUST READ! - -The web standalone plugin is deprectated in favor of standalone [file_picker](https://pub.dev/packages/file_picker) for all platforms. This should be the one used as this package is not longer mantained. - -# file_picker_web - -The web implementation of [`file_picker`][1]. - -## Usage - -### Import the package -To use this plugin in your Flutter Web app, simply add it as a dependency in -your pubspec alongside the base `file_picker` plugin. - -_(This is only temporary: in the future we hope to make this package an -"endorsed" implementation of `file_picker`, so that it is automatically -included in your Flutter Web app when you depend on `package:file_picker`.)_ - -This is what the above means to your `pubspec.yaml`: - -```yaml -... -dependencies: - ... - file_picker_web: ^1.0.0 - ... -``` - -### Use the plugin -Once you have the `file_picker_web` dependency in your pubspec, you should -be able to use `package:file_picker` as normal. - -[1]: ../file_picker diff --git a/file_picker_web/example/.gitignore b/file_picker_web/example/.gitignore deleted file mode 100644 index 1ba9c33..0000000 --- a/file_picker_web/example/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.buildlog/ -.history -.svn/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -.dart_tool/ -.flutter-plugins -.flutter-plugins-dependencies -.packages -.pub-cache/ -.pub/ -/build/ - -# Web related -lib/generated_plugin_registrant.dart - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Exceptions to above rules. -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages diff --git a/file_picker_web/example/.metadata b/file_picker_web/example/.metadata deleted file mode 100644 index bb25afd..0000000 --- a/file_picker_web/example/.metadata +++ /dev/null @@ -1,10 +0,0 @@ -# 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: e6b34c2b5c96bb95325269a29a84e83ed8909b5f - channel: beta - -project_type: app diff --git a/file_picker_web/example/README.md b/file_picker_web/example/README.md deleted file mode 100644 index bce5708..0000000 --- a/file_picker_web/example/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# file_picker_web_example - -Demonstrates how to use the file_picker_web plugin. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) - -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/file_picker_web/example/lib/main.dart b/file_picker_web/example/lib/main.dart deleted file mode 100644 index 279b607..0000000 --- a/file_picker_web/example/lib/main.dart +++ /dev/null @@ -1,65 +0,0 @@ -// ignore: avoid_web_libraries_in_flutter -import 'dart:html'; -import 'package:file_picker_web/file_picker_web.dart'; -import 'package:flutter/material.dart'; - -void main() { - runApp(MyApp()); -} - -class MyApp extends StatefulWidget { - @override - _MyAppState createState() => _MyAppState(); -} - -class _MyAppState extends State { - List _files = []; - - void _pickFiles() async { - _files = await FilePicker.getMultiFile() ?? []; - setState(() {}); - } - - @override - Widget build(BuildContext context) { - return MaterialApp( - home: Scaffold( - appBar: AppBar( - title: const Text('Plugin example app'), - ), - body: Center( - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - Expanded( - child: _files.isNotEmpty - ? ListView.separated( - itemBuilder: (BuildContext context, int index) => - Text(_files[index].name), - itemCount: _files.length, - separatorBuilder: (_, __) => const Divider( - thickness: 5.0, - ), - ) - : Center( - child: Text( - 'Pick some files', - textAlign: TextAlign.center, - ), - ), - ), - Padding( - padding: const EdgeInsets.all(15.0), - child: RaisedButton( - onPressed: _pickFiles, - child: Text('Pick Files'), - ), - ) - ], - ), - ), - ), - ); - } -} diff --git a/file_picker_web/example/pubspec.yaml b/file_picker_web/example/pubspec.yaml deleted file mode 100644 index dc463fb..0000000 --- a/file_picker_web/example/pubspec.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: file_picker_web_example -description: Demonstrates how to use the file_picker_web plugin. - -# The following line prevents the package from being accidentally published to -# pub.dev using `pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -environment: - sdk: ">=2.7.0 <3.0.0" - -dependencies: - flutter: - sdk: flutter - - file_picker_web: - path: ../ - - cupertino_icons: ^0.1.3 - -dev_dependencies: - flutter_test: - sdk: flutter - - -flutter: - - uses-material-design: true diff --git a/file_picker_web/example/web/favicon.png b/file_picker_web/example/web/favicon.png deleted file mode 100644 index 8aaa46a..0000000 Binary files a/file_picker_web/example/web/favicon.png and /dev/null differ diff --git a/file_picker_web/example/web/icons/Icon-192.png b/file_picker_web/example/web/icons/Icon-192.png deleted file mode 100644 index b749bfe..0000000 Binary files a/file_picker_web/example/web/icons/Icon-192.png and /dev/null differ diff --git a/file_picker_web/example/web/icons/Icon-512.png b/file_picker_web/example/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48..0000000 Binary files a/file_picker_web/example/web/icons/Icon-512.png and /dev/null differ diff --git a/file_picker_web/example/web/index.html b/file_picker_web/example/web/index.html deleted file mode 100644 index c1b8f5a..0000000 --- a/file_picker_web/example/web/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - file_picker_web_example - - - - - - - - diff --git a/file_picker_web/example/web/manifest.json b/file_picker_web/example/web/manifest.json deleted file mode 100644 index 3f21237..0000000 --- a/file_picker_web/example/web/manifest.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "file_picker_web_example", - "short_name": "file_picker_web_example", - "start_url": ".", - "display": "minimal-ui", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "Demonstrates how to use the file_picker_web plugin.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - } - ] -} diff --git a/file_picker_web/ios/file_picker_web.podspec b/file_picker_web/ios/file_picker_web.podspec deleted file mode 100644 index 5e4bb8c..0000000 --- a/file_picker_web/ios/file_picker_web.podspec +++ /dev/null @@ -1,20 +0,0 @@ -# -# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html -# -Pod::Spec.new do |s| - s.name = 'file_picker_web' - s.version = '0.0.1' - s.summary = 'No-op implementation of file_picker_web web plugin to avoid build issues on iOS' - s.description = <<-DESC - temp fake video_player_web plugin - DESC - s.homepage = 'https://github.com/miguelpruivo/plugins_flutter_file_picker/file_picker_web' - s.license = { :file => '../LICENSE' } - s.author = { 'Miguel Ruivo' => 'miguel@miguelruivo.com' } - s.source = { :path => '.' } - s.source_files = 'Classes/**/*' - s.public_header_files = 'Classes/**/*.h' - s.dependency 'Flutter' - - s.ios.deployment_target = '8.0' - end \ No newline at end of file diff --git a/file_picker_web/lib/file_picker_web.dart b/file_picker_web/lib/file_picker_web.dart deleted file mode 100644 index 30bebe3..0000000 --- a/file_picker_web/lib/file_picker_web.dart +++ /dev/null @@ -1,79 +0,0 @@ -import 'dart:async'; - -import 'package:file_picker_platform_interface/file_picker_platform_interface.dart'; -import 'package:flutter_web_plugins/flutter_web_plugins.dart'; -import 'dart:html' as html; - -class FilePicker extends FilePickerPlatform { - FilePicker._(); - static final FilePicker _instance = FilePicker._(); - - static void registerWith(Registrar registrar) { - FilePickerPlatform.instance = _instance; - } - - /// Opens browser file picker window to select multiple files. - /// [type] defaults to `FileType.any` which allows all file types to be picked. Optionally, - /// [allowedExtensions] can be used (eg. `[.jpg, .pdf]`) to restrict picking types - /// - /// Returns a `List` - static Future> getMultiFile( - {FileType type = FileType.any, List allowedExtensions}) async { - return await _instance.getFiles( - type: type, allowMultiple: true, allowedExtensions: allowedExtensions); - } - - /// Opens browser file picker window to select a single file. - /// [type] defaults to `FileType.any` which allows all file types to be picked. Optionally, - /// [allowedExtensions] can be used (eg. `[.jpg, .pdf]`) to restrict picking types - /// - /// Returns a `html.File` - static Future getFile( - {FileType type = FileType.any, List allowedExtensions}) async { - return (await _instance.getFiles( - type: type, allowedExtensions: allowedExtensions)) - .first; - } - - @override - Future getFiles({ - FileType type = FileType.any, - List allowedExtensions, - bool allowMultiple = false, - Function(FilePickerStatus) onFileLoading, - }) async { - final Completer> pickedFiles = Completer>(); - html.InputElement uploadInput = html.FileUploadInputElement(); - uploadInput.multiple = allowMultiple; - uploadInput.accept = _fileType(type, allowedExtensions); - uploadInput.onChange - .listen((event) => pickedFiles.complete(uploadInput.files)); - uploadInput.click(); - return await pickedFiles.future; - } - - static String _fileType(FileType type, List allowedExtensions) { - switch (type) { - case FileType.any: - return ''; - - case FileType.audio: - return 'audio/*'; - - case FileType.image: - return 'image/*'; - - case FileType.video: - return 'video/*'; - - case FileType.media: - return 'video/*|image/*'; - - case FileType.custom: - return allowedExtensions.fold( - '', (prev, next) => '${prev.isEmpty ? '' : '$prev,'} .$next'); - break; - } - return ''; - } -} diff --git a/file_picker_web/pubspec.yaml b/file_picker_web/pubspec.yaml deleted file mode 100644 index 9001480..0000000 --- a/file_picker_web/pubspec.yaml +++ /dev/null @@ -1,27 +0,0 @@ -name: file_picker_web -description: Web platform implementation of file_picker. Provides a way to pick files with filter support for Web. -homepage: https://github.com/miguelpruivo/flutter_file_picker/tree/master/file_picker_web -version: 2.0.0 - -environment: - sdk: ">=2.7.0 <3.0.0" - flutter: ">=1.10.0" - -dependencies: - file_picker_platform_interface: ^2.0.0 - flutter: - sdk: flutter - flutter_web_plugins: - sdk: flutter - -dev_dependencies: - flutter_test: - sdk: flutter - - -flutter: - plugin: - platforms: - web: - pluginClass: FilePicker - fileName: file_picker_web.dart diff --git a/file_picker/go/README.md b/go/README.md similarity index 100% rename from file_picker/go/README.md rename to go/README.md diff --git a/file_picker/go/file_darwin.go b/go/file_darwin.go similarity index 100% rename from file_picker/go/file_darwin.go rename to go/file_darwin.go diff --git a/file_picker/go/file_linux.go b/go/file_linux.go similarity index 100% rename from file_picker/go/file_linux.go rename to go/file_linux.go diff --git a/file_picker/go/file_unsupported.go b/go/file_unsupported.go similarity index 100% rename from file_picker/go/file_unsupported.go rename to go/file_unsupported.go diff --git a/file_picker/go/file_windows.go b/go/file_windows.go similarity index 100% rename from file_picker/go/file_windows.go rename to go/file_windows.go diff --git a/file_picker/go/go.mod b/go/go.mod similarity index 100% rename from file_picker/go/go.mod rename to go/go.mod diff --git a/file_picker/go/go.sum b/go/go.sum similarity index 100% rename from file_picker/go/go.sum rename to go/go.sum diff --git a/file_picker/go/import.go.tmpl b/go/import.go.tmpl similarity index 100% rename from file_picker/go/import.go.tmpl rename to go/import.go.tmpl diff --git a/file_picker/go/plugin.go b/go/plugin.go similarity index 100% rename from file_picker/go/plugin.go rename to go/plugin.go diff --git a/file_picker/ios/.gitignore b/ios/.gitignore similarity index 100% rename from file_picker/ios/.gitignore rename to ios/.gitignore diff --git a/file_picker/ios/Assets/.gitkeep b/ios/Assets/.gitkeep similarity index 100% rename from file_picker/ios/Assets/.gitkeep rename to ios/Assets/.gitkeep diff --git a/file_picker/ios/Classes/FileInfo.h b/ios/Classes/FileInfo.h similarity index 100% rename from file_picker/ios/Classes/FileInfo.h rename to ios/Classes/FileInfo.h diff --git a/file_picker/ios/Classes/FileInfo.m b/ios/Classes/FileInfo.m similarity index 100% rename from file_picker/ios/Classes/FileInfo.m rename to ios/Classes/FileInfo.m diff --git a/file_picker/ios/Classes/FilePickerPlugin.h b/ios/Classes/FilePickerPlugin.h similarity index 100% rename from file_picker/ios/Classes/FilePickerPlugin.h rename to ios/Classes/FilePickerPlugin.h diff --git a/file_picker/ios/Classes/FilePickerPlugin.m b/ios/Classes/FilePickerPlugin.m similarity index 100% rename from file_picker/ios/Classes/FilePickerPlugin.m rename to ios/Classes/FilePickerPlugin.m diff --git a/file_picker/ios/Classes/FileUtils.h b/ios/Classes/FileUtils.h similarity index 100% rename from file_picker/ios/Classes/FileUtils.h rename to ios/Classes/FileUtils.h diff --git a/file_picker/ios/Classes/FileUtils.m b/ios/Classes/FileUtils.m similarity index 100% rename from file_picker/ios/Classes/FileUtils.m rename to ios/Classes/FileUtils.m diff --git a/file_picker/ios/Classes/ImageUtils.h b/ios/Classes/ImageUtils.h similarity index 100% rename from file_picker/ios/Classes/ImageUtils.h rename to ios/Classes/ImageUtils.h diff --git a/file_picker/ios/Classes/ImageUtils.m b/ios/Classes/ImageUtils.m similarity index 100% rename from file_picker/ios/Classes/ImageUtils.m rename to ios/Classes/ImageUtils.m diff --git a/file_picker/ios/file_picker.podspec b/ios/file_picker.podspec similarity index 100% rename from file_picker/ios/file_picker.podspec rename to ios/file_picker.podspec diff --git a/file_picker/lib/file_picker.dart b/lib/file_picker.dart similarity index 100% rename from file_picker/lib/file_picker.dart rename to lib/file_picker.dart diff --git a/file_picker/lib/src/file_picker.dart b/lib/src/file_picker.dart similarity index 100% rename from file_picker/lib/src/file_picker.dart rename to lib/src/file_picker.dart diff --git a/file_picker/lib/src/file_picker_io.dart b/lib/src/file_picker_io.dart similarity index 100% rename from file_picker/lib/src/file_picker_io.dart rename to lib/src/file_picker_io.dart diff --git a/file_picker/lib/src/file_picker_result.dart b/lib/src/file_picker_result.dart similarity index 100% rename from file_picker/lib/src/file_picker_result.dart rename to lib/src/file_picker_result.dart diff --git a/file_picker/lib/src/file_picker_web.dart b/lib/src/file_picker_web.dart similarity index 100% rename from file_picker/lib/src/file_picker_web.dart rename to lib/src/file_picker_web.dart diff --git a/file_picker/lib/src/platform_file.dart b/lib/src/platform_file.dart similarity index 100% rename from file_picker/lib/src/platform_file.dart rename to lib/src/platform_file.dart diff --git a/file_picker/pubspec.yaml b/pubspec.yaml similarity index 100% rename from file_picker/pubspec.yaml rename to pubspec.yaml