File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
packages/analytics/amplify_analytics_pinpoint_dart/lib/src/impl/analytics_client Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,12 @@ class AnalyticsClient {
38
38
this ._eventClient,
39
39
this ._eventCreator,
40
40
this ._endpointClient,
41
- );
41
+ ) {
42
+ _autoEventSubmitter = StoppableTimer (
43
+ duration: const Duration (seconds: 10 ),
44
+ callback: flushEvents,
45
+ );
46
+ }
42
47
43
48
static AnalyticsClient ? _instance;
44
49
@@ -113,10 +118,7 @@ class AnalyticsClient {
113
118
static const String _sessionStartEventType = '_session.start' ;
114
119
static const String _sessionStopEventType = '_session.stop' ;
115
120
116
- late final StoppableTimer _autoEventSubmitter = StoppableTimer (
117
- duration: const Duration (seconds: 10 ),
118
- callback: flushEvents,
119
- );
121
+ late final StoppableTimer _autoEventSubmitter;
120
122
121
123
/// Send all cached events to AWS Pinpoint
122
124
Future <void > flushEvents () async {
You can’t perform that action at this time.
0 commit comments