Skip to content

Commit 4ee86b3

Browse files
committed
chore(): Formatting
1 parent cc2ae43 commit 4ee86b3

File tree

113 files changed

+2493
-2139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+2493
-2139
lines changed

packages/analytics/amplify_analytics_pinpoint_dart/lib/src/analytics_plugin_impl.dart

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ class AmplifyAnalyticsPinpointDart extends AnalyticsPluginInterface {
4141
SecureStorageFactory? secureStorageFactory,
4242
AnalyticsPinpointPluginOptions options =
4343
const AnalyticsPinpointPluginOptions(),
44-
}) : _pathProvider = pathProvider,
45-
_legacyNativeDataProvider = legacyNativeDataProvider,
46-
_deviceContextInfoProvider = deviceContextInfoProvider,
47-
_appLifecycleProvider = appLifecycleProvider,
48-
_secureStorageFactory =
49-
secureStorageFactory ?? AmplifySecureStorageWorker.factoryFrom(),
50-
_options = options;
44+
}) : _pathProvider = pathProvider,
45+
_legacyNativeDataProvider = legacyNativeDataProvider,
46+
_deviceContextInfoProvider = deviceContextInfoProvider,
47+
_appLifecycleProvider = appLifecycleProvider,
48+
_secureStorageFactory =
49+
secureStorageFactory ?? AmplifySecureStorageWorker.factoryFrom(),
50+
_options = options;
5151

5252
void _ensureConfigured() {
5353
if (!_isConfigured) {
@@ -114,7 +114,8 @@ class AmplifyAnalyticsPinpointDart extends AnalyticsPluginInterface {
114114
AmplifySecureStorageScope.awsPinpointAnalyticsPlugin,
115115
);
116116

117-
final analyticsClient = dependencies.get<AnalyticsClient>() ??
117+
final analyticsClient =
118+
dependencies.get<AnalyticsClient>() ??
118119
AnalyticsClient(
119120
endpointStorage: endpointStorage,
120121
deviceContextInfoProvider: _deviceContextInfoProvider,

packages/analytics/amplify_analytics_pinpoint_dart/lib/src/impl/analytics_client/analytics_client.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class AnalyticsClient {
3333
AnalyticsClient._(
3434
DeviceContextInfoProvider? deviceContextInfoProvider,
3535
EndpointInfoStoreManager endpointInfoStoreManager,
36-
) : _deviceContextInfoProvider = deviceContextInfoProvider,
37-
_endpointInfoStoreManager = endpointInfoStoreManager;
36+
) : _deviceContextInfoProvider = deviceContextInfoProvider,
37+
_endpointInfoStoreManager = endpointInfoStoreManager;
3838

3939
final DeviceContextInfoProvider? _deviceContextInfoProvider;
4040
final EndpointInfoStoreManager _endpointInfoStoreManager;

packages/analytics/amplify_analytics_pinpoint_dart/lib/src/impl/analytics_client/endpoint_client/endpoint_client.dart

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,27 @@ class EndpointClient {
2424
required PinpointClient pinpointClient,
2525
required EndpointInfoStoreManager endpointInfoStoreManager,
2626
DeviceContextInfo? deviceContextInfo,
27-
}) : _pinpointAppId = pinpointAppId,
28-
_pinpointClient = pinpointClient,
29-
_fixedEndpointId = endpointInfoStoreManager.endpointId,
30-
_globalFieldsManager = endpointInfoStoreManager.endpointFields,
31-
_endpointBuilder = PublicEndpoint(
32-
effectiveDate: DateTime.now().toUtc().toIso8601String(),
33-
demographic: EndpointDemographic(
34-
appVersion: deviceContextInfo?.appVersion,
35-
locale: deviceContextInfo?.locale,
36-
make: deviceContextInfo?.make,
37-
model: deviceContextInfo?.model,
38-
modelVersion: deviceContextInfo?.modelVersion,
39-
platform: deviceContextInfo?.platform?.name,
40-
platformVersion: deviceContextInfo?.platformVersion,
41-
timezone: deviceContextInfo?.timezone,
42-
),
43-
location: EndpointLocation(
44-
country: deviceContextInfo?.countryCode,
45-
),
46-
).toBuilder();
27+
}) : _pinpointAppId = pinpointAppId,
28+
_pinpointClient = pinpointClient,
29+
_fixedEndpointId = endpointInfoStoreManager.endpointId,
30+
_globalFieldsManager = endpointInfoStoreManager.endpointFields,
31+
_endpointBuilder =
32+
PublicEndpoint(
33+
effectiveDate: DateTime.now().toUtc().toIso8601String(),
34+
demographic: EndpointDemographic(
35+
appVersion: deviceContextInfo?.appVersion,
36+
locale: deviceContextInfo?.locale,
37+
make: deviceContextInfo?.make,
38+
model: deviceContextInfo?.model,
39+
modelVersion: deviceContextInfo?.modelVersion,
40+
platform: deviceContextInfo?.platform?.name,
41+
platformVersion: deviceContextInfo?.platformVersion,
42+
timezone: deviceContextInfo?.timezone,
43+
),
44+
location: EndpointLocation(
45+
country: deviceContextInfo?.countryCode,
46+
),
47+
).toBuilder();
4748

4849
late final String _fixedEndpointId;
4950
late final EndpointGlobalFieldsManager _globalFieldsManager;
@@ -167,18 +168,19 @@ class EndpointClient {
167168
/// Create an EndpointRequest object from a local Endpoint instance.
168169
EndpointRequest _endpointToRequest(PublicEndpoint publicEndpoint) {
169170
return EndpointRequest.build(
170-
(b) => b
171-
..address = publicEndpoint.address
172-
..attributes.replace(publicEndpoint.attributes)
173-
..channelType = publicEndpoint.channelType
174-
..demographic = publicEndpoint.demographic?.toBuilder()
175-
..effectiveDate = publicEndpoint.effectiveDate
176-
..endpointStatus = publicEndpoint.endpointStatus
177-
..location = publicEndpoint.location?.toBuilder()
178-
..metrics.replace(publicEndpoint.metrics ?? const {})
179-
..optOut = publicEndpoint.optOut
180-
..requestId = publicEndpoint.requestId
181-
..user = publicEndpoint.user?.toBuilder(),
171+
(b) =>
172+
b
173+
..address = publicEndpoint.address
174+
..attributes.replace(publicEndpoint.attributes)
175+
..channelType = publicEndpoint.channelType
176+
..demographic = publicEndpoint.demographic?.toBuilder()
177+
..effectiveDate = publicEndpoint.effectiveDate
178+
..endpointStatus = publicEndpoint.endpointStatus
179+
..location = publicEndpoint.location?.toBuilder()
180+
..metrics.replace(publicEndpoint.metrics ?? const {})
181+
..optOut = publicEndpoint.optOut
182+
..requestId = publicEndpoint.requestId
183+
..user = publicEndpoint.user?.toBuilder(),
182184
);
183185
}
184186
}

packages/analytics/amplify_analytics_pinpoint_dart/lib/src/impl/analytics_client/endpoint_client/endpoint_info_store_manager.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ class EndpointInfoStoreManager {
1717
EndpointInfoStoreManager({
1818
required SecureStorageInterface store,
1919
LegacyNativeDataProvider? legacyNativeDataProvider,
20-
}) : _store = store,
21-
_legacyNativeDataProvider = legacyNativeDataProvider;
20+
}) : _store = store,
21+
_legacyNativeDataProvider = legacyNativeDataProvider;
2222

2323
final SecureStorageInterface _store;
2424
final LegacyNativeDataProvider? _legacyNativeDataProvider;

packages/analytics/amplify_analytics_pinpoint_dart/lib/src/impl/analytics_client/event_client/event_client.dart

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ class EventClient implements Closeable {
3030
required EndpointClient endpointClient,
3131
QueuedItemStore? eventStore,
3232
DeviceContextInfo? deviceContextInfo,
33-
}) : _pinpointAppId = pinpointAppId,
34-
_fixedEndpointId = endpointClient.fixedEndpointId,
35-
_pinpointClient = pinpointClient,
36-
_endpointClient = endpointClient,
37-
_eventStorage = EventStorageAdapter(
38-
eventStore ?? InMemoryQueuedItemStore(),
39-
),
40-
_eventCreator = EventCreator(deviceContextInfo: deviceContextInfo) {
33+
}) : _pinpointAppId = pinpointAppId,
34+
_fixedEndpointId = endpointClient.fixedEndpointId,
35+
_pinpointClient = pinpointClient,
36+
_endpointClient = endpointClient,
37+
_eventStorage = EventStorageAdapter(
38+
eventStore ?? InMemoryQueuedItemStore(),
39+
),
40+
_eventCreator = EventCreator(deviceContextInfo: deviceContextInfo) {
4141
_listenForFlushEvents();
4242
}
4343

@@ -131,14 +131,15 @@ class EventClient implements Closeable {
131131
final batchItems = {_fixedEndpointId: batch};
132132

133133
try {
134-
final result = await _pinpointClient
135-
.putEvents(
136-
PutEventsRequest(
137-
applicationId: _pinpointAppId,
138-
eventsRequest: EventsRequest(batchItem: batchItems),
139-
),
140-
)
141-
.result;
134+
final result =
135+
await _pinpointClient
136+
.putEvents(
137+
PutEventsRequest(
138+
applicationId: _pinpointAppId,
139+
eventsRequest: EventsRequest(batchItem: batchItems),
140+
),
141+
)
142+
.result;
142143

143144
// Parse the EndpointResponse portion of Result
144145
final endpointResponse = result.eventsResponse.results?[_fixedEndpointId];

packages/analytics/amplify_analytics_pinpoint_dart/lib/src/impl/analytics_client/event_client/queued_item_store/drift/drift_queued_item_store.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ class DriftQueuedItemStore extends _$DriftQueuedItemStore
6161

6262
@override
6363
Future<Iterable<QueuedItem>> getCount(int count) async {
64-
final statement = (select(driftQueuedItems)
65-
..orderBy([(v) => OrderingTerm.asc(v.id)])
66-
..limit(count));
64+
final statement =
65+
(select(driftQueuedItems)
66+
..orderBy([(v) => OrderingTerm.asc(v.id)])
67+
..limit(count));
6768

6869
final retrievedItems = await statement.get();
6970
return retrievedItems.map(

0 commit comments

Comments
 (0)