Update plugin for Flutter 3.44.2 / Dart 3.12.2 compatibility - #208
Open
47gurvinder wants to merge 8 commits into
Open
Update plugin for Flutter 3.44.2 / Dart 3.12.2 compatibility#20847gurvinder wants to merge 8 commits into
47gurvinder wants to merge 8 commits into
Conversation
- Bump SDK constraints in pubspec.yaml (plugin and example) to support
Dart 3 / Flutter 3.3+, replacing the pre-null-safety constraints that
failed `pub get` on current Flutter.
- Android: drop deprecated jcenel()/jcenter(), bump AGP 4.1.0 -> 8.11.1,
Gradle wrapper 6.5 -> 8.14, compileSdk/targetSdk -> 36, ndkVersion ->
28.2.13676358, Java 8 -> 11, and migrate example's Gradle files to the
modern pluginManagement/plugins{} DSL required by current Flutter
tooling. Add the now-required android:exported="true" on MainActivity.
- iOS: bump podspec deployment target 8.0 -> 12.0 to match current
Xcode/Flutter minimums.
- Dart: migrate example/lib/main.dart to null safety and the current
image_picker v1 API (ImagePicker().pickVideo() returning XFile?).
Drop an unnecessary import in lib/video_thumbnail.dart.
- Tests: fix test/video_thumbnail_test.dart to use the current
flutter_test mock-channel binding API and correct a stale assertion
key that the old (broken) binding had been masking.
Verified with flutter analyze, flutter test, and flutter build apk
--debug on Flutter 3.44.2 / Dart 3.12.2.
Add Flutter/ephemeral/ (iOS) and other entries current `flutter create` ignores, so generated files like Flutter/ephemeral/flutter_lldbinit don't show up as untracked. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR modernizes the video_thumbnail Flutter plugin and its example app to align with newer Flutter/Dart toolchains (Flutter 3.44.2 / Dart 3.12.2), including updates to platform build configurations and example dependencies.
Changes:
- Updated pubspec SDK constraints / lockfiles and modernized example app code for null-safety & current plugin APIs.
- Migrated Android/iOS example project configuration to newer Gradle/AGP and Xcode/CocoaPods templates.
- Updated tests to use the current MethodChannel name + modern mock handler APIs.
Reviewed changes
Copilot reviewed 21 out of 25 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| test/video_thumbnail_test.dart | Updates channel name and MethodChannel mocking to current Flutter test APIs. |
| pubspec.yaml | Bumps Dart/Flutter SDK constraints for the plugin package. |
| pubspec.lock | Refreshes resolved dependency versions for the new SDK range. |
| lib/video_thumbnail.dart | Removes an import (per PR description) while keeping the public API intact. |
| ios/video_thumbnail.podspec | Raises iOS deployment target for compatibility with modern Flutter/iOS toolchains. |
| example/pubspec.yaml | Updates example SDK constraints and moves runtime deps into dependencies. |
| example/pubspec.lock | Refreshes example dependency resolution for the new SDK range. |
| example/lib/main.dart | Migrates example app code to null-safety and newer image_picker APIs. |
| example/ios/Runner/Info.plist | Syncs Info.plist with current flutter create defaults. |
| example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings | Removes stale workspace settings file. |
| example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme | Updates scheme settings to current Flutter/Xcode defaults. |
| example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata | Updates workspace reference format. |
| example/ios/Runner.xcodeproj/project.pbxproj | Updates Xcode project settings (deployment target, frameworks, build phases) for current Flutter. |
| example/ios/Podfile | Migrates Podfile to current Flutter pod helper approach. |
| example/ios/Podfile.lock | Refreshes pods resolution for updated iOS dependencies/tooling. |
| example/ios/Flutter/AppFrameworkInfo.plist | Removes old MinimumOSVersion entry consistent with updated deployment targets. |
| example/ios/.gitignore | Ignores Flutter ephemeral iOS outputs. |
| example/android/settings.gradle | Migrates to pluginManagement + flutter plugin loader. |
| example/android/gradle/wrapper/gradle-wrapper.properties | Updates Gradle wrapper for current AGP. |
| example/android/gradle.properties | Adds Flutter migrator flags for Kotlin/new DSL behavior. |
| example/android/build.gradle | Migrates repositories + modernizes the clean task. |
| example/android/app/build.gradle | Migrates to plugins DSL + modern Android config (namespace, compileSdk, etc.). |
| example/android/app/src/main/AndroidManifest.xml | Adds android:exported required by modern Android. |
| example/.gitignore | Aligns ignores with current Flutter output layout. |
| android/build.gradle | Updates plugin Android module buildscript/repos and Android SDK settings. |
Files not reviewed (1)
- example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@justsoft Could you please merge this? |
…tation, and examples for the new package name. Preserve original license and credits. Increase Gradle heap limit for compatibility with current Flutter builds.
…homepage, and add funding link
- Changed Android and iOS plugin identifiers to allow coexistence with the original video_thumbnail package. - Updated Android build.gradle and AndroidManifest.xml to reflect new package names. - Removed old VideoThumbnailPlugin implementation and added VideoThumbnailGdxPlusPlugin for iOS. - Updated Podfile.lock and pubspec.lock to version 0.5.8. - Adjusted Dart files to use new method channel names and updated plugin class references.
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
flutter createoutput, so generated files likeFlutter/ephemeral/flutter_lldbinitaren't tracked as untracked changesTest plan
flutter pub getsucceeds in both root and example/