diff --git a/.github/workflows/dart-analyzer.yml b/.github/workflows/dart-analyzer.yml
index 22f61062..fc3b4e49 100644
--- a/.github/workflows/dart-analyzer.yml
+++ b/.github/workflows/dart-analyzer.yml
@@ -15,19 +15,36 @@ jobs:
analyze:
runs-on: ubuntu-latest
timeout-minutes: 5
+ env:
+ melos-version: 3.0.1
steps:
+ # Setup
- uses: actions/checkout@v2
- - uses: dart-lang/setup-dart@v1
+
+ # Setup flutter
+ - uses: subosito/flutter-action@v2
with:
- sdk: "2.18.0"
- - name: Install dependencies
- run: dart pub get
- - name: "Install flutter"
- run: ./.github/workflows/scripts/install-flutter.sh
+ channel: "stable"
+
+ # Install dependencies
+ - name: "Install dependencies"
+ run: flutter pub get
+
+ # Install tools
- name: "Install tools"
- run: ./.github/workflows/scripts/install-tools.sh
+ run: |
+ flutter config --no-analytics
+ flutter pub global activate melos ${{env.melos-version}}
+
+ # Melos bootstrap
- name: "Bootstrap workspace (Melos)"
run: melos bootstrap
+
+ # Run dart format to ensure formatting is valid
+ - name: "Run dart format"
+ run: melos exec dart format . --fix
+
+ # Run dart analyzer
- name: "Run Dart Analyze"
uses: invertase/github-action-dart-analyzer@v1
with:
diff --git a/.github/workflows/scripts/install-flutter.sh b/.github/workflows/scripts/install-flutter.sh
deleted file mode 100755
index c67182f7..00000000
--- a/.github/workflows/scripts/install-flutter.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-
-git clone https://github.com/flutter/flutter.git --depth 1 -b stable _flutter
-echo "$GITHUB_WORKSPACE/_flutter/bin" >> $GITHUB_PATH
\ No newline at end of file
diff --git a/.github/workflows/scripts/install-tools.sh b/.github/workflows/scripts/install-tools.sh
deleted file mode 100755
index deaff034..00000000
--- a/.github/workflows/scripts/install-tools.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-set -e
-
-flutter config --no-analytics
-flutter pub global activate melos 3.0.1
-echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH
-echo "$HOME/AppData/Local/Pub/Cache/bin" >> $GITHUB_PATH
-echo "$GITHUB_WORKSPACE/_flutter/.pub-cache/bin" >> $GITHUB_PATH
-echo "$GITHUB_WORKSPACE/_flutter/bin/cache/dart-sdk/bin" >> $GITHUB_PATH
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 387e4ab6..a102a789 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,8 @@
# on_audio_query
on_audio_query/example/assets/
+.fuse*
+
.DS_Store
.dart_tool/
diff --git a/LICENSE b/LICENSE
new file mode 120000
index 00000000..b9b83014
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1 @@
+packages/on_audio_query/LICENSE
\ No newline at end of file
diff --git a/melos.yaml b/melos.yaml
index 53f850fa..61640ab0 100644
--- a/melos.yaml
+++ b/melos.yaml
@@ -3,6 +3,7 @@ repository: https://github.com/LucJosin/on_audio_query
packages:
- packages/*
+ - packages/*/example
command:
bootstrap:
@@ -15,9 +16,11 @@ scripts:
reset:
run: melos clean && melos bootstrap
description: Useful to give your workspace a 'fresh start'
+
analyze:
exec: flutter analyze --no-fatal-infos
description: Analyze code
+
format:
run: melos exec dart format . --fix
description: Run `dart format` for all packages.
diff --git a/packages/on_audio_query/CHANGELOG.md b/packages/on_audio_query/CHANGELOG.md
index 19d50910..d401132c 100644
--- a/packages/on_audio_query/CHANGELOG.md
+++ b/packages/on_audio_query/CHANGELOG.md
@@ -1,4 +1,22 @@
-## [[2.7.0](https://github.com/LucJosin/on_audio_query/releases/tag/2.7.0)] - [29.03.2023]
+## [[2.8.0](https://github.com/LucJosin/on_audio_query/releases/tag/2.8.0)]
+
+### Features
+
+- **Added** `showDetailedLog`.
+
+### Changes
+
+- **Moved** `android` and `ios` into separated folders.
+- **Replaced** `/details` with `/src`.
+
+### ⚠ Important Changes
+
+#### Android
+
+- **Updated** kotlin version from `1.4.32` to `1.6.10`. - [#110](https://github.com/LucJosin/on_audio_query/issues/110)
+- **Updated** kotlin coroutines version from `1.5.2-native-mt` to `1.6.4`.
+
+## [[2.7.0](https://github.com/LucJosin/on_audio_query/releases/tag/2.7.0)] - [03.29.2023]
### Features
diff --git a/packages/on_audio_query/README.md b/packages/on_audio_query/README.md
index a98e8dee..1344645c 100644
--- a/packages/on_audio_query/README.md
+++ b/packages/on_audio_query/README.md
@@ -40,6 +40,7 @@
| `removeFromPlaylist` | `✔️` | `❌` | `❌` |
| `renamePlaylist` | `✔️` | `❌` | `❌` |
| `moveItemTo` | `✔️` | `❌` | `❌` |
+| `checkAndRequest` | `✔️` | `✔️` | `❌` |
| `permissionsRequest` | `✔️` | `✔️` | `❌` |
| `permissionsStatus` | `✔️` | `✔️` | `❌` |
| `queryDeviceInfo` | `✔️` | `✔️` | `✔️` |
@@ -55,7 +56,7 @@
Add the following code to your `pubspec.yaml`:
```yaml
dependencies:
- on_audio_query: ^2.7.0
+ on_audio_query: ^2.8.0
```
### Request Permission:
@@ -81,12 +82,10 @@ To use this plugin add the following code to your [AndroidManifest.xml](https://
To use this plugin add the following code to your [Info.plist](https://github.com/LucJosin/on_audio_query/blob/main/on_audio_query/example/ios/Runner/Info.plist)
```plist
- ...
NSAppleMusicUsageDescription
$(PROJECT_NAME) requires access to media library
- ...
```
diff --git a/packages/on_audio_query/example/ios/Flutter/AppFrameworkInfo.plist b/packages/on_audio_query/example/ios/Flutter/AppFrameworkInfo.plist
index 8d4492f9..9625e105 100644
--- a/packages/on_audio_query/example/ios/Flutter/AppFrameworkInfo.plist
+++ b/packages/on_audio_query/example/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 9.0
+ 11.0
diff --git a/packages/on_audio_query/example/ios/Runner.xcodeproj/project.pbxproj b/packages/on_audio_query/example/ios/Runner.xcodeproj/project.pbxproj
index 1af3b4bc..c5d9fb5e 100644
--- a/packages/on_audio_query/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/packages/on_audio_query/example/ios/Runner.xcodeproj/project.pbxproj
@@ -3,11 +3,11 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 51;
+ objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
- 0EB3A8CE8DFAA141583B59EA /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 34D03D2FF2E46D4B78A3FA34 /* Pods_Runner.framework */; };
+ 0454AA9BC1C6A74D29F0DC05 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89EDBAA686FD6A0F3044D3BE /* Pods_Runner.framework */; };
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
@@ -30,15 +30,16 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
+ 0E792F2A41600ECBFBB0ACDA /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
- 1E39639443800D34003F062F /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
- 34D03D2FF2E46D4B78A3FA34 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 3B7A1BC6F17ED8BDB08A32DE /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 76E158E1888B20842AFB70C7 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
- 7E98D618FE6E913AADBBD204 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; };
+ 89EDBAA686FD6A0F3044D3BE /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -46,7 +47,6 @@
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
- B9350E61AF8354398C8217DB /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -54,7 +54,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
- 0EB3A8CE8DFAA141583B59EA /* Pods_Runner.framework in Frameworks */,
+ 0454AA9BC1C6A74D29F0DC05 /* Pods_Runner.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -64,21 +64,13 @@
47B71ED6578BEB388DFE7ED6 /* Pods */ = {
isa = PBXGroup;
children = (
- 1E39639443800D34003F062F /* Pods-Runner.debug.xcconfig */,
- B9350E61AF8354398C8217DB /* Pods-Runner.release.xcconfig */,
- 7E98D618FE6E913AADBBD204 /* Pods-Runner.profile.xcconfig */,
+ 0E792F2A41600ECBFBB0ACDA /* Pods-Runner.debug.xcconfig */,
+ 3B7A1BC6F17ED8BDB08A32DE /* Pods-Runner.release.xcconfig */,
+ 76E158E1888B20842AFB70C7 /* Pods-Runner.profile.xcconfig */,
);
path = Pods;
sourceTree = "";
};
- 56D33CC56AEBAD90F426E722 /* Frameworks */ = {
- isa = PBXGroup;
- children = (
- 34D03D2FF2E46D4B78A3FA34 /* Pods_Runner.framework */,
- );
- name = Frameworks;
- sourceTree = "";
- };
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
@@ -97,7 +89,7 @@
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
47B71ED6578BEB388DFE7ED6 /* Pods */,
- 56D33CC56AEBAD90F426E722 /* Frameworks */,
+ F3BDBD7B8197D374D9E11050 /* Frameworks */,
);
sourceTree = "";
};
@@ -124,6 +116,14 @@
path = Runner;
sourceTree = "";
};
+ F3BDBD7B8197D374D9E11050 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 89EDBAA686FD6A0F3044D3BE /* Pods_Runner.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
@@ -131,14 +131,14 @@
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
- 86C1852AF066C3D12FA40736 /* [CP] Check Pods Manifest.lock */,
+ 9801508057E29DB85D6FE897 /* [CP] Check Pods Manifest.lock */,
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
- 9099D3364DFEDF1A637FD9DD /* [CP] Embed Pods Frameworks */,
+ 25DEC95C3A6807E8090BAA98 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -155,7 +155,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1020;
+ LastUpgradeCheck = 1300;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -197,72 +197,74 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
- 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ 25DEC95C3A6807E8090BAA98 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
- inputPaths = (
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
- name = "Thin Binary";
- outputPaths = (
+ name = "[CP] Embed Pods Frameworks";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
};
- 86C1852AF066C3D12FA40736 /* [CP] Check Pods Manifest.lock */ = {
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
- inputFileListPaths = (
- );
inputPaths = (
- "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
- "${PODS_ROOT}/Manifest.lock",
- );
- name = "[CP] Check Pods Manifest.lock";
- outputFileListPaths = (
);
+ name = "Thin Binary";
outputPaths = (
- "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
- showEnvVarsInLog = 0;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
- 9099D3364DFEDF1A637FD9DD /* [CP] Embed Pods Frameworks */ = {
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
- inputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+ inputPaths = (
);
- name = "[CP] Embed Pods Frameworks";
- outputFileListPaths = (
- "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+ name = "Run Script";
+ outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
- 9740EEB61CF901F6004384FC /* Run Script */ = {
+ 9801508057E29DB85D6FE897 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
+ inputFileListPaths = (
+ );
inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
);
- name = "Run Script";
outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
diff --git a/packages/on_audio_query/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/on_audio_query/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index a28140cf..3db53b6e 100644
--- a/packages/on_audio_query/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/packages/on_audio_query/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
UIViewControllerBasedStatusBarAppearance
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
diff --git a/packages/on_audio_query/lib/on_audio_query.dart b/packages/on_audio_query/lib/on_audio_query.dart
index 1e23f22a..e3b2f043 100644
--- a/packages/on_audio_query/lib/on_audio_query.dart
+++ b/packages/on_audio_query/lib/on_audio_query.dart
@@ -14,22 +14,19 @@ Copyright: © 2021, Lucas Josino. All rights reserved.
library on_audio_query;
-//
+// Dart
import 'dart:async';
-//Dart/Flutter
+// Flutter
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
-//Platform Interface
-import 'package:on_audio_query_platform_interface/details/on_audio_query_helper.dart';
+// Platform Interface
import 'package:on_audio_query_platform_interface/on_audio_query_platform_interface.dart';
+export 'package:on_audio_query_platform_interface/on_audio_query_platform_interface.dart';
-//
-export 'package:on_audio_query_platform_interface/details/on_audio_query_helper.dart';
+// Controllers
+part 'src/on_audio_query.dart';
-//Controller
-part 'details/on_audio_query_controller.dart';
-
-//Widget
+// Widgets
part 'widget/query_artwork_widget.dart';
diff --git a/packages/on_audio_query/lib/details/on_audio_query_controller.dart b/packages/on_audio_query/lib/src/on_audio_query.dart
similarity index 99%
rename from packages/on_audio_query/lib/details/on_audio_query_controller.dart
rename to packages/on_audio_query/lib/src/on_audio_query.dart
index fbef6742..4f47688c 100644
--- a/packages/on_audio_query/lib/details/on_audio_query_controller.dart
+++ b/packages/on_audio_query/lib/src/on_audio_query.dart
@@ -14,7 +14,7 @@ Copyright: © 2021, Lucas Josino. All rights reserved.
part of on_audio_query;
-///Interface and Main method for use on_audio_query
+/// Interface and Main method for use on_audio_query
class OnAudioQuery {
/// The platform interface that drives this plugin
static OnAudioQueryPlatform get platform => OnAudioQueryPlatform.instance;
diff --git a/packages/on_audio_query/pubspec.yaml b/packages/on_audio_query/pubspec.yaml
index b1c2e348..b172fbfd 100644
--- a/packages/on_audio_query/pubspec.yaml
+++ b/packages/on_audio_query/pubspec.yaml
@@ -1,6 +1,6 @@
name: on_audio_query
description: Flutter Plugin used to query audios/songs infos [title, artist, album, etc..] from device storage.
-version: 2.7.0
+version: 2.8.0
homepage: https://github.com/LucJosin/on_audio_query/tree/main/on_audio_query
issue_tracker: https://github.com/LucJosin/on_audio_query/issues
# pub.dev: https://pub.dev/packages/on_audio_query
@@ -15,8 +15,10 @@ environment:
dependencies:
# on_audio_query
- on_audio_query_platform_interface: ^1.5.0
- on_audio_query_web: ^1.4.0
+ on_audio_query_platform_interface: ^1.6.0
+ on_audio_query_web: ^1.5.0
+ on_audio_query_ios: ^1.0.0
+ on_audio_query_android: ^1.0.0
# Flutter
flutter:
@@ -35,9 +37,8 @@ flutter:
plugin:
platforms:
android:
- package: com.lucasjosino.on_audio_query
- pluginClass: OnAudioQueryPlugin
+ default_package: on_audio_query_android
ios:
- pluginClass: OnAudioQueryPlugin
+ default_package: on_audio_query_ios
web:
default_package: on_audio_query_web
diff --git a/packages/on_audio_query_android/.gitignore b/packages/on_audio_query_android/.gitignore
new file mode 100644
index 00000000..96486fd9
--- /dev/null
+++ b/packages/on_audio_query_android/.gitignore
@@ -0,0 +1,30 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# 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
+# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
+/pubspec.lock
+**/doc/api/
+.dart_tool/
+.packages
+build/
diff --git a/packages/on_audio_query_android/.metadata b/packages/on_audio_query_android/.metadata
new file mode 100644
index 00000000..e8aef22e
--- /dev/null
+++ b/packages/on_audio_query_android/.metadata
@@ -0,0 +1,30 @@
+# 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.
+
+version:
+ revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
+ channel: stable
+
+project_type: plugin
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
+ base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
+ - platform: android
+ create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
+ base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/packages/on_audio_query_android/CHANGELOG.md b/packages/on_audio_query_android/CHANGELOG.md
new file mode 100644
index 00000000..acc3ccf2
--- /dev/null
+++ b/packages/on_audio_query_android/CHANGELOG.md
@@ -0,0 +1,7 @@
+## 1.0.0
+
+- See more [on_audio_query - CHANGELOG](https://github.com/LucJosin/on_audio_query/blob/main/on_audio_query/CHANGELOG.md).
+
+## 1.0.0-prerelease.0 - [06.20.2022]
+
+- See more [on_audio_query - CHANGELOG](https://github.com/LucJosin/on_audio_query/blob/main/on_audio_query/CHANGELOG.md).
diff --git a/packages/on_audio_query_android/LICENSE b/packages/on_audio_query_android/LICENSE
new file mode 100644
index 00000000..29b78269
--- /dev/null
+++ b/packages/on_audio_query_android/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2022, Lucas Josino
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/packages/on_audio_query_android/README.md b/packages/on_audio_query_android/README.md
new file mode 100644
index 00000000..4dd5e72a
--- /dev/null
+++ b/packages/on_audio_query_android/README.md
@@ -0,0 +1,11 @@
+# on_audio_query_android
+
+The Android implementation of [`on_audio_query`][1].
+
+## Usage
+
+This package is [endorsed][2], which means you can simply use `on_audio_query`
+normally. This package will be automatically included in your app when you do.
+
+[1]: https://pub.dev/packages/on_audio_query
+[2]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin
diff --git a/packages/on_audio_query/android/.gitignore b/packages/on_audio_query_android/android/.gitignore
similarity index 100%
rename from packages/on_audio_query/android/.gitignore
rename to packages/on_audio_query_android/android/.gitignore
diff --git a/packages/on_audio_query/android/build.gradle b/packages/on_audio_query_android/android/build.gradle
similarity index 92%
rename from packages/on_audio_query/android/build.gradle
rename to packages/on_audio_query_android/android/build.gradle
index 0ae98c65..a539751e 100644
--- a/packages/on_audio_query/android/build.gradle
+++ b/packages/on_audio_query_android/android/build.gradle
@@ -2,7 +2,7 @@ group 'com.lucasjosino.on_audio_query'
version '1.0-SNAPSHOT'
buildscript {
- ext.kotlin_version = '1.4.32'
+ ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
@@ -37,7 +37,7 @@ android {
dependencies {
def lifecycle_version = "2.3.1"
- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.2-native-mt'
- implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2-native-mt'
+ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
+ implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
}
diff --git a/packages/on_audio_query/android/gradle.properties b/packages/on_audio_query_android/android/gradle.properties
similarity index 100%
rename from packages/on_audio_query/android/gradle.properties
rename to packages/on_audio_query_android/android/gradle.properties
diff --git a/packages/on_audio_query/android/gradle/wrapper/gradle-wrapper.properties b/packages/on_audio_query_android/android/gradle/wrapper/gradle-wrapper.properties
similarity index 100%
rename from packages/on_audio_query/android/gradle/wrapper/gradle-wrapper.properties
rename to packages/on_audio_query_android/android/gradle/wrapper/gradle-wrapper.properties
diff --git a/packages/on_audio_query/android/settings.gradle b/packages/on_audio_query_android/android/settings.gradle
similarity index 100%
rename from packages/on_audio_query/android/settings.gradle
rename to packages/on_audio_query_android/android/settings.gradle
diff --git a/packages/on_audio_query/android/src/main/AndroidManifest.xml b/packages/on_audio_query_android/android/src/main/AndroidManifest.xml
similarity index 100%
rename from packages/on_audio_query/android/src/main/AndroidManifest.xml
rename to packages/on_audio_query_android/android/src/main/AndroidManifest.xml
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/OnAudioQueryPlugin.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/OnAudioQueryPlugin.kt
similarity index 97%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/OnAudioQueryPlugin.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/OnAudioQueryPlugin.kt
index 93d4d755..c8eed408 100644
--- a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/OnAudioQueryPlugin.kt
+++ b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/OnAudioQueryPlugin.kt
@@ -115,7 +115,12 @@ class OnAudioQueryPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
// Logging
Method.SET_LOG_CONFIG -> {
+ // Log level
Log.setLogLevel(call.argument("level")!!)
+
+ // Define if 'warn' level will show more detailed logging.
+ PluginProvider.showDetailedLog = call.argument("showDetailedLog")!!
+
result.success(true)
}
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/PluginProvider.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/PluginProvider.kt
similarity index 94%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/PluginProvider.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/PluginProvider.kt
index f94a3049..3d5e8ad5 100644
--- a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/PluginProvider.kt
+++ b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/PluginProvider.kt
@@ -18,6 +18,13 @@ object PluginProvider {
private const val ERROR_MESSAGE =
"Tried to get one of the methods but the 'PluginProvider' has not initialized"
+ /**
+ * Define if 'warn' level will show more detailed logging.
+ *
+ * Will be used when a query produce some error.
+ */
+ var showDetailedLog: Boolean = false
+
private lateinit var context: WeakReference
private lateinit var activity: WeakReference
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/consts/Method.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/consts/Method.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/consts/Method.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/consts/Method.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/controllers/MethodController.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/controllers/MethodController.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/controllers/MethodController.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/controllers/MethodController.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/controllers/PermissionController.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/controllers/PermissionController.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/controllers/PermissionController.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/controllers/PermissionController.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/controllers/PlaylistController.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/controllers/PlaylistController.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/controllers/PlaylistController.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/controllers/PlaylistController.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/interfaces/PermissionManagerInterface.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/interfaces/PermissionManagerInterface.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/interfaces/PermissionManagerInterface.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/interfaces/PermissionManagerInterface.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AlbumQuery.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AlbumQuery.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AlbumQuery.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AlbumQuery.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AllPathQuery.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AllPathQuery.kt
similarity index 98%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AllPathQuery.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AllPathQuery.kt
index aa8c8e0f..fefe4565 100644
--- a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AllPathQuery.kt
+++ b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AllPathQuery.kt
@@ -33,7 +33,6 @@ class AllPathQuery {
// Ignore the '_data' deprecation because this plugin support older versions.
@SuppressLint("Range")
- @Suppress("DEPRECATION")
private fun loadAllPath(): ArrayList {
val cursor = resolver.query(URI, null, null, null, null)
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/ArtistQuery.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/ArtistQuery.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/ArtistQuery.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/ArtistQuery.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/ArtworkQuery.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/ArtworkQuery.kt
similarity index 87%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/ArtworkQuery.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/ArtworkQuery.kt
index dc157f16..1d9025a9 100644
--- a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/ArtworkQuery.kt
+++ b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/ArtworkQuery.kt
@@ -21,32 +21,32 @@ import kotlinx.coroutines.withContext
import java.io.ByteArrayOutputStream
import java.io.FileInputStream
-/** OnArtworksQuery */
class ArtworkQuery : ViewModel() {
companion object {
private const val TAG = "OnArtworksQuery"
}
- //Main parameters
private val helper = QueryHelper()
private var type: Int = -1
private var id: Number = 0
private var quality: Int = 100
private var size: Int = 200
+ private var showDetailedLog: Boolean = false
private lateinit var uri: Uri
private lateinit var resolver: ContentResolver
private lateinit var format: Bitmap.CompressFormat
/**
- * Method to "query" all albums.
+ * Method to "query" artwork.
*/
fun queryArtwork() {
val call = PluginProvider.call()
val result = PluginProvider.result()
val context = PluginProvider.context()
this.resolver = context.contentResolver
+ this.showDetailedLog = PluginProvider.showDetailedLog
id = call.argument("id")!!
@@ -70,6 +70,7 @@ class ArtworkQuery : ViewModel() {
// * 4 -> Genre.
uri = checkArtworkType(call.argument("type")!!)
+ // This query is 'universal' will work for multiple types (audio, album, artist, etc...).
type = call.argument("type")!!
Log.d(TAG, "Query config: ")
@@ -94,7 +95,6 @@ class ArtworkQuery : ViewModel() {
}
//Loading in Background
- @Suppress("BlockingMethodInNonBlockingContext")
private suspend fun loadArt(): ByteArray? = withContext(Dispatchers.IO) {
var artData: ByteArray? = null
@@ -123,7 +123,9 @@ class ArtworkQuery : ViewModel() {
val bitmap = resolver.loadThumbnail(query, Size(size, size), null)
artData = convertOrResize(bitmap = bitmap)!!
} catch (e: Exception) {
- Log.w(TAG, "($id) Message: $e")
+ // This may produce a lot of logging on console so, will required a explicit request
+ // to show the errors.
+ if (showDetailedLog) Log.w(TAG, "($id) Message: $e")
}
} else {
// If 'uri == Audio':
@@ -147,7 +149,9 @@ class ArtworkQuery : ViewModel() {
// 'close' can only be called using 'Android' >= 29/Q.
if (Build.VERSION.SDK_INT >= 29) metadata.close()
} catch (e: Exception) {
- Log.w(TAG, "($id) Message: $e")
+ // This may produce a lot of logging on console so, will required a explicit request
+ // to show the errors.
+ if (showDetailedLog) Log.w(TAG, "($id) Message: $e")
}
}
@@ -171,7 +175,9 @@ class ArtworkQuery : ViewModel() {
convertedBitmap.compress(format, quality, byteArrayBase)
}
} catch (e: Exception) {
- Log.w(TAG, "($id) Message: $e")
+ // This may produce a lot of logging on console so, will required a explicit request
+ // to show the errors.
+ if (showDetailedLog) Log.w(TAG, "($id) Message: $e")
}
convertedBytes = byteArrayBase.toByteArray()
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AudioFromQuery.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AudioFromQuery.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AudioFromQuery.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AudioFromQuery.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AudioQuery.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AudioQuery.kt
similarity index 99%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AudioQuery.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AudioQuery.kt
index ef218947..1ad07d58 100644
--- a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AudioQuery.kt
+++ b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/AudioQuery.kt
@@ -32,7 +32,6 @@ class AudioQuery : ViewModel() {
/**
* Method to "query" all songs.
*/
- @Suppress("DEPRECATION")
fun querySongs() {
val call = PluginProvider.call()
val result = PluginProvider.result()
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/GenreQuery.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/GenreQuery.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/GenreQuery.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/GenreQuery.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/PlaylistQuery.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/PlaylistQuery.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/PlaylistQuery.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/PlaylistQuery.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/WithFiltersQuery.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/WithFiltersQuery.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/WithFiltersQuery.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/WithFiltersQuery.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/helper/QueryHelper.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/helper/QueryHelper.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/helper/QueryHelper.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/queries/helper/QueryHelper.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/ArtworkType.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/ArtworkType.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/ArtworkType.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/ArtworkType.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/AudiosFromType.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/AudiosFromType.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/AudiosFromType.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/AudiosFromType.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/UriType.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/UriType.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/UriType.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/UriType.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/WithFiltersType.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/WithFiltersType.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/WithFiltersType.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/WithFiltersType.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/AlbumSortType.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/AlbumSortType.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/AlbumSortType.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/AlbumSortType.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/ArtistSortType.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/ArtistSortType.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/ArtistSortType.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/ArtistSortType.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/GenreSortType.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/GenreSortType.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/GenreSortType.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/GenreSortType.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/PlaylistSortType.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/PlaylistSortType.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/PlaylistSortType.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/PlaylistSortType.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/SongSortType.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/SongSortType.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/SongSortType.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/types/sorttypes/SongSortType.kt
diff --git a/packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/utils/CursorProjection.kt b/packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/utils/CursorProjection.kt
similarity index 100%
rename from packages/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/utils/CursorProjection.kt
rename to packages/on_audio_query_android/android/src/main/kotlin/com/lucasjosino/on_audio_query/utils/CursorProjection.kt
diff --git a/packages/on_audio_query_android/pubspec.yaml b/packages/on_audio_query_android/pubspec.yaml
new file mode 100644
index 00000000..d7726df4
--- /dev/null
+++ b/packages/on_audio_query_android/pubspec.yaml
@@ -0,0 +1,36 @@
+name: on_audio_query_android
+description: Android implementation of the on_audio_query plugin.
+version: 1.0.0
+homepage: https://github.com/LucJosin/on_audio_query/tree/main/on_audio_query_android
+# pub.dev: https://pub.dev/packages/on_audio_query
+# pub.dev (Android): https://pub.dev/packages/on_audio_query_android
+# ========
+# author: Lucas Josino
+# github: https://github.com/LucJosin
+# website: https://www.lucasjosino.com/
+
+environment:
+ sdk: ">=2.17.0 <3.0.0"
+ flutter: ">=2.5.0"
+
+dependencies:
+ # on_audio_query
+ on_audio_query_platform_interface: ^1.6.0
+
+ # Flutter
+ flutter:
+ sdk: flutter
+
+dev_dependencies:
+ # Flutter
+ flutter_lints: ^2.0.0
+ flutter_test:
+ sdk: flutter
+
+flutter:
+ plugin:
+ implements: on_audio_query
+ platforms:
+ android:
+ package: com.lucasjosino.on_audio_query
+ pluginClass: OnAudioQueryPlugin
diff --git a/packages/on_audio_query_ios/.gitignore b/packages/on_audio_query_ios/.gitignore
new file mode 100644
index 00000000..96486fd9
--- /dev/null
+++ b/packages/on_audio_query_ios/.gitignore
@@ -0,0 +1,30 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.buildlog/
+.history
+.svn/
+migrate_working_dir/
+
+# 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
+# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock.
+/pubspec.lock
+**/doc/api/
+.dart_tool/
+.packages
+build/
diff --git a/packages/on_audio_query_ios/.metadata b/packages/on_audio_query_ios/.metadata
new file mode 100644
index 00000000..cd8a9c2a
--- /dev/null
+++ b/packages/on_audio_query_ios/.metadata
@@ -0,0 +1,30 @@
+# 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.
+
+version:
+ revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
+ channel: stable
+
+project_type: plugin
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
+ base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
+ - platform: ios
+ create_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
+ base_revision: ee4e09cce01d6f2d7f4baebd247fde02e5008851
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/packages/on_audio_query_ios/CHANGELOG.md b/packages/on_audio_query_ios/CHANGELOG.md
new file mode 100644
index 00000000..acc3ccf2
--- /dev/null
+++ b/packages/on_audio_query_ios/CHANGELOG.md
@@ -0,0 +1,7 @@
+## 1.0.0
+
+- See more [on_audio_query - CHANGELOG](https://github.com/LucJosin/on_audio_query/blob/main/on_audio_query/CHANGELOG.md).
+
+## 1.0.0-prerelease.0 - [06.20.2022]
+
+- See more [on_audio_query - CHANGELOG](https://github.com/LucJosin/on_audio_query/blob/main/on_audio_query/CHANGELOG.md).
diff --git a/packages/on_audio_query_ios/LICENSE b/packages/on_audio_query_ios/LICENSE
new file mode 100644
index 00000000..29b78269
--- /dev/null
+++ b/packages/on_audio_query_ios/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2022, Lucas Josino
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/packages/on_audio_query_ios/README.md b/packages/on_audio_query_ios/README.md
new file mode 100644
index 00000000..ad2fab58
--- /dev/null
+++ b/packages/on_audio_query_ios/README.md
@@ -0,0 +1,11 @@
+# on_audio_query_ios
+
+The iOS implementation of [`on_audio_query`][1].
+
+## Usage
+
+This package is [endorsed][2], which means you can simply use `on_audio_query`
+normally. This package will be automatically included in your app when you do.
+
+[1]: https://pub.dev/packages/on_audio_query
+[2]: https://flutter.dev/docs/development/packages-and-plugins/developing-packages#endorsed-federated-plugin
diff --git a/packages/on_audio_query/ios/.gitignore b/packages/on_audio_query_ios/ios/.gitignore
similarity index 100%
rename from packages/on_audio_query/ios/.gitignore
rename to packages/on_audio_query_ios/ios/.gitignore
diff --git a/packages/on_audio_query/ios/Assets/.gitkeep b/packages/on_audio_query_ios/ios/Assets/.gitkeep
similarity index 100%
rename from packages/on_audio_query/ios/Assets/.gitkeep
rename to packages/on_audio_query_ios/ios/Assets/.gitkeep
diff --git a/packages/on_audio_query/ios/Classes/OnAudioQueryPlugin.h b/packages/on_audio_query_ios/ios/Classes/OnAudioQueryPluginIos.h
similarity index 100%
rename from packages/on_audio_query/ios/Classes/OnAudioQueryPlugin.h
rename to packages/on_audio_query_ios/ios/Classes/OnAudioQueryPluginIos.h
diff --git a/packages/on_audio_query/ios/Classes/OnAudioQueryPlugin.m b/packages/on_audio_query_ios/ios/Classes/OnAudioQueryPluginIos.m
similarity index 68%
rename from packages/on_audio_query/ios/Classes/OnAudioQueryPlugin.m
rename to packages/on_audio_query_ios/ios/Classes/OnAudioQueryPluginIos.m
index 3c18d0ea..91c95a2a 100644
--- a/packages/on_audio_query/ios/Classes/OnAudioQueryPlugin.m
+++ b/packages/on_audio_query_ios/ios/Classes/OnAudioQueryPluginIos.m
@@ -1,11 +1,11 @@
-#import "OnAudioQueryPlugin.h"
-#if __has_include()
-#import
+#import "OnAudioQueryPluginIos.h"
+#if __has_include()
+#import
#else
// Support project import fallback if the generated compatibility header
// is not copied when this plugin is created as a library.
// https://forums.swift.org/t/swift-static-libraries-dont-copy-generated-objective-c-header/19816
-#import "on_audio_query-Swift.h"
+#import "on_audio_query_ios-Swift.h"
#endif
@implementation OnAudioQueryPlugin
diff --git a/packages/on_audio_query/ios/Classes/PluginProvider.swift b/packages/on_audio_query_ios/ios/Classes/PluginProvider.swift
similarity index 70%
rename from packages/on_audio_query/ios/Classes/PluginProvider.swift
rename to packages/on_audio_query_ios/ios/Classes/PluginProvider.swift
index 9afa6033..8279d786 100644
--- a/packages/on_audio_query/ios/Classes/PluginProvider.swift
+++ b/packages/on_audio_query_ios/ios/Classes/PluginProvider.swift
@@ -12,6 +12,13 @@ enum PluginProvider {
private static var _result: FlutterResult?
+ /**
+ * Define if 'warn' level will show more detailed logging.
+ *
+ * Will be used when a query produce some error.
+ */
+ static var showDetailedLog: Bool = false
+
/**
* Used to define the current dart request.
*
@@ -22,8 +29,13 @@ enum PluginProvider {
PluginProvider._result = result
}
+ /**
+ * The current plugin 'call'. Will be replace with newest dart request.
+ *
+ * - throws UninitializedPluginProviderException
+ * - returns [MethodCall]
+ */
static func call() throws -> FlutterMethodCall {
- Log.type.debug(_call == nil)
guard _call != nil else {
throw PluginProviderException.unitialized(ERROR_MESSAGE)
}
@@ -31,8 +43,13 @@ enum PluginProvider {
return _call!
}
+ /**
+ * The current plugin 'result'. Will be replace with newest dart request.
+ *
+ * - throws UninitializedPluginProviderException
+ * - returns [MethodChannel.Result]
+ */
static func result() throws -> FlutterResult {
- Log.type.debug(_call == nil)
guard _result != nil else {
throw PluginProviderException.unitialized(ERROR_MESSAGE)
}
diff --git a/packages/on_audio_query/ios/Classes/SwiftOnAudioQueryPlugin.swift b/packages/on_audio_query_ios/ios/Classes/SwiftOnAudioQueryPlugin.swift
similarity index 92%
rename from packages/on_audio_query/ios/Classes/SwiftOnAudioQueryPlugin.swift
rename to packages/on_audio_query_ios/ios/Classes/SwiftOnAudioQueryPlugin.swift
index f19ee95d..bd447317 100644
--- a/packages/on_audio_query/ios/Classes/SwiftOnAudioQueryPlugin.swift
+++ b/packages/on_audio_query_ios/ios/Classes/SwiftOnAudioQueryPlugin.swift
@@ -56,8 +56,15 @@ public class SwiftOnAudioQueryPlugin: NSObject, FlutterPlugin {
// Set logging level.
case Method.SET_LOG_CONFIG:
let args = call.arguments as! [String: Any]
+
+ // Log level
let level = args["level"] as! Int
Log.setLogLevel(dartLevel: level)
+
+ // Define if 'warn' level will show more detailed logging.
+ let showDetailedLog = args["showDetailedLog"] as! Bool
+ PluginProvider.showDetailedLog = showDetailedLog
+
result(true)
default:
Log.type.debug("Checking permissions...")
diff --git a/packages/on_audio_query/ios/Classes/consts/Method.swift b/packages/on_audio_query_ios/ios/Classes/consts/Method.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/consts/Method.swift
rename to packages/on_audio_query_ios/ios/Classes/consts/Method.swift
diff --git a/packages/on_audio_query/ios/Classes/controllers/MethodController.swift b/packages/on_audio_query_ios/ios/Classes/controllers/MethodController.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/controllers/MethodController.swift
rename to packages/on_audio_query_ios/ios/Classes/controllers/MethodController.swift
diff --git a/packages/on_audio_query/ios/Classes/controllers/PermissionController.swift b/packages/on_audio_query_ios/ios/Classes/controllers/PermissionController.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/controllers/PermissionController.swift
rename to packages/on_audio_query_ios/ios/Classes/controllers/PermissionController.swift
diff --git a/packages/on_audio_query/ios/Classes/controllers/PlaylistController.swift b/packages/on_audio_query_ios/ios/Classes/controllers/PlaylistController.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/controllers/PlaylistController.swift
rename to packages/on_audio_query_ios/ios/Classes/controllers/PlaylistController.swift
diff --git a/packages/on_audio_query/ios/Classes/queries/AlbumQuery.swift b/packages/on_audio_query_ios/ios/Classes/queries/AlbumQuery.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/queries/AlbumQuery.swift
rename to packages/on_audio_query_ios/ios/Classes/queries/AlbumQuery.swift
diff --git a/packages/on_audio_query/ios/Classes/queries/ArtistQuery.swift b/packages/on_audio_query_ios/ios/Classes/queries/ArtistQuery.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/queries/ArtistQuery.swift
rename to packages/on_audio_query_ios/ios/Classes/queries/ArtistQuery.swift
diff --git a/packages/on_audio_query/ios/Classes/queries/ArtworkQuery.swift b/packages/on_audio_query_ios/ios/Classes/queries/ArtworkQuery.swift
similarity index 96%
rename from packages/on_audio_query/ios/Classes/queries/ArtworkQuery.swift
rename to packages/on_audio_query_ios/ios/Classes/queries/ArtworkQuery.swift
index be56f6a8..c50d7a76 100644
--- a/packages/on_audio_query/ios/Classes/queries/ArtworkQuery.swift
+++ b/packages/on_audio_query_ios/ios/Classes/queries/ArtworkQuery.swift
@@ -116,7 +116,9 @@ class ArtworkQuery {
DispatchQueue.main.async {
// Avoid "empty" or broken image.
if artwork != nil, artwork!.isEmpty {
- Log.type.info("Item (\(item?.persistentID ?? 0)) has a null or empty artwork")
+ if PluginProvider.showDetailedLog {
+ Log.type.warning("Item (\(item?.persistentID ?? 0)) has a null or empty artwork")
+ }
artwork = nil
}
diff --git a/packages/on_audio_query/ios/Classes/queries/AudioFromQuery.swift b/packages/on_audio_query_ios/ios/Classes/queries/AudioFromQuery.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/queries/AudioFromQuery.swift
rename to packages/on_audio_query_ios/ios/Classes/queries/AudioFromQuery.swift
diff --git a/packages/on_audio_query/ios/Classes/queries/AudioQuery.swift b/packages/on_audio_query_ios/ios/Classes/queries/AudioQuery.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/queries/AudioQuery.swift
rename to packages/on_audio_query_ios/ios/Classes/queries/AudioQuery.swift
diff --git a/packages/on_audio_query/ios/Classes/queries/GenreQuery.swift b/packages/on_audio_query_ios/ios/Classes/queries/GenreQuery.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/queries/GenreQuery.swift
rename to packages/on_audio_query_ios/ios/Classes/queries/GenreQuery.swift
diff --git a/packages/on_audio_query/ios/Classes/queries/PlaylistQuery.swift b/packages/on_audio_query_ios/ios/Classes/queries/PlaylistQuery.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/queries/PlaylistQuery.swift
rename to packages/on_audio_query_ios/ios/Classes/queries/PlaylistQuery.swift
diff --git a/packages/on_audio_query/ios/Classes/queries/WithFiltersQuery.swift b/packages/on_audio_query_ios/ios/Classes/queries/WithFiltersQuery.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/queries/WithFiltersQuery.swift
rename to packages/on_audio_query_ios/ios/Classes/queries/WithFiltersQuery.swift
diff --git a/packages/on_audio_query/ios/Classes/queries/helper/OnAudioHelper.swift b/packages/on_audio_query_ios/ios/Classes/queries/helper/OnAudioHelper.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/queries/helper/OnAudioHelper.swift
rename to packages/on_audio_query_ios/ios/Classes/queries/helper/OnAudioHelper.swift
diff --git a/packages/on_audio_query/ios/Classes/types/AudiosFromType.swift b/packages/on_audio_query_ios/ios/Classes/types/AudiosFromType.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/types/AudiosFromType.swift
rename to packages/on_audio_query_ios/ios/Classes/types/AudiosFromType.swift
diff --git a/packages/on_audio_query/ios/Classes/types/WithFiltersType.swift b/packages/on_audio_query_ios/ios/Classes/types/WithFiltersType.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/types/WithFiltersType.swift
rename to packages/on_audio_query_ios/ios/Classes/types/WithFiltersType.swift
diff --git a/packages/on_audio_query/ios/Classes/types/sorttypes/AlbumSortType.swift b/packages/on_audio_query_ios/ios/Classes/types/sorttypes/AlbumSortType.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/types/sorttypes/AlbumSortType.swift
rename to packages/on_audio_query_ios/ios/Classes/types/sorttypes/AlbumSortType.swift
diff --git a/packages/on_audio_query/ios/Classes/types/sorttypes/SongSortType.swift b/packages/on_audio_query_ios/ios/Classes/types/sorttypes/SongSortType.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/types/sorttypes/SongSortType.swift
rename to packages/on_audio_query_ios/ios/Classes/types/sorttypes/SongSortType.swift
diff --git a/packages/on_audio_query/ios/Classes/utils/Log.swift b/packages/on_audio_query_ios/ios/Classes/utils/Log.swift
similarity index 100%
rename from packages/on_audio_query/ios/Classes/utils/Log.swift
rename to packages/on_audio_query_ios/ios/Classes/utils/Log.swift
diff --git a/packages/on_audio_query/ios/on_audio_query.podspec b/packages/on_audio_query_ios/ios/on_audio_query_ios.podspec
similarity index 84%
rename from packages/on_audio_query/ios/on_audio_query.podspec
rename to packages/on_audio_query_ios/ios/on_audio_query_ios.podspec
index 34e98111..e52e3906 100644
--- a/packages/on_audio_query/ios/on_audio_query.podspec
+++ b/packages/on_audio_query_ios/ios/on_audio_query_ios.podspec
@@ -5,18 +5,18 @@
Pod::Spec.new do |s|
s.name = 'on_audio_query'
s.version = '0.0.1'
- s.summary = 'Audio query plugin for flutter.'
+ s.summary = 'on_audio_query flutter plugin for ios.'
s.description = <<-DESC
Flutter Plugin used to query audios/songs infos [title, artist, album, etc..] from device storage.
DESC
- s.homepage = 'https://github.com/LucasPJS/on_audio_query'
+ s.homepage = 'https://github.com/LucJosin/on_audio_query'
s.license = { :file => '../LICENSE' }
s.author = { 'Lucas Josino' => 'contact@lucasjosino.com' }
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.dependency 'SwiftyBeaver'
- s.platform = :ios, '10.0'
+ s.platform = :ios, '11.0'
# Flutter.framework does not contain a i386 slice.
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' }
diff --git a/packages/on_audio_query_ios/pubspec.yaml b/packages/on_audio_query_ios/pubspec.yaml
new file mode 100644
index 00000000..632a1c84
--- /dev/null
+++ b/packages/on_audio_query_ios/pubspec.yaml
@@ -0,0 +1,35 @@
+name: on_audio_query_ios
+description: iOS implementation of the on_audio_query plugin.
+version: 1.0.0
+homepage: https://github.com/LucJosin/on_audio_query/tree/main/on_audio_query_ios
+# pub.dev: https://pub.dev/packages/on_audio_query
+# pub.dev (iOS): https://pub.dev/packages/on_audio_query_ios
+# ========
+# author: Lucas Josino
+# github: https://github.com/LucJosin
+# website: https://www.lucasjosino.com/
+
+environment:
+ sdk: ">=2.17.0 <3.0.0"
+ flutter: ">=2.5.0"
+
+dependencies:
+ # on_audio_query
+ on_audio_query_platform_interface: ^1.6.0
+
+ # Flutter
+ flutter:
+ sdk: flutter
+
+dev_dependencies:
+ # Flutter
+ flutter_lints: ^2.0.0
+ flutter_test:
+ sdk: flutter
+
+flutter:
+ plugin:
+ implements: on_audio_query
+ platforms:
+ ios:
+ pluginClass: OnAudioQueryPlugin
diff --git a/packages/on_audio_query_platform_interface/CHANGELOG.md b/packages/on_audio_query_platform_interface/CHANGELOG.md
index efca5f17..1539d57f 100644
--- a/packages/on_audio_query_platform_interface/CHANGELOG.md
+++ b/packages/on_audio_query_platform_interface/CHANGELOG.md
@@ -1,3 +1,6 @@
+## 1.6.0
+- See more [on_audio_query - CHANGELOG](https://github.com/LucJosin/on_audio_query/blob/main/on_audio_query/CHANGELOG.md).
+
## 1.5.0 - [29.02.2022]
- See more [on_audio_query - CHANGELOG](https://github.com/LucJosin/on_audio_query/blob/main/on_audio_query/CHANGELOG.md).
diff --git a/packages/on_audio_query_platform_interface/lib/details/on_audio_query_helper.dart b/packages/on_audio_query_platform_interface/lib/details/on_audio_query_helper.dart
deleted file mode 100644
index da09cb89..00000000
--- a/packages/on_audio_query_platform_interface/lib/details/on_audio_query_helper.dart
+++ /dev/null
@@ -1,30 +0,0 @@
-library on_audio_query_helper;
-
-//Extensions
-part 'extensions/models_extensions.dart';
-
-//Models
-part 'models/song_model.dart';
-part 'models/album_model.dart';
-part 'models/artist_model.dart';
-part 'models/playlist_model.dart';
-part 'models/genre_model.dart';
-//
-part 'models/device_model.dart';
-
-//Sort Types
-part 'types/sort_types/song_sort_type.dart';
-part 'types/sort_types/album_sort_type.dart';
-part 'types/sort_types/artist_sort_type.dart';
-part 'types/sort_types/playlist_sort_type.dart';
-part 'types/sort_types/genre_sort_type.dart';
-//
-part 'types/order_type.dart';
-part 'types/log_type.dart';
-part 'types/artwork_type.dart';
-part 'types/audios_from_type.dart';
-part 'types/with_filters_type.dart';
-part 'types/uri_type.dart';
-
-//Log
-part 'log/log_config.dart';
diff --git a/packages/on_audio_query_platform_interface/lib/method_channel_on_audio_query.dart b/packages/on_audio_query_platform_interface/lib/method_channel_on_audio_query.dart
index f39b489f..1d9dde56 100644
--- a/packages/on_audio_query_platform_interface/lib/method_channel_on_audio_query.dart
+++ b/packages/on_audio_query_platform_interface/lib/method_channel_on_audio_query.dart
@@ -19,8 +19,6 @@ import 'package:flutter/services.dart';
import 'on_audio_query_platform_interface.dart';
-import 'package:on_audio_query_platform_interface/details/on_audio_query_helper.dart';
-
const MethodChannel _channel = MethodChannel('com.lucasjosino.on_audio_query');
/// An implementation of [OnAudioQueryPlatform] that uses method channels.
@@ -37,6 +35,7 @@ class MethodChannelOnAudioQuery extends OnAudioQueryPlatform {
await _channel.invokeMethod("setLogConfig", {
"level": _logConfig.logType.value,
+ "showDetailedLog": _logConfig.showDetailedLog,
});
}
@@ -201,7 +200,6 @@ class MethodChannelOnAudioQuery extends OnAudioQueryPlatform {
"format": format != null ? format.index : ArtworkFormat.JPEG.index,
"size": size ?? 200,
"quality": (quality != null && quality <= 100) ? quality : 50,
- "detailedErrors": _logConfig.detailedLog,
},
);
return finalArtworks;
diff --git a/packages/on_audio_query_platform_interface/lib/on_audio_query_platform_interface.dart b/packages/on_audio_query_platform_interface/lib/on_audio_query_platform_interface.dart
index e90c431a..eb20d478 100644
--- a/packages/on_audio_query_platform_interface/lib/on_audio_query_platform_interface.dart
+++ b/packages/on_audio_query_platform_interface/lib/on_audio_query_platform_interface.dart
@@ -16,11 +16,13 @@ Copyright: © 2021, Lucas Josino. All rights reserved.
import 'dart:async';
import 'dart:typed_data';
+import 'package:on_audio_query_platform_interface/src/on_audio_query_core.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
-import 'package:on_audio_query_platform_interface/details/on_audio_query_helper.dart';
import 'method_channel_on_audio_query.dart';
+export 'package:on_audio_query_platform_interface/src/on_audio_query_core.dart';
+
/// The interface that implementations of on_audio_query must implement.
///
/// Platform implementations should extend this class rather than implement it as `on_audio_query`
diff --git a/packages/on_audio_query_platform_interface/lib/details/extensions/models_extensions.dart b/packages/on_audio_query_platform_interface/lib/src/extensions/models_extensions.dart
similarity index 86%
rename from packages/on_audio_query_platform_interface/lib/details/extensions/models_extensions.dart
rename to packages/on_audio_query_platform_interface/lib/src/extensions/models_extensions.dart
index e4be10a0..2187bee9 100644
--- a/packages/on_audio_query_platform_interface/lib/details/extensions/models_extensions.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/extensions/models_extensions.dart
@@ -1,4 +1,8 @@
-part of on_audio_query_helper;
+import '../models/album_model.dart';
+import '../models/artist_model.dart';
+import '../models/genre_model.dart';
+import '../models/playlist_model.dart';
+import '../models/song_model.dart';
/// Used to convert a [List] into a Model.
///
diff --git a/packages/on_audio_query_platform_interface/lib/details/log/log_config.dart b/packages/on_audio_query_platform_interface/lib/src/log/log_config.dart
similarity index 75%
rename from packages/on_audio_query_platform_interface/lib/details/log/log_config.dart
rename to packages/on_audio_query_platform_interface/lib/src/log/log_config.dart
index b9d783ec..2eadae3e 100644
--- a/packages/on_audio_query_platform_interface/lib/details/log/log_config.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/log/log_config.dart
@@ -1,16 +1,16 @@
-part of on_audio_query_helper;
+import '../types/log_type.dart';
/// Used to configure the logging behavior.
class LogConfig {
/// Used to configure the logging behavior.
LogConfig({
this.logType = LogType.WARN,
- this.detailedLog = false,
+ this.showDetailedLog = false,
});
/// Define the logging level.
final LogType logType;
/// Define if detailed log will be shown (Disable by default to avoid spam).
- final bool detailedLog;
+ final bool showDetailedLog;
}
diff --git a/packages/on_audio_query_platform_interface/lib/details/models/album_model.dart b/packages/on_audio_query_platform_interface/lib/src/models/album_model.dart
similarity index 95%
rename from packages/on_audio_query_platform_interface/lib/details/models/album_model.dart
rename to packages/on_audio_query_platform_interface/lib/src/models/album_model.dart
index 36cfcf28..8ce47957 100644
--- a/packages/on_audio_query_platform_interface/lib/details/models/album_model.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/models/album_model.dart
@@ -1,5 +1,3 @@
-part of on_audio_query_helper;
-
/// [AlbumModel] that contains all [Album] Information.
class AlbumModel {
AlbumModel(this._info);
diff --git a/packages/on_audio_query_platform_interface/lib/details/models/artist_model.dart b/packages/on_audio_query_platform_interface/lib/src/models/artist_model.dart
similarity index 95%
rename from packages/on_audio_query_platform_interface/lib/details/models/artist_model.dart
rename to packages/on_audio_query_platform_interface/lib/src/models/artist_model.dart
index b533b6e2..e87fad85 100644
--- a/packages/on_audio_query_platform_interface/lib/details/models/artist_model.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/models/artist_model.dart
@@ -1,5 +1,3 @@
-part of on_audio_query_helper;
-
/// [ArtistModel] that contains all [Artist] Information.
class ArtistModel {
ArtistModel(this._info);
diff --git a/packages/on_audio_query_platform_interface/lib/details/models/device_model.dart b/packages/on_audio_query_platform_interface/lib/src/models/device_model.dart
similarity index 95%
rename from packages/on_audio_query_platform_interface/lib/details/models/device_model.dart
rename to packages/on_audio_query_platform_interface/lib/src/models/device_model.dart
index f803a3e0..c03525f6 100644
--- a/packages/on_audio_query_platform_interface/lib/details/models/device_model.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/models/device_model.dart
@@ -1,5 +1,3 @@
-part of on_audio_query_helper;
-
/// [DeviceModel] that contains all [Device] Information.
class DeviceModel {
DeviceModel(this._info);
diff --git a/packages/on_audio_query_platform_interface/lib/details/models/genre_model.dart b/packages/on_audio_query_platform_interface/lib/src/models/genre_model.dart
similarity index 94%
rename from packages/on_audio_query_platform_interface/lib/details/models/genre_model.dart
rename to packages/on_audio_query_platform_interface/lib/src/models/genre_model.dart
index 61f84852..364e026a 100644
--- a/packages/on_audio_query_platform_interface/lib/details/models/genre_model.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/models/genre_model.dart
@@ -1,5 +1,3 @@
-part of on_audio_query_helper;
-
/// [GenreModel] that contains all [Genre] Information.
class GenreModel {
GenreModel(this._info);
diff --git a/packages/on_audio_query_platform_interface/lib/details/models/playlist_model.dart b/packages/on_audio_query_platform_interface/lib/src/models/playlist_model.dart
similarity index 96%
rename from packages/on_audio_query_platform_interface/lib/details/models/playlist_model.dart
rename to packages/on_audio_query_platform_interface/lib/src/models/playlist_model.dart
index 26d804ab..d20e4985 100644
--- a/packages/on_audio_query_platform_interface/lib/details/models/playlist_model.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/models/playlist_model.dart
@@ -1,5 +1,3 @@
-part of on_audio_query_helper;
-
/// [PlaylistModel] that contains all [Playlist] Information.
class PlaylistModel {
PlaylistModel(this._info);
diff --git a/packages/on_audio_query_platform_interface/lib/details/models/song_model.dart b/packages/on_audio_query_platform_interface/lib/src/models/song_model.dart
similarity index 98%
rename from packages/on_audio_query_platform_interface/lib/details/models/song_model.dart
rename to packages/on_audio_query_platform_interface/lib/src/models/song_model.dart
index 8eb0c056..d4925ce9 100644
--- a/packages/on_audio_query_platform_interface/lib/details/models/song_model.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/models/song_model.dart
@@ -1,5 +1,3 @@
-part of on_audio_query_helper;
-
/// [SongModel] that contains all [Song] Information.
class SongModel {
SongModel(this._info);
diff --git a/packages/on_audio_query_platform_interface/lib/src/on_audio_query_core.dart b/packages/on_audio_query_platform_interface/lib/src/on_audio_query_core.dart
new file mode 100644
index 00000000..9a006dfa
--- /dev/null
+++ b/packages/on_audio_query_platform_interface/lib/src/on_audio_query_core.dart
@@ -0,0 +1,30 @@
+library on_audio_query_core;
+
+//Extensions
+export 'extensions/models_extensions.dart';
+
+//Models
+export 'models/song_model.dart';
+export 'models/album_model.dart';
+export 'models/artist_model.dart';
+export 'models/playlist_model.dart';
+export 'models/genre_model.dart';
+//
+export 'models/device_model.dart';
+
+//Sort Types
+export 'types/sort_types/song_sort_type.dart';
+export 'types/sort_types/album_sort_type.dart';
+export 'types/sort_types/artist_sort_type.dart';
+export 'types/sort_types/playlist_sort_type.dart';
+export 'types/sort_types/genre_sort_type.dart';
+//
+export 'types/order_type.dart';
+export 'types/log_type.dart';
+export 'types/artwork_type.dart';
+export 'types/audios_from_type.dart';
+export 'types/with_filters_type.dart';
+export 'types/uri_type.dart';
+
+//Log
+export 'log/log_config.dart';
diff --git a/packages/on_audio_query_platform_interface/lib/details/types/artwork_type.dart b/packages/on_audio_query_platform_interface/lib/src/types/artwork_type.dart
similarity index 96%
rename from packages/on_audio_query_platform_interface/lib/details/types/artwork_type.dart
rename to packages/on_audio_query_platform_interface/lib/src/types/artwork_type.dart
index a3529f7a..61d9bd73 100644
--- a/packages/on_audio_query_platform_interface/lib/details/types/artwork_type.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/types/artwork_type.dart
@@ -1,7 +1,5 @@
// ignore_for_file: constant_identifier_names
-part of on_audio_query_helper;
-
/// Defines where artwork will be acquired.
enum ArtworkType {
/// Artwork from Audios.
diff --git a/packages/on_audio_query_platform_interface/lib/details/types/audios_from_type.dart b/packages/on_audio_query_platform_interface/lib/src/types/audios_from_type.dart
similarity index 93%
rename from packages/on_audio_query_platform_interface/lib/details/types/audios_from_type.dart
rename to packages/on_audio_query_platform_interface/lib/src/types/audios_from_type.dart
index e42404c5..20672647 100644
--- a/packages/on_audio_query_platform_interface/lib/details/types/audios_from_type.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/types/audios_from_type.dart
@@ -1,7 +1,5 @@
// ignore_for_file: constant_identifier_names
-part of on_audio_query_helper;
-
/// Defines where audios will be acquired.
enum AudiosFromType {
/// Audios from specific Album name.
diff --git a/packages/on_audio_query_platform_interface/lib/details/types/log_type.dart b/packages/on_audio_query_platform_interface/lib/src/types/log_type.dart
similarity index 95%
rename from packages/on_audio_query_platform_interface/lib/details/types/log_type.dart
rename to packages/on_audio_query_platform_interface/lib/src/types/log_type.dart
index 72df1bc9..4a5db335 100644
--- a/packages/on_audio_query_platform_interface/lib/details/types/log_type.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/types/log_type.dart
@@ -1,7 +1,5 @@
// ignore_for_file: constant_identifier_names
-part of on_audio_query_helper;
-
/// Used to represent the various levels of logs.
enum LogType {
/// Show all logs.
diff --git a/packages/on_audio_query_platform_interface/lib/details/types/order_type.dart b/packages/on_audio_query_platform_interface/lib/src/types/order_type.dart
similarity index 92%
rename from packages/on_audio_query_platform_interface/lib/details/types/order_type.dart
rename to packages/on_audio_query_platform_interface/lib/src/types/order_type.dart
index 2c01550b..8b1b7769 100644
--- a/packages/on_audio_query_platform_interface/lib/details/types/order_type.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/types/order_type.dart
@@ -1,7 +1,5 @@
// ignore_for_file: constant_identifier_names
-part of on_audio_query_helper;
-
/// Defines the sort type used for all query methods.
enum OrderType {
/// [ASC_OR_SMALLER] will return list in alphabetical order or smaller number.
diff --git a/packages/on_audio_query_platform_interface/lib/details/types/sort_types/album_sort_type.dart b/packages/on_audio_query_platform_interface/lib/src/types/sort_types/album_sort_type.dart
similarity index 91%
rename from packages/on_audio_query_platform_interface/lib/details/types/sort_types/album_sort_type.dart
rename to packages/on_audio_query_platform_interface/lib/src/types/sort_types/album_sort_type.dart
index eb8b77a0..5f770c30 100644
--- a/packages/on_audio_query_platform_interface/lib/details/types/sort_types/album_sort_type.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/types/sort_types/album_sort_type.dart
@@ -1,7 +1,5 @@
// ignore_for_file: constant_identifier_names
-part of on_audio_query_helper;
-
/// Defines the sort type used for [queryAlbums].
enum AlbumSortType {
///[ALBUM] will return album list based in [album] names.
diff --git a/packages/on_audio_query_platform_interface/lib/details/types/sort_types/artist_sort_type.dart b/packages/on_audio_query_platform_interface/lib/src/types/sort_types/artist_sort_type.dart
similarity index 92%
rename from packages/on_audio_query_platform_interface/lib/details/types/sort_types/artist_sort_type.dart
rename to packages/on_audio_query_platform_interface/lib/src/types/sort_types/artist_sort_type.dart
index 0db87d84..fc7cf9c8 100644
--- a/packages/on_audio_query_platform_interface/lib/details/types/sort_types/artist_sort_type.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/types/sort_types/artist_sort_type.dart
@@ -1,7 +1,5 @@
// ignore_for_file: constant_identifier_names
-part of on_audio_query_helper;
-
/// Defines the sort type used for [queryArtists].
enum ArtistSortType {
///[ARTIST] will return song list based in [artists] names.
diff --git a/packages/on_audio_query_platform_interface/lib/details/types/sort_types/genre_sort_type.dart b/packages/on_audio_query_platform_interface/lib/src/types/sort_types/genre_sort_type.dart
similarity index 85%
rename from packages/on_audio_query_platform_interface/lib/details/types/sort_types/genre_sort_type.dart
rename to packages/on_audio_query_platform_interface/lib/src/types/sort_types/genre_sort_type.dart
index 8ef95e0f..92a563de 100644
--- a/packages/on_audio_query_platform_interface/lib/details/types/sort_types/genre_sort_type.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/types/sort_types/genre_sort_type.dart
@@ -1,7 +1,5 @@
// ignore_for_file: constant_identifier_names
-part of on_audio_query_helper;
-
/// Defines the sort type used for [queryPlaylists].
enum GenreSortType {
///[NAME] will return song list based in genre [name].
diff --git a/packages/on_audio_query_platform_interface/lib/details/types/sort_types/playlist_sort_type.dart b/packages/on_audio_query_platform_interface/lib/src/types/sort_types/playlist_sort_type.dart
similarity index 89%
rename from packages/on_audio_query_platform_interface/lib/details/types/sort_types/playlist_sort_type.dart
rename to packages/on_audio_query_platform_interface/lib/src/types/sort_types/playlist_sort_type.dart
index a0438f01..5072b6e0 100644
--- a/packages/on_audio_query_platform_interface/lib/details/types/sort_types/playlist_sort_type.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/types/sort_types/playlist_sort_type.dart
@@ -1,7 +1,5 @@
// ignore_for_file: constant_identifier_names
-part of on_audio_query_helper;
-
/// Defines the sort type used for [queryPlaylists].
enum PlaylistSortType {
/// [PLAYLIST] will return playlist based in [playlist].
diff --git a/packages/on_audio_query_platform_interface/lib/details/types/sort_types/song_sort_type.dart b/packages/on_audio_query_platform_interface/lib/src/types/sort_types/song_sort_type.dart
similarity index 95%
rename from packages/on_audio_query_platform_interface/lib/details/types/sort_types/song_sort_type.dart
rename to packages/on_audio_query_platform_interface/lib/src/types/sort_types/song_sort_type.dart
index 0b35c350..db70436d 100644
--- a/packages/on_audio_query_platform_interface/lib/details/types/sort_types/song_sort_type.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/types/sort_types/song_sort_type.dart
@@ -1,7 +1,5 @@
// ignore_for_file: constant_identifier_names
-part of on_audio_query_helper;
-
/// Defines the sort type used for [querySongs] and [queryAudios].
enum SongSortType {
///[TITLE] will return song list using [title] as sort param.
diff --git a/packages/on_audio_query_platform_interface/lib/details/types/uri_type.dart b/packages/on_audio_query_platform_interface/lib/src/types/uri_type.dart
similarity index 93%
rename from packages/on_audio_query_platform_interface/lib/details/types/uri_type.dart
rename to packages/on_audio_query_platform_interface/lib/src/types/uri_type.dart
index a3f73fa6..b89c561b 100644
--- a/packages/on_audio_query_platform_interface/lib/details/types/uri_type.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/types/uri_type.dart
@@ -1,7 +1,5 @@
// ignore_for_file: constant_identifier_names
-part of on_audio_query_helper;
-
/// Defines if query method will be in [EXTERNAL] or [INTERNAL] storage.
///
/// Normally [INTERNAL] return null.
diff --git a/packages/on_audio_query_platform_interface/lib/details/types/with_filters_type.dart b/packages/on_audio_query_platform_interface/lib/src/types/with_filters_type.dart
similarity index 97%
rename from packages/on_audio_query_platform_interface/lib/details/types/with_filters_type.dart
rename to packages/on_audio_query_platform_interface/lib/src/types/with_filters_type.dart
index c3758440..84620cf9 100644
--- a/packages/on_audio_query_platform_interface/lib/details/types/with_filters_type.dart
+++ b/packages/on_audio_query_platform_interface/lib/src/types/with_filters_type.dart
@@ -1,7 +1,5 @@
// ignore_for_file: constant_identifier_names
-part of on_audio_query_helper;
-
/// Defines the type of Filter.
/// Each type has a subtype, [10] in total.
///
diff --git a/packages/on_audio_query_platform_interface/pubspec.yaml b/packages/on_audio_query_platform_interface/pubspec.yaml
index b501ce6a..7293b063 100644
--- a/packages/on_audio_query_platform_interface/pubspec.yaml
+++ b/packages/on_audio_query_platform_interface/pubspec.yaml
@@ -3,7 +3,7 @@ description: A common platform interface for the [on_audio_query] plugin.
homepage: https://github.com/LucJosin/on_audio_query/tree/master/on_audio_query_platform_interface
# NOTE: We strongly prefer non-breaking changes, even at the expense of a
# less-clean API. See https://flutter.dev/go/platform-interface-breaking-changes
-version: 1.5.0
+version: 1.6.0
environment:
sdk: ">=2.17.0 <3.0.0"
@@ -21,4 +21,4 @@ dev_dependencies:
# Flutter
flutter_lints: ^1.0.4
flutter_test:
- sdk: flutter
\ No newline at end of file
+ sdk: flutter
diff --git a/packages/on_audio_query_web/CHANGELOG.md b/packages/on_audio_query_web/CHANGELOG.md
index 10c0be47..119a6a8e 100644
--- a/packages/on_audio_query_web/CHANGELOG.md
+++ b/packages/on_audio_query_web/CHANGELOG.md
@@ -1,3 +1,6 @@
+## 1.5.0
+- See more [on_audio_query - CHANGELOG](https://github.com/LucJosin/on_audio_query/blob/main/on_audio_query/CHANGELOG.md).
+
## 1.4.0 - [29.03.2022]
- See more [on_audio_query - CHANGELOG](https://github.com/LucJosin/on_audio_query/blob/main/on_audio_query/CHANGELOG.md).
diff --git a/packages/on_audio_query_web/lib/on_audio_query_web.dart b/packages/on_audio_query_web/lib/on_audio_query_web.dart
index 0156c255..35b16506 100644
--- a/packages/on_audio_query_web/lib/on_audio_query_web.dart
+++ b/packages/on_audio_query_web/lib/on_audio_query_web.dart
@@ -20,15 +20,14 @@ import 'dart:convert';
import 'dart:html' as html;
import 'package:flutter_web_plugins/flutter_web_plugins.dart';
-import 'package:on_audio_query_platform_interface/details/on_audio_query_helper.dart';
import 'package:on_audio_query_platform_interface/on_audio_query_platform_interface.dart';
import 'package:flutter/services.dart';
import 'package:id3/id3.dart';
-import 'details/extensions/format_extension.dart';
+import 'src/extensions/format_extension.dart';
-part 'details/on_audio_query_web_controller.dart';
-part 'details/types/with_filters_type.dart';
+part 'src/on_audio_query_web_controller.dart';
+part 'src/types/with_filters_type.dart';
/// A web implementation of the OnAudioQueryWeb plugin.
class OnAudioQueryPlugin extends OnAudioQueryPlatform {
diff --git a/packages/on_audio_query_web/lib/details/extensions/format_extension.dart b/packages/on_audio_query_web/lib/src/extensions/format_extension.dart
similarity index 98%
rename from packages/on_audio_query_web/lib/details/extensions/format_extension.dart
rename to packages/on_audio_query_web/lib/src/extensions/format_extension.dart
index f5a58d49..0e4c4676 100644
--- a/packages/on_audio_query_web/lib/details/extensions/format_extension.dart
+++ b/packages/on_audio_query_web/lib/src/extensions/format_extension.dart
@@ -2,9 +2,9 @@
import 'dart:html';
-import 'package:on_audio_query_platform_interface/details/on_audio_query_helper.dart';
import 'package:path/path.dart' as path_controller;
import 'package:on_audio_query_web/on_audio_query_web.dart';
+import 'package:on_audio_query_platform_interface/on_audio_query_platform_interface.dart';
extension OnAudioQueryFormat on Map {
Map formatAudio(String data, int size) {
diff --git a/packages/on_audio_query_web/lib/details/on_audio_query_web_controller.dart b/packages/on_audio_query_web/lib/src/on_audio_query_web_controller.dart
similarity index 100%
rename from packages/on_audio_query_web/lib/details/on_audio_query_web_controller.dart
rename to packages/on_audio_query_web/lib/src/on_audio_query_web_controller.dart
diff --git a/packages/on_audio_query_web/lib/details/types/with_filters_type.dart b/packages/on_audio_query_web/lib/src/types/with_filters_type.dart
similarity index 100%
rename from packages/on_audio_query_web/lib/details/types/with_filters_type.dart
rename to packages/on_audio_query_web/lib/src/types/with_filters_type.dart
diff --git a/packages/on_audio_query_web/pubspec.yaml b/packages/on_audio_query_web/pubspec.yaml
index 92f8093f..9ea6a750 100644
--- a/packages/on_audio_query_web/pubspec.yaml
+++ b/packages/on_audio_query_web/pubspec.yaml
@@ -1,6 +1,6 @@
name: on_audio_query_web
description: The web implementation of [on_audio_query].
-version: 1.4.0
+version: 1.5.0
homepage: https://github.com/LucJosin/on_audio_query/tree/master/on_audio_query_web
environment:
@@ -9,12 +9,12 @@ environment:
dependencies:
# on_audio_query
- on_audio_query_platform_interface: ^1.5.0
+ on_audio_query_platform_interface: ^1.6.0
# Others
path: ^1.8.0
id3: ^1.0.2
-
+
# Flutter
flutter:
sdk: flutter