Skip to content

feat(flutter): Create flutter SDK wrapper#9

Merged
igorgsduarte merged 9 commits intomainfrom
feat/flutter-plugin
Feb 5, 2026
Merged

feat(flutter): Create flutter SDK wrapper#9
igorgsduarte merged 9 commits intomainfrom
feat/flutter-plugin

Conversation

@igorgsduarte
Copy link
Contributor

No description provided.

@igorgsduarte igorgsduarte self-assigned this Feb 5, 2026
Copilot AI review requested due to automatic review settings February 5, 2026 18:33
…ndencies

- Added a custom messaging service to handle notifications for the Dito SDK, delegating specific notifications to the native SDK and others to FlutterFire.
- Updated the Dito SDK dependency version in the build.gradle file.
- Included necessary permissions in the AndroidManifest.xml for internet access and posting notifications.
- Created a new DitoMessagingServiceHelper to manage notification handling and token updates.
- Adjusted sample application to reflect changes in messaging service and removed deprecated debug initialization code.
…and React Native

- Reorganized the release workflows for Flutter, iOS, and React Native to streamline the version extraction and changelog generation processes.
- Removed redundant validation steps and integrated direct version and changelog extraction from tags.
- Enhanced the GitHub release creation step to check for existing releases and skip creation if a release already exists.
- Updated environment variable handling for version names and changelogs to improve clarity and maintainability.
…on tracking in Android and iOS

- Added detailed instructions for configuring background notification tracking in Android, including necessary changes to `AndroidManifest.xml` and `build.gradle.kts`.
- Included optional configuration for iOS in `Info.plist` to support background notification tracking.
- Updated troubleshooting sections for both Android and iOS to address issues with receiving notifications in the background.
- Enhanced clarity on the importance of API keys and secrets for proper SDK functionality in background scenarios.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request creates a comprehensive Flutter SDK wrapper for the Dito platform, introducing native integration patterns, comprehensive migration documentation, and streamlined CI/CD workflows.

Changes:

  • Adds Flutter SDK wrapper with platform-specific native integrations for Android push notification handling
  • Introduces extensive migration documentation including step-by-step guides and AI-assisted migration prompts
  • Refactors CI/CD workflows to consolidate jobs and improve release automation with automatic workflow triggers
  • Updates sample application with improved FCM handling, credential management, and debug messaging

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
flutter/sample_application/pubspec.yaml Adds publish_to: none to prevent accidental publication
flutter/sample_application/lib/sections/token_section.dart Updates UI text to clarify "Push received in Dart" and removes redundant error checking
flutter/sample_application/lib/sample_app_state.dart Simplifies FCM initialization, adds platform-specific permission handling, and improves debug messaging
flutter/sample_application/lib/main.dart Simplifies background handler by removing SDK initialization (now handled natively)
flutter/sample_application/lib/dito_sample_screen.dart Removes deprecated initFcmDebug() call
flutter/sample_application/android/settings.gradle.kts Adds centralized dependency resolution management
flutter/sample_application/android/build.gradle.kts Removes GitHub maven repository (no longer needed)
flutter/sample_application/android/app/src/main/kotlin/br/com/dito/example/sample_application/CustomMessagingService.kt Implements custom messaging service that delegates Dito notifications to native SDK
flutter/sample_application/android/app/src/main/AndroidManifest.xml Adds Dito credentials configuration via manifest placeholders and registers custom messaging service
flutter/sample_application/android/app/build.gradle.kts Adds credential injection logic and Firebase dependencies
flutter/android/src/main/kotlin/br/com/dito/ditosdk/DitoSdkPlugin.kt Adds thread-safety with volatile flag and dual channel support ("DITO"/"Dito")
flutter/android/src/main/kotlin/br/com/dito/ditosdk/DitoMessagingServiceHelper.kt Creates new helper for push notification delegation
flutter/android/src/main/AndroidManifest.xml Adds required Android permissions (INTERNET, POST_NOTIFICATIONS)
flutter/android/build.gradle Updates Dito SDK dependency to 3.1.1 and standardizes jvmTarget
flutter/README.md Expands documentation with Android/iOS configuration details and troubleshooting guides
flutter/MIGRATION_PROMPTS.md Adds AI-assisted migration prompts for automated migration using Cursor AI
flutter/MIGRATION.md Adds comprehensive migration guide with step-by-step instructions
android/CHANGELOG.md Adds new changelog file (content appears mismatched with PR scope)
.github/workflows/release-*.yml Consolidates workflow jobs and adds automatic workflow triggering
.github/workflows/prepare-releases.yml Adds automatic workflow dispatch after semantic-release creates tags
.github/workflows/melos-ci.yml.example Removes example CI workflow file
.github/workflows/android.yml Simplifies Android CI by removing complex change detection logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…urations

- Changed references from 'example' to 'sample_application' in both flutter.yml and release-flutter.yml workflows to align with the new project structure.
- Updated the pubspec.yaml file to reflect the change in the workspace directory from 'example' to 'sample_application'.
- Deleted the pubspec.lock file to reset dependency resolution.
- Added a resolution directive in pubspec.yaml to specify workspace resolution for dependencies.
@igorgsduarte igorgsduarte requested a review from Copilot February 5, 2026 18:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 22 out of 23 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…steps to release workflow

- Implemented a validation step to ensure the version in pubspec.yaml matches the tag version before publishing.
- Added a verification step to check if the published version is indexed on pub.dev, providing feedback on the publication status.
- Enhanced logging for version and tag information during the publishing process.
- Modified the SDK constraints in both the main and sample application pubspec.yaml files to support a broader range of Flutter and Dart versions.
- Updated the Dart SDK requirement to '>=3.5.0 <4.0.0' and adjusted the Flutter SDK requirement accordingly.
- Introduced a configuration step in both `flutter.yml` and `release-flutter.yml` workflows to set Flutter to run without analytics and CLI animations.
- This enhancement aims to streamline the CI process by reducing unnecessary output and improving performance during builds.
- Updated the flutter_lints dependency from version ^6.0.0 to ^5.0.0 in both the main and sample application pubspec.yaml files to ensure compatibility with existing code.
- Refactored error handling in DitoSdk methods to throw mapped native errors instead of rethrowing PlatformExceptions, improving error management and clarity in the SDK.
@igorgsduarte igorgsduarte merged commit b12c4e6 into main Feb 5, 2026
1 check passed
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.

1 participant