Skip to content

Commit 801c757

Browse files
committed
chore(): formatting
1 parent 0a63fd5 commit 801c757

File tree

339 files changed

+5554
-5060
lines changed

Some content is hidden

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

339 files changed

+5554
-5060
lines changed

packages/amplify_core/lib/src/amplify_class.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,11 @@ abstract class AmplifyClass {
190190
Category.pushNotifications: Notifications.Push,
191191
Category.storage: Storage,
192192
};
193-
final sortedCategories = topologicalSort(
194-
categories.keys,
195-
(category) => categories[category]!.categoryDependencies,
196-
).reversed;
193+
final sortedCategories =
194+
topologicalSort(
195+
categories.keys,
196+
(category) => categories[category]!.categoryDependencies,
197+
).reversed;
197198
for (final category in sortedCategories) {
198199
final plugins = categories[category]!.plugins;
199200
await Future.wait(

packages/amplify_core/lib/src/category/amplify_analytics_category.dart

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,69 +16,65 @@ class AnalyticsCategory extends AmplifyCategory<AnalyticsPluginInterface> {
1616
/// Save an [event] to be sent in the next batch to the analytics service
1717
/// {@endtemplate}
1818
Future<void> recordEvent({required AnalyticsEvent event}) => identifyCall(
19-
AnalyticsCategoryMethod.recordEvent,
20-
() => defaultPlugin.recordEvent(event: event),
21-
);
19+
AnalyticsCategoryMethod.recordEvent,
20+
() => defaultPlugin.recordEvent(event: event),
21+
);
2222

2323
/// {@template amplify_core.amplify_analytics_category.flush_events}
2424
/// Immediately send all saved events to the analytics service
2525
/// {@endtemplate}
2626
Future<void> flushEvents() => identifyCall(
27-
AnalyticsCategoryMethod.flushEvents,
28-
() => defaultPlugin.flushEvents(),
29-
);
27+
AnalyticsCategoryMethod.flushEvents,
28+
() => defaultPlugin.flushEvents(),
29+
);
3030

3131
/// {@template amplify_core.amplify_analytics_category.register_global_properties}
3232
/// Register fields of [globalProperties] to be sent with all future events.
3333
/// {@endtemplate}
3434
Future<void> registerGlobalProperties({
3535
required CustomProperties globalProperties,
36-
}) =>
37-
identifyCall(
38-
AnalyticsCategoryMethod.registerGlobalProperties,
39-
() => defaultPlugin.registerGlobalProperties(
40-
globalProperties: globalProperties,
41-
),
42-
);
36+
}) => identifyCall(
37+
AnalyticsCategoryMethod.registerGlobalProperties,
38+
() => defaultPlugin.registerGlobalProperties(
39+
globalProperties: globalProperties,
40+
),
41+
);
4342

4443
/// {@template amplify_core.amplify_analytics_category.unregister_global_properties}
4544
/// Remove fields by their [propertyNames] to stop being sent with all future events
4645
/// {@endtemplate}
4746
Future<void> unregisterGlobalProperties({
4847
List<String> propertyNames = const <String>[],
49-
}) =>
50-
identifyCall(
51-
AnalyticsCategoryMethod.unregisterGlobalProperties,
52-
() => defaultPlugin.unregisterGlobalProperties(
53-
propertyNames: propertyNames),
54-
);
48+
}) => identifyCall(
49+
AnalyticsCategoryMethod.unregisterGlobalProperties,
50+
() =>
51+
defaultPlugin.unregisterGlobalProperties(propertyNames: propertyNames),
52+
);
5553

5654
/// {@template amplify_core.amplify_analytics_category.enable}
5755
/// Start all automatic event tracking of this plugin
5856
/// {@endtemplate}
5957
Future<void> enable() => identifyCall(
60-
AnalyticsCategoryMethod.enable,
61-
() => defaultPlugin.enable(),
62-
);
58+
AnalyticsCategoryMethod.enable,
59+
() => defaultPlugin.enable(),
60+
);
6361

6462
/// {@template amplify_core.amplify_analytics_category.disable}
6563
/// Stop all automatic event tracking of this plugin
6664
/// {@endtemplate}
6765
Future<void> disable() => identifyCall(
68-
AnalyticsCategoryMethod.disable,
69-
() => defaultPlugin.disable(),
70-
);
66+
AnalyticsCategoryMethod.disable,
67+
() => defaultPlugin.disable(),
68+
);
7169

7270
/// {@template amplify_core.amplify_analytics_category.identify_user}
7371
/// Store a [userId] with [userProfile] to be associated with current device
7472
/// {@endtemplate}
7573
Future<void> identifyUser({
7674
required String userId,
7775
UserProfile? userProfile,
78-
}) =>
79-
identifyCall(
80-
AnalyticsCategoryMethod.identifyUser,
81-
() => defaultPlugin.identifyUser(
82-
userId: userId, userProfile: userProfile),
83-
);
76+
}) => identifyCall(
77+
AnalyticsCategoryMethod.identifyUser,
78+
() => defaultPlugin.identifyUser(userId: userId, userProfile: userProfile),
79+
);
8480
}

packages/amplify_core/lib/src/category/amplify_api_category.dart

Lines changed: 62 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ class APICategory extends AmplifyCategory<APIPluginInterface> {
4343
Stream<GraphQLResponse<T>> subscribe<T>(
4444
GraphQLRequest<T> request, {
4545
void Function()? onEstablished,
46-
}) =>
47-
identifyCall(
48-
ApiCategoryMethod.subscribe,
49-
() => defaultPlugin.subscribe(request, onEstablished: onEstablished),
50-
);
46+
}) => identifyCall(
47+
ApiCategoryMethod.subscribe,
48+
() => defaultPlugin.subscribe(request, onEstablished: onEstablished),
49+
);
5150

5251
// ====== RestAPI ======
5352

@@ -71,17 +70,16 @@ class APICategory extends AmplifyCategory<APIPluginInterface> {
7170
HttpPayload? body,
7271
Map<String, String>? queryParameters,
7372
String? apiName,
74-
}) =>
75-
identifyCall(
76-
ApiCategoryMethod.delete,
77-
() => defaultPlugin.delete(
78-
path,
79-
headers: headers,
80-
body: body,
81-
apiName: apiName,
82-
queryParameters: queryParameters,
83-
),
84-
);
73+
}) => identifyCall(
74+
ApiCategoryMethod.delete,
75+
() => defaultPlugin.delete(
76+
path,
77+
headers: headers,
78+
body: body,
79+
apiName: apiName,
80+
queryParameters: queryParameters,
81+
),
82+
);
8583

8684
/// Sends an HTTP GET request to the REST API endpoint.
8785
///
@@ -100,16 +98,15 @@ class APICategory extends AmplifyCategory<APIPluginInterface> {
10098
Map<String, String>? headers,
10199
Map<String, String>? queryParameters,
102100
String? apiName,
103-
}) =>
104-
identifyCall(
105-
ApiCategoryMethod.get,
106-
() => defaultPlugin.get(
107-
path,
108-
headers: headers,
109-
apiName: apiName,
110-
queryParameters: queryParameters,
111-
),
112-
);
101+
}) => identifyCall(
102+
ApiCategoryMethod.get,
103+
() => defaultPlugin.get(
104+
path,
105+
headers: headers,
106+
apiName: apiName,
107+
queryParameters: queryParameters,
108+
),
109+
);
113110

114111
/// Sends an HTTP HEAD request to the REST API endpoint.
115112
///
@@ -125,16 +122,15 @@ class APICategory extends AmplifyCategory<APIPluginInterface> {
125122
Map<String, String>? headers,
126123
Map<String, String>? queryParameters,
127124
String? apiName,
128-
}) =>
129-
identifyCall(
130-
ApiCategoryMethod.head,
131-
() => defaultPlugin.head(
132-
path,
133-
headers: headers,
134-
apiName: apiName,
135-
queryParameters: queryParameters,
136-
),
137-
);
125+
}) => identifyCall(
126+
ApiCategoryMethod.head,
127+
() => defaultPlugin.head(
128+
path,
129+
headers: headers,
130+
apiName: apiName,
131+
queryParameters: queryParameters,
132+
),
133+
);
138134

139135
/// Sends an HTTP PATCH request to the REST API endpoint.
140136
///
@@ -156,17 +152,16 @@ class APICategory extends AmplifyCategory<APIPluginInterface> {
156152
HttpPayload? body,
157153
Map<String, String>? queryParameters,
158154
String? apiName,
159-
}) =>
160-
identifyCall(
161-
ApiCategoryMethod.patch,
162-
() => defaultPlugin.patch(
163-
path,
164-
headers: headers,
165-
body: body,
166-
apiName: apiName,
167-
queryParameters: queryParameters,
168-
),
169-
);
155+
}) => identifyCall(
156+
ApiCategoryMethod.patch,
157+
() => defaultPlugin.patch(
158+
path,
159+
headers: headers,
160+
body: body,
161+
apiName: apiName,
162+
queryParameters: queryParameters,
163+
),
164+
);
170165

171166
/// Sends an HTTP POST request to the REST API endpoint.
172167
///
@@ -188,17 +183,16 @@ class APICategory extends AmplifyCategory<APIPluginInterface> {
188183
HttpPayload? body,
189184
Map<String, String>? queryParameters,
190185
String? apiName,
191-
}) =>
192-
identifyCall(
193-
ApiCategoryMethod.post,
194-
() => defaultPlugin.post(
195-
path,
196-
headers: headers,
197-
body: body,
198-
apiName: apiName,
199-
queryParameters: queryParameters,
200-
),
201-
);
186+
}) => identifyCall(
187+
ApiCategoryMethod.post,
188+
() => defaultPlugin.post(
189+
path,
190+
headers: headers,
191+
body: body,
192+
apiName: apiName,
193+
queryParameters: queryParameters,
194+
),
195+
);
202196

203197
/// Sends an HTTP PUT request to the REST API endpoint.
204198
///
@@ -220,15 +214,14 @@ class APICategory extends AmplifyCategory<APIPluginInterface> {
220214
HttpPayload? body,
221215
Map<String, String>? queryParameters,
222216
String? apiName,
223-
}) =>
224-
identifyCall(
225-
ApiCategoryMethod.put,
226-
() => defaultPlugin.put(
227-
path,
228-
headers: headers,
229-
body: body,
230-
apiName: apiName,
231-
queryParameters: queryParameters,
232-
),
233-
);
217+
}) => identifyCall(
218+
ApiCategoryMethod.put,
219+
() => defaultPlugin.put(
220+
path,
221+
headers: headers,
222+
body: body,
223+
apiName: apiName,
224+
queryParameters: queryParameters,
225+
),
226+
);
234227
}

0 commit comments

Comments
 (0)