x-app-sdk 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +6 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -236,11 +236,13 @@ closeApp({ result: 'success', data: 'some data' });
236
236
  #### `listenFocusEvent(callback)`
237
237
  Lắng nghe sự kiện focus vào mini app.
238
238
  ```js
239
- import { listenFocusEvent } from 'x-app-sdk';
239
+ import { fltSDK, listenFocusEvent } from 'x-app-sdk';
240
240
 
241
- const unsubscribe = listenFocusEvent((data) => {
242
- console.log('Mini app đang được focus');
243
- });
241
+ const handelEVventFocus = (event: FlutterMessageResponse) => {
242
+ console.log("focus:", new Date())
243
+ }
244
+
245
+ const unsubscribeFocus = listenFocusEvent(handelEVventFocus, fltSDK);
244
246
 
245
247
  // Để hủy lắng nghe
246
248
  unsubscribe();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-app-sdk",
3
3
  "private": false,
4
- "version": "1.4.1",
4
+ "version": "1.4.2",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",