-
Notifications
You must be signed in to change notification settings - Fork 19
Re Org android sdk 🧱 #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re Org android sdk 🧱 #180
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
android/src/main/kotlin/com/smileidentity/flutter/SmileIDPlugin.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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 PR reorganizes the Android SDK and Dart plugin code into product-specific packages, replaces platform‐view factories with a generic SmileIDViewFactory
, and updates CI to enforce formatting.
- Moved Kotlin platform‐view and result classes into
products/*
andviews
packages and removed duplicated innerFactory
classes. - Updated Dart widgets under
lib/products/*
to align imports and constructors for platform views. - Added
dart format
check beforeflutter analyze
in the CI workflow.
Reviewed Changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
lib/products/** | Relocated Flutter widgets into product folders and updated doc comments/imports |
android/src/main/kotlin/com/smileidentity/flutter/views/SmileComposablePlatformView.kt | Introduced SmileIDViewFactory and moved views into views package |
android/src/main/kotlin/com/smileidentity/flutter/**/SmileID*.kt | Split product implementations under products/* and wired them to the new factory |
android/src/main/kotlin/com/smileidentity/flutter/SmileIDPlugin.kt | Updated plugin registrations to use the new createFactory methods |
.github/workflows/build.yaml | Added dart format check to the lint step |
Comments suppressed due to low confidence (4)
lib/products/capture/smile_id_document_capture_view.dart:9
- The doc comment mentions the "smart selfie enrollment" flow but this widget captures documents; update to describe the document capture flow correctly.
/// Called when the user successfully completes the smart selfie enrollment flow. The result is a
lib/products/biometric/smile_id_biometric_kyc.dart:61
- The map key uses
contactInfoConsentGranted
while the parameter is namedcontactInformationConsentGranted
. Consider aligning these names to avoid confusion or mismatches on the native side.
"contactInfoConsentGranted": contactInformationConsentGranted,
lib/products/document/smile_id_document_verification.dart:12
- The PR description calls for deprecating
onSuccessJson
/onError
in favor of a typedonResult
callback, but this widget still exposes separateonSuccess
andonError
. Consider updating to the new unified API or marking the old callbacks as deprecated.
final Function(String) onError;
.github/workflows/build.yaml:24
- [nitpick] You may also want to run
flutter format .
to cover Flutter‐specific formatting rules in addition todart format
, ensuring consistent style across Dart and Flutter code.
run: dart format . --set-exit-if-changed && flutter analyze
User description
Story: https://app.shortcut.com/smileid/story/xxx
Summary
We need to deprecate use of
onSuccessJson
andonError
, and replace this withonResult(result: T)
which wraps both the success and error responses - and uses proper types and not pass back a string that needs to be encoded again into a type. This will make it easier for partners to implement the sdk without having to worry about any response changes from the sdk sideKnown Issues
Any shortcomings in your work. This may include corner cases not correctly handled or issues related
to but not within the scope of your PR. Design compromises should be discussed here if they were not
already discussed above.
Test Instructions
Concise test instructions on how to verify that your feature works as intended. This should include
changes to the development environment (if applicable) and all commands needed to run your work.
Screenshot
If applicable (e.g. UI changes), add screenshots to help explain your work.
PR Type
Enhancement
Description
• Reorganized Android SDK code into product-specific packages
• Moved platform view classes to dedicated views package
• Consolidated mapper functions into single file
• Updated import statements across all affected files
Changes walkthrough 📝
13 files
Updated imports and variable naming
Added comprehensive mapper functions
Moved to biometric product package
Moved to capture product package
Moved to capture product package
Moved to document product package
Moved to enhanced document verification package
Moved to enhanced selfie package
Moved to enhanced selfie package
Moved to selfie product package
Moved to selfie product package
Moved to views package
Moved to views package