Skip to content

Path not found#162

Open
lstonussi wants to merge 2 commits intomasterfrom
path_not_found
Open

Path not found#162
lstonussi wants to merge 2 commits intomasterfrom
path_not_found

Conversation

@lstonussi
Copy link
Contributor

@lstonussi lstonussi commented Mar 4, 2026

Summary by CodeRabbit

  • New Features

    • Enhanced media scanning with improved metadata extraction and album cover generation capabilities.
  • Bug Fixes

    • Improved error handling and null-safety in media display.
    • Better handling of unknown artist metadata with locale-aware processing.
  • Chores

    • Updated build toolchain and dependencies to latest stable versions.
    • Improved Dart SDK and Flutter plugin compatibility.

- Transitioned to the new Gradle plugin and updated Gradle wrapper to version 8.7.
- Refactored build.gradle files to use the new plugins DSL and updated Kotlin version.
- Updated AndroidManifest.xml to remove the package attribute and ensure proper permissions.
- Enhanced MediaScanner.kt and AudioMediaScannerExtractor.kt for better handling of artist names and added support for additional media attributes.
- Updated pubspec.yaml to reflect new SDK constraints and dependency versions.
- Updated title extraction logic to use ifBlank for better readability.
- Fixed album cover retrieval by using the correct album ID.
- Enhanced createCover method to save album covers in a dedicated directory and handle image compression to WEBP format.
- Improved error handling during cover creation process.
@coderabbitai
Copy link

coderabbitai bot commented Mar 4, 2026

Walkthrough

This pull request modernizes the mediascanner Flutter plugin's Android build infrastructure and enhances media extraction capabilities. Updates include migrating from legacy Groovy Gradle DSL to modern plugins DSL, upgrading Gradle from 7.2 to 8.7, increasing Android compilation SDK to 35 with Java 17 support, refining Kotlin dependencies, improving ID3 tag handling in media extraction, enhancing album cover generation, and updating Flutter/Dart dependencies for null safety.

Changes

Cohort / File(s) Summary
Gradle Build Configuration
packages/mediascanner/android/build.gradle, packages/mediascanner/example/android/app/build.gradle, packages/mediascanner/example/android/build.gradle
Migrates from Groovy buildscript DSL to Gradle plugins DSL; updates compileSdk to 35; adds Java 17 compiler/Kotlin JVM target; replaces kotlin-stdlib-jdk7 with kotlin-stdlib 2.1.0; removes legacy lintOptions in favor of compileOptions.
Gradle Wrapper & Settings
packages/mediascanner/android/gradle/wrapper/gradle-wrapper.properties, packages/mediascanner/example/android/gradle/wrapper/gradle-wrapper.properties
Updates Gradle wrapper from 7.2-bin.zip to 8.7-all.zip and from 5.6.2-all.zip to 8.7-all.zip respectively.
Gradle Project Settings
packages/mediascanner/android/settings.gradle, packages/mediascanner/example/android/settings.gradle
Introduces pluginManagement blocks with repository and plugin declarations (com.android.library v8.6.0, org.jetbrains.kotlin.android v2.1.0, dev.flutter.flutter-plugin-loader); centralizes plugin resolution.
Android Manifests
packages/mediascanner/android/src/main/AndroidManifest.xml, packages/mediascanner/example/android/app/src/main/AndroidManifest.xml
Removes package attribute from mediascanner manifest; removes FlutterApplication wiring and adds android:exported="true" to MainActivity in example app.
Media Extraction Enhancement
packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners/AudioMediaScannerExtractor.kt
Extends media query columns (DISPLAY_NAME, MIME_TYPE); improves ID3 tag handling (reads title and albumArtist from tags); enhances album cover generation with WEBP encoding; refines error handling and caching logic; uses locale-aware string operations.
Kotlin Locale Handling
packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/MediaScanner.kt
Replaces locale-insensitive toLowerCase() with locale-aware lowercase(Locale.getDefault()).
Flutter/Dart Updates
packages/mediascanner/example/lib/main.dart, packages/mediascanner/example/pubspec.yaml
Hardens StreamBuilder error/null handling with early returns and null checks; adds defensive checks for album cover paths; updates Dart SDK constraint to >=2.12.0; upgrades permission_handler to ^12.0.1 and cupertino_icons to ^1.0.8.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~40 minutes

Poem

🐰 Hoppy times ahead!
Old Gradle hops to modern lanes,
ID3 tags now dance with grace,
Album covers bloom in WEBP's embrace,
Kotlin speaks in every locale's tongue,
And Flutter sings with versions young! 🎵

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Path not found' is vague and does not clearly convey the substantial changes made in this pull request, which involve modernizing Gradle configuration, updating dependencies, improving media scanning logic, and enhancing null safety. Provide a more descriptive title that captures the main objective, such as 'Modernize Gradle build configuration and improve media scanner' or 'Update to Gradle 8.7 and enhance Android media scanning logic'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch path_not_found

Comment @coderabbitai help to get the list of available commands and usage tips.

@lstonussi lstonussi marked this pull request as ready for review March 4, 2026 18:01
@lstonussi lstonussi self-assigned this Mar 4, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners/AudioMediaScannerExtractor.kt (1)

257-285: ⚠️ Potential issue | 🟠 Major

Only return local cover path after successful write.

Line 284 assigns coverPath = outputFile.path even when decode/compress fails, which can return a non-existent path and trigger downstream “path not found”.

💡 Proposed fix
-                try {
-                    val bitmap = BitmapFactory.decodeByteArray(coverBytes, 0, coverBytes.size)
-                    if (bitmap != null) {
-                        FileOutputStream(outputFile).use { fos ->
-                            bitmap.compress(Bitmap.CompressFormat.WEBP, 90, fos)
-                        }
-                    }
-                } catch (e: IOException) {
-                    Timber.e(e, "Error")
-                }
-                coverPath = outputFile.path
+                try {
+                    val bitmap = BitmapFactory.decodeByteArray(coverBytes, 0, coverBytes.size)
+                    if (bitmap != null) {
+                        val wrote = FileOutputStream(outputFile).use { fos ->
+                            bitmap.compress(Bitmap.CompressFormat.WEBP, 90, fos)
+                        }
+                        if (wrote && outputFile.exists()) {
+                            coverPath = outputFile.path
+                        }
+                    }
+                } catch (e: IOException) {
+                    Timber.e(e, "Error")
+                }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners/AudioMediaScannerExtractor.kt`
around lines 257 - 285, The code assigns coverPath = outputFile.path even when
decoding/compressing fails, causing downstream "path not found" errors; update
the MediaMetadataRetriever handling in AudioMediaScannerExtractor so you only
set coverPath (the local path) after a successful image decode and write: inside
the block where bitmap is non-null and FileOutputStream/bitmap.compress returns
true (and/or outputFile.exists()), assign coverPath = outputFile.path, otherwise
leave coverPath as the remote URL; ensure exceptions from
BitmapFactory.decodeByteArray and FileOutputStream are caught and do not set
coverPath on failure (reference MediaMetadataRetriever, embeddedPicture, bitmap,
FileOutputStream, outputFile, coverPath).
🧹 Nitpick comments (3)
packages/mediascanner/example/android/app/src/main/AndroidManifest.xml (1)

1-2: Consider removing redundant package attribute.

With AGP 8.x, the namespace is defined in build.gradle (namespace "com.suamusica.mediascanner_example"). The package attribute in the manifest is now redundant and can be removed for consistency with the library module's manifest.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/mediascanner/example/android/app/src/main/AndroidManifest.xml`
around lines 1 - 2, Remove the redundant package attribute from the manifest
element in AndroidManifest.xml: delete the
package="com.suamusica.mediascanner_example" attribute from the <manifest> tag
so the module uses the namespace declared in build.gradle (namespace
"com.suamusica.mediascanner_example"); ensure no other code relies on the
manifest package value and run a build to verify the app id comes from the
Gradle namespace.
packages/mediascanner/android/build.gradle (2)

9-12: Top-level repositories block may be redundant.

With plugin resolution handled in settings.gradle via pluginManagement, you can also add a dependencyResolutionManagement block in settings.gradle for dependency repositories. This centralizes repository configuration and avoids the need for per-module repository declarations.

However, this is not blocking since the current setup works.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/mediascanner/android/build.gradle` around lines 9 - 12, The
top-level repositories block (repositories { google(); mavenCentral() }) in
build.gradle is likely redundant; remove or simplify it and move repository
configuration into settings.gradle by using the dependencyResolutionManagement
block alongside the existing pluginManagement so all modules share the same
repositories. Specifically, eliminate the per-module repositories block in this
file (the repositories declaration) and ensure settings.gradle contains a
dependencyResolutionManagement { repositories { google(); mavenCentral(); } }
entry so the build uses those centralized repositories.

40-40: Remove redundant explicit kotlin-stdlib declaration.

The Kotlin Gradle plugin (version 2.1.0) automatically adds kotlin-stdlib with the same version, making the explicit dependency declaration redundant. Removing it simplifies the build configuration.

Suggested change
-    implementation "org.jetbrains.kotlin:kotlin-stdlib:2.1.0"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/mediascanner/android/build.gradle` at line 40, Remove the redundant
explicit kotlin-stdlib dependency declaration by deleting the line containing
implementation "org.jetbrains.kotlin:kotlin-stdlib:2.1.0" since the Kotlin
Gradle plugin (2.1.0) already injects the matching stdlib; leave all other
dependencies and plugin versions unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners/AudioMediaScannerExtractor.kt`:
- Around line 218-221: The cache lookup uses albumCache[albumId] != null which
treats a cached null (negative lookup) the same as a missing key; change the
check to albumCache.containsKey(albumId) so that a stored null value is honored
and the function returns albumCache[albumId] without re-querying the DB; update
the branch that currently returns when albumCache[albumId] != null to use
albumCache.containsKey(albumId) and keep the existing behavior of returning
albumCache[albumId] when the key exists.
- Around line 152-153: The code calls id3v2Tag.albumArtist.isNotEmpty() which
can be null at runtime; guard the albumArtist platform-type for null before
calling isNotEmpty() — e.g., check id3v2Tag.albumArtist != null &&
id3v2Tag.albumArtist.isNotEmpty() or use a null-safe check like
!id3v2Tag.albumArtist.isNullOrEmpty() and then assign artist =
id3v2Tag.albumArtist when that check passes (preserving the existing logic
comparing to UNKNOWN_ARTIST).

In `@packages/mediascanner/example/pubspec.yaml`:
- Line 9: Update the Dart SDK lower bound in pubspec.yaml to satisfy the
upgraded dependency by changing the sdk constraint from ">=2.12.0 <4.0.0" to a
constraint that includes Dart 3.5 (e.g., ">=3.5.0 <4.0.0"); ensure this aligns
with the permission_handler: ^12.0.1 dependency declared in the dependencies
section so the package resolver no longer fails due to an unsupported SDK lower
bound.

---

Outside diff comments:
In
`@packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners/AudioMediaScannerExtractor.kt`:
- Around line 257-285: The code assigns coverPath = outputFile.path even when
decoding/compressing fails, causing downstream "path not found" errors; update
the MediaMetadataRetriever handling in AudioMediaScannerExtractor so you only
set coverPath (the local path) after a successful image decode and write: inside
the block where bitmap is non-null and FileOutputStream/bitmap.compress returns
true (and/or outputFile.exists()), assign coverPath = outputFile.path, otherwise
leave coverPath as the remote URL; ensure exceptions from
BitmapFactory.decodeByteArray and FileOutputStream are caught and do not set
coverPath on failure (reference MediaMetadataRetriever, embeddedPicture, bitmap,
FileOutputStream, outputFile, coverPath).

---

Nitpick comments:
In `@packages/mediascanner/android/build.gradle`:
- Around line 9-12: The top-level repositories block (repositories { google();
mavenCentral() }) in build.gradle is likely redundant; remove or simplify it and
move repository configuration into settings.gradle by using the
dependencyResolutionManagement block alongside the existing pluginManagement so
all modules share the same repositories. Specifically, eliminate the per-module
repositories block in this file (the repositories declaration) and ensure
settings.gradle contains a dependencyResolutionManagement { repositories {
google(); mavenCentral(); } } entry so the build uses those centralized
repositories.
- Line 40: Remove the redundant explicit kotlin-stdlib dependency declaration by
deleting the line containing implementation
"org.jetbrains.kotlin:kotlin-stdlib:2.1.0" since the Kotlin Gradle plugin
(2.1.0) already injects the matching stdlib; leave all other dependencies and
plugin versions unchanged.

In `@packages/mediascanner/example/android/app/src/main/AndroidManifest.xml`:
- Around line 1-2: Remove the redundant package attribute from the manifest
element in AndroidManifest.xml: delete the
package="com.suamusica.mediascanner_example" attribute from the <manifest> tag
so the module uses the namespace declared in build.gradle (namespace
"com.suamusica.mediascanner_example"); ensure no other code relies on the
manifest package value and run a build to verify the app id comes from the
Gradle namespace.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9b3ab6f8-96a0-4340-b471-23297c3c1ac0

📥 Commits

Reviewing files that changed from the base of the PR and between 7759f93 and f21cfa8.

📒 Files selected for processing (13)
  • packages/mediascanner/android/build.gradle
  • packages/mediascanner/android/gradle/wrapper/gradle-wrapper.properties
  • packages/mediascanner/android/settings.gradle
  • packages/mediascanner/android/src/main/AndroidManifest.xml
  • packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/MediaScanner.kt
  • packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners/AudioMediaScannerExtractor.kt
  • packages/mediascanner/example/android/app/build.gradle
  • packages/mediascanner/example/android/app/src/main/AndroidManifest.xml
  • packages/mediascanner/example/android/build.gradle
  • packages/mediascanner/example/android/gradle/wrapper/gradle-wrapper.properties
  • packages/mediascanner/example/android/settings.gradle
  • packages/mediascanner/example/lib/main.dart
  • packages/mediascanner/example/pubspec.yaml

Comment on lines +152 to +153
if (artist == UNKNOWN_ARTIST && id3v2Tag.albumArtist.isNotEmpty()) {
artist = id3v2Tag.albumArtist
Copy link

@coderabbitai coderabbitai bot Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

find . -type f -name "AudioMediaScannerExtractor.kt" | head -5

Repository: SuaMusica/flutter_plugins

Length of output: 182


🏁 Script executed:

# Once found, let's examine the file around lines 152-153
cat -n packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners/AudioMediaScannerExtractor.kt | sed -n '140,165p'

Repository: SuaMusica/flutter_plugins

Length of output: 1359


🏁 Script executed:

# Check for imports and type definitions
cat -n packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners/AudioMediaScannerExtractor.kt | head -40

Repository: SuaMusica/flutter_plugins

Length of output: 1790


🌐 Web query:

mp3agic ID3v2Tag albumArtist null nullable return type

💡 Result:

In mp3agic, ID3v2#getAlbumArtist() is declared to return a String (not a primitive / not Optional). It is not annotated as @Nullable in the public API. [1]

In practice, mp3agic tag getters commonly return null when the corresponding ID3v2 frame is missing (so you should treat the result as nullable). The concrete implementation is AbstractID3v2Tag#getAlbumArtist(), with signature public String getAlbumArtist(). [2] This “nullable when absent” behavior is also seen with other mp3agic getters (e.g., getLyrics() returning null when not present). [3]

So:

  • Java: return type is String, but you should null-check it.
  • Kotlin: model it as String?.

Sources
[1] mp3agic ID3v2 Javadoc (method summary shows String getAlbumArtist()) (javadoc.io)
[2] mp3agic AbstractID3v2Tag Javadoc (declares public String getAlbumArtist()) (javadoc.io)
[3] mp3agic getter returning null example (getLyrics() returning null) (stackoverflow.com)

Citations:


Guard albumArtist nullability before calling isNotEmpty().

Line 152 can throw NullPointerException at runtime. Although ID3v2#getAlbumArtist() declares a non-nullable return type in mp3agic, the implementation returns null when the corresponding ID3v2 frame is missing. In Kotlin, this is treated as a platform type (String!), and calling .isNotEmpty() without null-checking will crash if the frame is absent.

💡 Proposed fix
-                if (artist == UNKNOWN_ARTIST && id3v2Tag.albumArtist.isNotEmpty()) {
-                    artist = id3v2Tag.albumArtist
-                }
+                id3v2Tag.albumArtist
+                    ?.takeIf { it.isNotBlank() }
+                    ?.let { albumArtist ->
+                        if (artist == UNKNOWN_ARTIST) {
+                            artist = albumArtist
+                        }
+                    }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (artist == UNKNOWN_ARTIST && id3v2Tag.albumArtist.isNotEmpty()) {
artist = id3v2Tag.albumArtist
id3v2Tag.albumArtist
?.takeIf { it.isNotBlank() }
?.let { albumArtist ->
if (artist == UNKNOWN_ARTIST) {
artist = albumArtist
}
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners/AudioMediaScannerExtractor.kt`
around lines 152 - 153, The code calls id3v2Tag.albumArtist.isNotEmpty() which
can be null at runtime; guard the albumArtist platform-type for null before
calling isNotEmpty() — e.g., check id3v2Tag.albumArtist != null &&
id3v2Tag.albumArtist.isNotEmpty() or use a null-safe check like
!id3v2Tag.albumArtist.isNullOrEmpty() and then assign artist =
id3v2Tag.albumArtist when that check passes (preserving the existing logic
comparing to UNKNOWN_ARTIST).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lstonussi comentário interessante do bot.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!

Comment on lines +218 to 221
if (albumCache[albumId] != null) {
// Timber.d("Album $albumId is present in cache")
return albumCache[albumId]
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cd packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners && wc -l AudioMediaScannerExtractor.kt

Repository: SuaMusica/flutter_plugins

Length of output: 102


🏁 Script executed:

cd packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners && sed -n '200,240p' AudioMediaScannerExtractor.kt

Repository: SuaMusica/flutter_plugins

Length of output: 1598


🏁 Script executed:

cd packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners && grep -n "albumCache" AudioMediaScannerExtractor.kt | head -20

Repository: SuaMusica/flutter_plugins

Length of output: 353


Use containsKey() to properly cache negative lookups.

The albumCache intentionally stores null values for not-found albums (lines 215, 251), but the check albumCache[albumId] != null cannot distinguish between "key not in cache" and "key cached with null value". This causes the database query at line 225 to repeat for the same albumId even when a negative lookup was already cached. Replace with containsKey(albumId):

Proposed fix
-        if (albumCache[albumId] != null) {
+        if (albumCache.containsKey(albumId)) {
             // Timber.d("Album $albumId is present in cache")
             return albumCache[albumId]
         }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (albumCache[albumId] != null) {
// Timber.d("Album $albumId is present in cache")
return albumCache[albumId]
}
if (albumCache.containsKey(albumId)) {
// Timber.d("Album $albumId is present in cache")
return albumCache[albumId]
}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/mediascanner/android/src/main/kotlin/com/suamusica/mediascanner/scanners/AudioMediaScannerExtractor.kt`
around lines 218 - 221, The cache lookup uses albumCache[albumId] != null which
treats a cached null (negative lookup) the same as a missing key; change the
check to albumCache.containsKey(albumId) so that a stored null value is honored
and the function returns albumCache[albumId] without re-querying the DB; update
the branch that currently returns when albumCache[albumId] != null to use
albumCache.containsKey(albumId) and keep the existing behavior of returning
albumCache[albumId] when the key exists.


environment:
sdk: ">=2.7.0 <3.0.0"
sdk: ">=2.12.0 <4.0.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

permission_handler 12.0.1 pub.dev minimum SDK requirements

💡 Result:

For permission_handler 12.0.1, pub.dev lists Min Dart SDK: 3.5. [1]

Additional platform notes shown in the package docs/changelog (often relevant when upgrading):

  • Android example/docs use compileSdkVersion 35. [2]
  • Example iOS deployment target was updated to iOS 12.0. [2]

Sources:
[1] permission_handler versions page (shows “Min Dart SDK 3.5” for 12.0.1)
[2] permission_handler 12.0.0+1 changelog (compileSdkVersion 35, iOS deployment target 12.0)


Align Dart SDK lower bound with upgraded dependency requirements.

Line 9 declares >=2.12.0, but permission_handler: ^12.0.1 (Line 15) requires a minimum Dart SDK of 3.5. Update the lower bound to match this requirement.

Suggested update
 environment:
-  sdk: ">=2.12.0 <4.0.0"
+  sdk: ">=3.5.0 <4.0.0"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
sdk: ">=2.12.0 <4.0.0"
environment:
sdk: ">=3.5.0 <4.0.0"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/mediascanner/example/pubspec.yaml` at line 9, Update the Dart SDK
lower bound in pubspec.yaml to satisfy the upgraded dependency by changing the
sdk constraint from ">=2.12.0 <4.0.0" to a constraint that includes Dart 3.5
(e.g., ">=3.5.0 <4.0.0"); ensure this aligns with the permission_handler:
^12.0.1 dependency declared in the dependencies section so the package resolver
no longer fails due to an unsupported SDK lower bound.

@lstonussi lstonussi changed the base branch from master to develop March 5, 2026 14:12
@lstonussi lstonussi changed the base branch from develop to master March 5, 2026 14:13
}

if (albumCache.containsKey(albumId)) {
if (albumCache[albumId] != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

não lembro a explicação dessa mudança, pode explicar aqui?

o bot fez um comentário que pode ser útil: https://github.com/SuaMusica/flutter_plugins/pull/162/changes#r2885284978

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nao quero que seja retornado null, se for null tem que tentar pegar do embedado ou fazer o padrao com /cover/id

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants