bemall_sdk 1.1.8 copy "bemall_sdk: ^1.1.8" to clipboard
bemall_sdk: ^1.1.8 copied to clipboard

Flutter SDK for BeMall Promotion and Loyalty Club services.

Changelog #

1.1.8 #

  • Flutter: dartdoc comments on the whole public API of bemall_sdk, enforced by the public_member_api_docs lint.

  • Ready-made navbar drawn by the SDK (title, colors and back arrow, no native code in the app): iOS BeMallSdk.shared.navBarStyle = BeMallNavBarStyle(...), Android BeMallSdk.navBarStyle = BeMallNavBarStyle(...), Flutter navBar: BeMallNavBar(...) and Capacitor navBar: { title, color, textColor, height } on initialize and open. The strip height comes from the navbar, so topInset is not needed. A custom BeMallSdk.navBar view (Android) or topInset plus an own window (iOS) keeps working and, on Android, takes precedence.

  • Flutter: the navbar can also be an own widget, drawn on a second Flutter engine inside the top strip: navBar: BeMallNavBar.widget(entrypoint: ...), with BeMallNavBar.close() to close the SDK from inside the widget.

  • Biometrics (Face ID / Touch ID / fingerprint) is now opt-in: new biometricsEnabled (iOS BeMallSdk.shared, Android BeMallSdk), default false. Before, the SDK offered it after every login. Flutter and Capacitor expose it as biometricsEnabled on initialize and open.

  • Breaking: campaignHash is now required for loyalty_club, enforced at compile time. BeMallSdkConfig is built with BeMallSdkConfig.promotion(...) or BeMallSdkConfig.loyaltyClub(customerId, campaignHash, ...) (iOS, Android, Flutter) and the Capacitor BeMallSdkConfig is a union by service. The generic initializer is no longer public. Bridges still reject a missing hash at runtime with campaign_hash_required, instead of opening the campaign list with no authenticated customer.

  • dispose()/reset() now also clear the tenant's localStorage/sessionStorage (before: cookies only, iOS and Android). Stale web storage could leave the next initialize with a new token stuck on "Por favor aguarde, processando...".

  • Android: R8 renamed BeMallSdkConfig.Companion, so Kotlin apps could not resolve BeMallSdkConfig.promotion(...) / loyaltyClub(...) (Unresolved reference). consumer-rules.pro now keeps BeMallSdkConfig$*.

  • iOS: dragging from the left edge now closes the SDK when the page has no history to go back to (the WKWebView still goes back in history first), matching the Android system back gesture.

1.1.7 #

  • New error authorization_unreachable when the token validation request gets no HTTP response (network, DNS or certificate). Before, it was reported as invalid_customer_access_token, which looked like a bad token.
  • Loyalty Club: when customerAccessToken is provided, the URL is now /loyaltyclub/mobile/auth?token=<token> (iOS and Android; wrappers inherit it).
  • Loyalty Club without a token now opens /loyaltyclub/mobile/<campaignHash>/home (campaign home) instead of the root; a blank token never adds token= to the URL.
  • New onUnauthenticated (iOS BeMallSdk.shared.onUnauthenticated, Android BeMallSdk.onUnauthenticated) and event unauthenticated (Flutter, Capacitor): Promotion opened without an authenticated user (e.g. no token) asks for logout and there is no session. By default the SDK clears the site data (cache, cookies, storage), unloads the page and opens the campaign root (/promotion/mobile/<hash>/), once per opening. The host app is notified once; it does not close itself, the host app decides, e.g. calling close().
  • initialize without customerAccessToken now always opens logged out: any previous session (cookies, site data, saved config, biometrics) is discarded first (iOS and Android).
  • Flutter: initialize and open now accept mktOptIn (accepted, rejected or ask), same as the iOS, Android and Capacitor SDKs.
  • New topInset and navBar on Android (BeMallSdk.topInset, in dp, and BeMallSdk.navBar, a factory for the navbar View): the SDK reserves a strip at the top of its screen and fits the app's navbar into it, matching the iOS topInset.
  • Flutter and Capacitor: initialize and open accept topInset (iOS and Android), so the host app can draw its own native navbar. Examples updated.
  • Docs: new "Referência" section in every guide (configuration, login behavior, session, errors, fbclid/utm_id).

1.1.6 #

  • New close() (iOS BeMallSdk.shared.close(), Android BeMallSdk.close(), Capacitor BeMall.close(), Flutter close()) closes the SDK screen keeping the session, so the host app can offer its own close control. The webapp can also close it by posting on_close to BeMallChannel.
  • iOS/Android: when the webapp opens the scanner with scan_barcode, the live scanner captures automatically when a non-fiscal code (e.g. a parking ticket) is detected. Purchase registration (handle_pictures / handle_pictures_upload) never captures automatically. Detection rule: the same code must appear in consecutive frames (5 on iOS, 3 on Android), with no tap on the capture button. Fiscal (SEFAZ) codes still use the capture button. The scanner shows visual feedback (only in this automatic mode): a green frame over the detected code, a "Lendo ticket…" label while reading and "Código lido" when the capture starts.
  • iOS: new BeMallSdk.shared.topInset reserves a strip at the top of the SDK screen (below the status bar) so the host app can draw its own navigation bar without covering the webapp.
  • The WebView now sets the cookies webapp_app_version (host app version name), webapp_app_id (package name / bundle id) and webapp_app_platform (android or ios) so the web can tell if the app is outdated.
  • Attribution: fbclid and utm_id (sent by Meta/Instagram) are now captured from deep links, push extras and MMP payloads (iOS, Android and wrappers) and forwarded to the page like the other utm_* fields. Values are sanitized and limited to 255 characters.
  • Capacitor: the package now supports Capacitor 5.7+ as well as 6+. Android hosts must use Java 17, Kotlin 2.x, minSdk 24 and compileSdk 34 or newer; iOS hosts must target iOS 14.0 or newer.

1.1.4 (iOS only) #

  • iOS: fixed the WebView opening zoomed in until the user pinches. WKWebView computes its initial zoom from the frame at load() time; since load() ran from an async prepareSession callback that could fire before the first Auto Layout pass, the frame was still .zero. Now forces view.layoutIfNeeded() right before load().

1.1.3 (iOS only) #

  • iOS: the live scanner already fell back to the first code read when none matched the SEFAZ format; the gallery/photo-library picker (processImage, behind handle_pictures/ scan_barcode) did not and silently dropped non-fiscal barcodes (e.g. a parking ticket). Now it falls back too. Added the same debug logs (tag [BeMallQrDebug], prefixed gallery) for the raw code, the fallback pick and "no barcode detected".

1.1.2 #

  • Android: when no code matches the SEFAZ format, uses the first code read (e.g. a parking ticket barcode) instead of discarding the scan. Added debug logs (tag BeMallQrDebug) for the raw code, the fallback pick and "no barcode detected".

1.1.1 #

  • Breaking: BeMallUtm.custom is now a key/value map (Map<String, String> on Android, [String: String] on iOS, Map<String, String> on Flutter, Record<string, string> on Capacitor) instead of a free-text string. Each pair is sent as its own utm_custom_<key> query parameter instead of a single utm_custom. Keys are lowercased and limited to letters, numbers and _ (max 100 characters); values are sanitized like the other UTM fields (max 255 characters).
  • Added mktOptIn on Android and iOS: the host app sets the user's marketing consent ("ask", "accepted" or "rejected"; anything else is ignored) and it is sent as mkt_opt_in. It is independent from BeMallUtm; a captured origin with mkt_opt_in (deep link, extras/userInfo, attribution service) takes priority over it.

1.1.0 #

  • Added BeMallUtm and the optional utm: argument of initialize and open to send the source of the visit (source, medium, campaign, term, content and a free-text custom). Without it the SDK sends the app name, app and the promotion hash.

1.0.0 #

  • Unified public API for Promotion and Loyalty Club.
  • Native URL resolution and secure persisted customer session lifecycle.
  • One precompiled AAR and one XCFramework.
  • Native camera/gallery, QR/barcode, parking-ticket and receipt-upload parity.
2
likes
140
points
158
downloads

Documentation

API reference

Publisher

verified publisherbesistemas.com.br

Weekly Downloads

Flutter SDK for BeMall Promotion and Loyalty Club services.

Repository

License

unknown (license)

Dependencies

flutter

More

Packages that depend on bemall_sdk

Packages that implement bemall_sdk