guavasure_flutter 0.1.8
guavasure_flutter: ^0.1.8 copied to clipboard
Embed GuavaSure pet insurance in Flutter via WebView.
0.1.8 #
Added #
onGoBackonGuavaSureEmbed— called when the embed mobile nav back button is tapped on the home screen ({ "type": "go-back" }). Requires partner customizationuiStyle.mobileNav: enabledon the hosted embed.isGoBackBridgeMessage/handleGoBackBridgeMessageexported for custom WebView hosts.
Migration from 0.1.7 #
- Bump
guavasure_flutterto^0.1.8. - Run
flutter pub getandpod install(iOS). - If mobile nav is enabled for your partner, wire
onGoBackonGuavaSureEmbed(e.g.Navigator.of(context).maybePop()).
0.1.7 #
Fixed #
- Bumped
permission_handlerto^12.0.1so the plugin resolves alongside host apps that already depend onpermission_handler12.x (e.g.^12.0.1). Versions0.1.5–0.1.6pinned^11.3.1, which blockedflutter pub getwhen a partner app required a newer major.
Requirements #
- Android:
compileSdkVersion35 or higher (required bypermission_handler12.x). Most Flutter 3.24+ templates already satisfy this.
Migration from 0.1.6 #
- Bump
guavasure_flutterto^0.1.7. - Run
flutter pub getandpod install(iOS). - If Android build fails on SDK version, set
compileSdk = 35inandroid/app/build.gradle(orandroid { compileSdk = 35 }inandroid/app/build.gradle.kts).
0.1.6 #
Added #
GuavaSureEmbedConfig.partnerExternalId— when set, embed URLs includepartner-external-idso the hosted embed can lock to a single matching pet (same stable ID used incustomer-auth-tokenpet upserts). If no Guava ID matches, multi-pet behavior is unchanged.
Migration from 0.1.5 #
- Bump
guavasure_flutterto^0.1.6. - Optionally pass
partnerExternalIdonGuavaSureEmbedConfigwhen opening the embed for a specific pet.
0.1.5 #
Added #
- Native Razorpay Checkout via
razorpay_flutterwhenopen-paymentincludeskey+orderId/subscriptionId(plus optionalamountPaise,currency,name,description,prefill). - Payment cascade: native SDK → Custom Tab / Safari → external browser.
launchGuavaSurePaymentexported for first-party and custom WebView hosts.- Unit tests for native payload parsing (
canOpenNativeCheckout, bridge fields). - Native camera capture bridge for nose photos on Flutter WebView hosts:
capture-photo,camera-permission, andopen-camera-settings. - Just-in-time camera permission prompts, Settings deep-link on permanent deny, and chunked base64 delivery of captured images back to the embed.
- Unit tests for camera bridge message parsing.
Changed #
- Native cancel/failure no longer auto-opens a payment URL (avoids double checkout).
- Embed reload after native success (same as browser-return path).
OpenPaymentRequestextended with Razorpay native checkout fields.
Requirements #
- Hosted embed must send
key+orderId/subscriptionIdonopen-payment(current GuavaSure embed; no app-side change beyond upgrading the plugin). - Host app must declare camera usage:
- Android:
CAMERApermission inAndroidManifest.xml - iOS:
NSCameraUsageDescriptioninInfo.plistandPERMISSION_CAMERA=1in the Podfile preprocessor definitions
- Android:
- Hosted embed must include the Flutter WebView camera capture path
(
platform=flutter-webview+GuavasureBridge). - iOS: run
pod installafter upgrading. - Android: Custom Tabs
<queries>entry still required for URL fallback only.
Migration from 0.1.4 #
- Bump
guavasure_flutterto^0.1.5inpubspec.yaml. - Run
flutter pub getandpod install(iOS). - Add camera permission strings / manifest entries / Podfile macro (see README).
- Cold-start the app; verify debug logs show
native=trueon Pay and nose capture opens the native camera. - No API or backend changes required for standard Razorpay checkout.
0.1.4 #
- Re-authenticate with a fresh partner JWT when reloading the embed after Razorpay return (re-resolves via
partnerAuthTokenProvider). - Ignore spurious app lifecycle resume events within 2s of opening a payment link.
- Open Razorpay links in the external browser on desktop (macOS, Windows, Linux) to avoid spurious reloads from in-app browser sheets.