Skip to content

Commit 657dd28

Browse files
committed
chore(): Ran Dart Format
1 parent 2bf35ab commit 657dd28

File tree

339 files changed

+5058
-5551
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

+5058
-5551
lines changed

packages/amplify_core/lib/src/amplify_class.dart

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

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

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -16,65 +16,69 @@ 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-
}) => identifyCall(
37-
AnalyticsCategoryMethod.registerGlobalProperties,
38-
() => defaultPlugin.registerGlobalProperties(
39-
globalProperties: globalProperties,
40-
),
41-
);
36+
}) =>
37+
identifyCall(
38+
AnalyticsCategoryMethod.registerGlobalProperties,
39+
() => defaultPlugin.registerGlobalProperties(
40+
globalProperties: globalProperties,
41+
),
42+
);
4243

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

5456
/// {@template amplify_core.amplify_analytics_category.enable}
5557
/// Start all automatic event tracking of this plugin
5658
/// {@endtemplate}
5759
Future<void> enable() => identifyCall(
58-
AnalyticsCategoryMethod.enable,
59-
() => defaultPlugin.enable(),
60-
);
60+
AnalyticsCategoryMethod.enable,
61+
() => defaultPlugin.enable(),
62+
);
6163

6264
/// {@template amplify_core.amplify_analytics_category.disable}
6365
/// Stop all automatic event tracking of this plugin
6466
/// {@endtemplate}
6567
Future<void> disable() => identifyCall(
66-
AnalyticsCategoryMethod.disable,
67-
() => defaultPlugin.disable(),
68-
);
68+
AnalyticsCategoryMethod.disable,
69+
() => defaultPlugin.disable(),
70+
);
6971

7072
/// {@template amplify_core.amplify_analytics_category.identify_user}
7173
/// Store a [userId] with [userProfile] to be associated with current device
7274
/// {@endtemplate}
7375
Future<void> identifyUser({
7476
required String userId,
7577
UserProfile? userProfile,
76-
}) => identifyCall(
77-
AnalyticsCategoryMethod.identifyUser,
78-
() => defaultPlugin.identifyUser(userId: userId, userProfile: userProfile),
79-
);
78+
}) =>
79+
identifyCall(
80+
AnalyticsCategoryMethod.identifyUser,
81+
() => defaultPlugin.identifyUser(
82+
userId: userId, userProfile: userProfile),
83+
);
8084
}

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

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

5152
// ====== RestAPI ======
5253

@@ -70,16 +71,17 @@ class APICategory extends AmplifyCategory<APIPluginInterface> {
7071
HttpPayload? body,
7172
Map<String, String>? queryParameters,
7273
String? apiName,
73-
}) => identifyCall(
74-
ApiCategoryMethod.delete,
75-
() => defaultPlugin.delete(
76-
path,
77-
headers: headers,
78-
body: body,
79-
apiName: apiName,
80-
queryParameters: queryParameters,
81-
),
82-
);
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+
);
8385

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

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

135139
/// Sends an HTTP PATCH request to the REST API endpoint.
136140
///
@@ -152,16 +156,17 @@ class APICategory extends AmplifyCategory<APIPluginInterface> {
152156
HttpPayload? body,
153157
Map<String, String>? queryParameters,
154158
String? apiName,
155-
}) => identifyCall(
156-
ApiCategoryMethod.patch,
157-
() => defaultPlugin.patch(
158-
path,
159-
headers: headers,
160-
body: body,
161-
apiName: apiName,
162-
queryParameters: queryParameters,
163-
),
164-
);
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+
);
165170

166171
/// Sends an HTTP POST request to the REST API endpoint.
167172
///
@@ -183,16 +188,17 @@ class APICategory extends AmplifyCategory<APIPluginInterface> {
183188
HttpPayload? body,
184189
Map<String, String>? queryParameters,
185190
String? apiName,
186-
}) => identifyCall(
187-
ApiCategoryMethod.post,
188-
() => defaultPlugin.post(
189-
path,
190-
headers: headers,
191-
body: body,
192-
apiName: apiName,
193-
queryParameters: queryParameters,
194-
),
195-
);
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+
);
196202

197203
/// Sends an HTTP PUT request to the REST API endpoint.
198204
///
@@ -214,14 +220,15 @@ class APICategory extends AmplifyCategory<APIPluginInterface> {
214220
HttpPayload? body,
215221
Map<String, String>? queryParameters,
216222
String? apiName,
217-
}) => identifyCall(
218-
ApiCategoryMethod.put,
219-
() => defaultPlugin.put(
220-
path,
221-
headers: headers,
222-
body: body,
223-
apiName: apiName,
224-
queryParameters: queryParameters,
225-
),
226-
);
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+
);
227234
}

0 commit comments

Comments
 (0)