You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/mobile/flutter/index.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ hidden: false
9
9
> warning "Updated package for pilot users"
10
10
> If you've been using Analytics-Flutter since the pilot phase, see [Upgrading from pilot](#upgrading-from-pilot) to use the updated version of Analytics-Flutter.
11
11
12
-
Analytics-Flutter enables you to seamlessly add Segment analytics to your Flutter app.
12
+
Analytics-Flutter lets you add Segment analytics to your Flutter app.
13
13
14
14
### Supported platforms
15
15
Analytics-Flutter supports these platforms:
@@ -383,7 +383,7 @@ You can use these plugins to meet your tracking needs:
383
383
384
384
## Controlling upload with flush policies
385
385
386
-
You can use `FlushPolicies` to more granurily control when events upload.
386
+
You can use `FlushPolicies` to more granularly control when events upload.
387
387
388
388
A flush policy defines the strategy for deciding when to flush. This can be on an interval, on a certain time of day, after receiving a certain number of events, or even after receiving a particular event. This gives you more flexibility on when to send events to Segment.
389
389
@@ -426,14 +426,14 @@ if (isConnected) {
426
426
427
427
You can create a custom `FlushPolicy`for your application needs by implementing the `FlushPolicy` interface. You can also extend the `FlushPolicyBase` class that already creates and handles the `shouldFlush` value reset.
428
428
429
-
A `FlushPolicy` only needs to implement 1 method:
429
+
A `FlushPolicy` only needs to implement one method:
430
430
- `onEvent(RawEvent event)`: Gets called on every event tracked by your client.
431
431
432
432
A `FlushPolicy` can optionally implement:
433
433
- `reset()`: Calls after a flush is triggered either by your policy, by another policy, or manually.
434
434
- `start()`: Executes when the flush policy is enabled and added to the client. This is a good place to start background operations, make async calls, and configure things before execution.
435
435
436
-
The `FlushPolicy` should have a `shouldFlush` boolean value. When this is set to true, the client attempts to upload events. Each policy should reset this value to `false` according to its own logic, although it's pretty common to do it inside the `reset` method.
436
+
The `FlushPolicy` should have a `shouldFlush` boolean value. When this is set to `true`, the client attempts to upload events. Each policy should reset this value to `false` according to its own logic, although it's pretty common to do it inside the `reset` method.
You can handle analytics client errors through the `errorHandler` option.
504
504
505
-
The error handler configuration receives a function which gets called whenever an error happens on the analytics client. It receives an Exception, that extends one of the errors from [errors.dart](https://github.com/segmentio/analytics_flutter/blob/main/packages/core/lib/errors.dart){:target="_blank"}.
505
+
The error handler configuration receives a function which gets called whenever an error happens on the analytics client. It receives an Exception that extends one of the errors from [errors.dart](https://github.com/segmentio/analytics_flutter/blob/main/packages/core/lib/errors.dart){:target="_blank"}.
506
506
507
-
You can use this error handling to trigger different behaviors in the client when a problem occurs. For example if the client gets rate limited, you could use the error handler to swap flush policies to be less aggressive.
507
+
You can use this error handling to trigger different behaviors in the client when a problem occurs. For example, if the client gets rate limited, you could use the error handler to swap flush policies to be less aggressive.
0 commit comments