fix: comprehensive bug fixes for Android, iOS, and Dart#11
Closed
yowanda wants to merge 1 commit into
Closed
Conversation
- Android: Replace deprecated FlutterRenderer.getBitmap() with PixelCopy API (API 26+) with drawing cache fallback for older devices - Android: Proper error handling via result.error() instead of silently returning null - Android: Remove unnecessary WRITE_EXTERNAL_STORAGE permission (file saved to cache dir) - Android: Remove deprecated setDrawingCacheEnabled and useless reloadMedia() for cache dir - Android: Remove unused PixelListener class (dead code) - Android: Remove duplicate import and unused imports - iOS: Fix date format bug (mm -> MM) causing incorrect month in filenames - iOS: Fix force unwrap crash by safely resolving rootViewController with SceneDelegate support (iOS 13+) - iOS: Update podspec with correct version, description, homepage, and author - Dart: Remove redundant const in MethodChannel constructor - README: Fix typo semicolon -> colon in requestLegacyExternalStorage Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Perbaikan menyeluruh untuk bug dan masalah di plugin ini, mencakup platform Android, iOS, dan Dart.
Changes
Critical Fixes
Android: Replace deprecated
FlutterRenderer.getBitmap()— Diganti denganPixelCopyAPI (API 26+) yang modern, dengan fallback ke drawing cache untuk device lama.getBitmap()sudah dihapus di Flutter terbaru dan menyebabkan crash.Android: Proper error handling —
result.success(null)yang silent diganti denganresult.error()yang informatif, sehingga developer bisa tahu penyebab error.iOS: Fix date format bug —
mm(menit) diganti keMM(bulan) diDateFormatter, mencegah filename collision dan nama file yang salah.iOS: Fix force unwrap crash — Triple force unwrap
app.delegate!.window!!.rootViewController as!diganti dengan safe resolution yang supportSceneDelegate(iOS 13+).Medium Fixes
Android: Remove
WRITE_EXTERNAL_STORAGEpermission — Tidak diperlukan karena file disimpan ke internal cache directory.Android: Remove deprecated
setDrawingCacheEnabled— Deprecated sejak API 28, tidak melakukan apa-apa di Android 9+.Android: Remove useless
reloadMedia()—ACTION_MEDIA_SCANNER_SCAN_FILEtidak bisa mengakses cache directory dan deprecated di Android 10+.Android: Remove unused
PixelListenerclass — Dead code yang tidak pernah digunakan.iOS: Update podspec — Version, summary, description, homepage, dan author diupdate dari placeholder default.
Minor Fixes
Dart: Remove redundant
const—const MethodChannel(const ...)→const MethodChannel(...)README: Fix typo —
android;requestLegacyExternalStorage→android:requestLegacyExternalStorage(semicolon → colon)Android: Remove duplicate import —
MethodChannel.Resultdiimport 2 kali.Testing
PixelCopyAPI yang sudah terbukti stabil sejak API 26 (Android 8.0)connectedScenesAPI yang tersedia sejak iOS 13