Skip to content

Commit b132670

Browse files
Merge remote-tracking branch 'upstream/main' into fix/screen_view_params
2 parents a73915e + 418e2f6 commit b132670

File tree

6 files changed

+24
-21
lines changed

6 files changed

+24
-21
lines changed

packages/core/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.1.8
2+
3+
- Reverting fix for #152
4+
15
## 1.1.7
26

37
- Fix for setFlushPolicies method is overwriting Configuration properties #144

packages/core/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,10 @@ See the [example app](../../example/README.md) to check a full test app of how t
578578

579579
## Release Notes
580580

581+
### Version 1.1.8 (10 Jul 2025)
582+
583+
Reverting fix for #152
584+
581585
### Version 1.1.7 (21 May 2025)
582586

583587
1. **Fixes Github Issue [#144](https://github.com/segmentio/analytics_flutter/issues/144)** - Up to version 1.1.6, the `setFlushPolicies` method inadvertently overwrote the `Configuration.collectDeviceId`property. This issue has been resolved in version 1.1.7.

packages/core/lib/analytics.dart

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ class Analytics with ClientMethods {
6969
addPlugin(segmentDestination);
7070
}
7171

72-
if(config.token != null) {
72+
if (config.token != null) {
7373
_platformPlugins.add(InjectToken(config.token!));
7474
}
7575

@@ -210,30 +210,26 @@ class Analytics with ClientMethods {
210210

211211
@override
212212
Future track(String event, {Map<String, dynamic>? properties}) async {
213-
await _process(TrackEvent(event, properties: properties ?? {},
214-
integrations: _state.integrations.state)); // Patch for Github Issue #152
213+
await _process(TrackEvent(event, properties: properties ?? {}));
215214
}
216215

217216
@override
218217
Future screen(String name, {Map<String, dynamic>? properties}) async {
219-
final event = ScreenEvent(name, properties: properties ?? {},
220-
integrations: _state.integrations.state); // Patch for Github Issue #152
218+
final event = ScreenEvent(name, properties: properties ?? {});
221219

222220
await _process(event);
223221
}
224222

225223
@override
226224
Future identify({String? userId, UserTraits? userTraits}) async {
227-
final event = IdentifyEvent(userId: userId, traits: userTraits,
228-
integrations: _state.integrations.state); // Patch for Github Issue #152
225+
final event = IdentifyEvent(userId: userId, traits: userTraits);
229226

230227
await _process(event);
231228
}
232229

233230
@override
234231
Future group(String groupId, {GroupTraits? groupTraits}) async {
235-
final event = GroupEvent(groupId, traits: groupTraits,
236-
integrations: _state.integrations.state); // Patch for Github Issue #152
232+
final event = GroupEvent(groupId, traits: groupTraits);
237233

238234
await _process(event);
239235
}
@@ -242,8 +238,7 @@ class Analytics with ClientMethods {
242238
Future alias(String newUserId) async {
243239
final userInfo = await state.userInfo.state;
244240
final event =
245-
AliasEvent(userInfo.userId ?? userInfo.anonymousId, userId: newUserId,
246-
integrations: _state.integrations.state); // Patch for Github Issue #152
241+
AliasEvent(userInfo.userId ?? userInfo.anonymousId, userId: newUserId);
247242

248243
await _process(event);
249244
}

packages/core/lib/event.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ abstract class RawEvent with JSONSerialisable {
5555
@JsonKey(name: "_metadata")
5656
DestinationMetadata? metadata;
5757

58-
RawEvent(this.type, {this.anonymousId, this.userId, this.integrations,}); // Patch for Github Issue #152
58+
RawEvent(this.type, {this.anonymousId, this.userId});
5959
}
6060

6161
@JsonSerializable(explicitToJson: true)
@@ -79,7 +79,7 @@ class TrackEvent extends RawEvent {
7979
String event;
8080
Map<String, dynamic>? properties;
8181

82-
TrackEvent(this.event, {this.properties, Map<String, dynamic>? integrations,}) : super(EventType.track, integrations: integrations,); // Patch for Github Issue #152
82+
TrackEvent(this.event, {this.properties}) : super(EventType.track);
8383

8484
factory TrackEvent.fromJson(Map<String, dynamic> json) =>
8585
_$TrackEventFromJson(json);
@@ -90,8 +90,8 @@ class TrackEvent extends RawEvent {
9090
@JsonSerializable(explicitToJson: true)
9191
class IdentifyEvent extends RawEvent {
9292
UserTraits? traits;
93-
IdentifyEvent({this.traits, String? userId, Map<String, dynamic>? integrations})
94-
: super(EventType.identify, userId: userId, integrations: integrations); // Patch for Github Issue #152
93+
IdentifyEvent({this.traits, String? userId})
94+
: super(EventType.identify, userId: userId);
9595

9696
factory IdentifyEvent.fromJson(Map<String, dynamic> json) =>
9797
_$IdentifyEventFromJson(json);
@@ -105,7 +105,7 @@ class GroupEvent extends RawEvent {
105105
String groupId;
106106
GroupTraits? traits;
107107

108-
GroupEvent(this.groupId, {this.traits, Map<String, dynamic>? integrations}) : super(EventType.group, integrations: integrations); // Patch for Github Issue #152
108+
GroupEvent(this.groupId, {this.traits}) : super(EventType.group);
109109

110110
factory GroupEvent.fromJson(Map<String, dynamic> json) =>
111111
_$GroupEventFromJson(json);
@@ -117,8 +117,8 @@ class GroupEvent extends RawEvent {
117117
class AliasEvent extends RawEvent {
118118
String previousId;
119119

120-
AliasEvent(this.previousId, {String? userId, Map<String, dynamic>? integrations})
121-
: super(EventType.alias, userId: userId, integrations: integrations); // Patch for Github Issue #152
120+
AliasEvent(this.previousId, {String? userId})
121+
: super(EventType.alias, userId: userId);
122122

123123
factory AliasEvent.fromJson(Map<String, dynamic> json) =>
124124
_$AliasEventFromJson(json);
@@ -134,7 +134,7 @@ class ScreenEvent extends RawEvent {
134134
ScreenEvent(
135135
this.name, {
136136
this.properties,
137-
Map<String, dynamic>? integrations}) : super(EventType.screen, integrations: integrations); // Patch for Github Issue #152
137+
}) : super(EventType.screen);
138138

139139
factory ScreenEvent.fromJson(Map<String, dynamic> json) =>
140140
_$ScreenEventFromJson(json);

packages/core/lib/version.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
const segmentVersion = "1.1.7";
1+
const segmentVersion = "1.1.8";

packages/core/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: segment_analytics
22
description: The hassle-free way to add Segment analytics to your Flutter app.
3-
version: 1.1.7
3+
version: 1.1.8
44
homepage: https://github.com/segmentio/analytics_flutter#readme
55
repository: https://github.com/segmentio/analytics_flutter/tree/main/packages/core#readme
66
issue_tracker: https://github.com/segmentio/analytics_flutter/issues

0 commit comments

Comments
 (0)