Skip to content

Commit 096073c

Browse files
committed
format: dart-objc
1 parent f5e7766 commit 096073c

File tree

14 files changed

+253
-167
lines changed

14 files changed

+253
-167
lines changed

packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTDocumentSnapshotStreamHandler.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ - (FlutterError *_Nullable)onListenWithArguments:(id _Nullable)arguments
4949
};
5050
dispatch_async(dispatch_get_main_queue(), ^{
5151
events([FLTFirebasePluginHelper createFlutterErrorWithCode:code
52-
message:message
53-
optionalDetails:details
54-
andOptionalNSError:error]);
52+
message:message
53+
optionalDetails:details
54+
andOptionalNSError:error]);
5555
});
5656
} else {
5757
dispatch_async(dispatch_get_main_queue(), ^{

packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestorePlugin.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ - (FIRFirestore *_Nullable)getFIRFirestoreFromAppNameFromPigeon:
220220
NSString *appNameDart = pigeonApp.appName;
221221
NSString *databaseUrl = pigeonApp.databaseURL;
222222

223-
FIRApp *app = [FIRApp appNamed:[FLTFirebasePluginHelper firebaseAppNameFromDartName:appNameDart]];
223+
FIRApp *app =
224+
[FIRApp appNamed:[FLTFirebasePluginHelper firebaseAppNameFromDartName:appNameDart]];
224225

225226
if ([FLTFirebaseFirestoreUtils getFirestoreInstanceByName:app.name
226227
databaseURL:databaseUrl] != nil) {

packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTFirebaseFirestoreReader.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ - (FIRFirestore *)FIRFirestore {
293293
NSString *appNameDart = [self readValue];
294294
NSString *databaseUrl = [self readValue];
295295
FIRFirestoreSettings *settings = [self readValue];
296-
FIRApp *app = [FIRApp appNamed:[FLTFirebasePluginHelper firebaseAppNameFromDartName:appNameDart]];
296+
FIRApp *app =
297+
[FIRApp appNamed:[FLTFirebasePluginHelper firebaseAppNameFromDartName:appNameDart]];
297298

298299
if ([FLTFirebaseFirestoreUtils getFirestoreInstanceByName:app.name
299300
databaseURL:databaseUrl] != nil) {

packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTLoadBundleStreamHandler.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ - (FlutterError *_Nullable)onListenWithArguments:(id _Nullable)arguments
5353

5454
dispatch_async(dispatch_get_main_queue(), ^{
5555
events([FLTFirebasePluginHelper createFlutterErrorWithCode:code
56-
message:message
57-
optionalDetails:details
58-
andOptionalNSError:error]);
56+
message:message
57+
optionalDetails:details
58+
andOptionalNSError:error]);
5959
});
6060
}
6161
}];

packages/cloud_firestore/cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FLTQuerySnapshotStreamHandler.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ - (FlutterError *_Nullable)onListenWithArguments:(id _Nullable)arguments
5959
};
6060
dispatch_async(dispatch_get_main_queue(), ^{
6161
events([FLTFirebasePluginHelper createFlutterErrorWithCode:code
62-
message:message
63-
optionalDetails:details
64-
andOptionalNSError:error]);
62+
message:message
63+
optionalDetails:details
64+
andOptionalNSError:error]);
6565
});
6666
} else {
6767
dispatch_async(dispatch_get_main_queue(), ^{

packages/firebase_app_check/firebase_app_check/ios/firebase_app_check/Sources/firebase_app_check/FLTFirebaseAppCheckPlugin.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ - (void)detachFromEngineForRegistrar:(NSObject<FlutterPluginRegistrar> *)registr
6767

6868
- (void)handleMethodCall:(FlutterMethodCall *)call result:(FlutterResult)flutterResult {
6969
void (^errorBlock)(NSString *_Nullable, NSString *_Nullable, NSDictionary *_Nullable,
70-
NSError *_Nullable) = ^(
71-
NSString *_Nullable code, NSString *_Nullable message, NSDictionary *_Nullable details,
72-
NSError *_Nullable error) {
70+
NSError *_Nullable) = ^(NSString *_Nullable code, NSString *_Nullable message,
71+
NSDictionary *_Nullable details,
72+
NSError *_Nullable error) {
7373
NSMutableDictionary *errorDetails = [NSMutableDictionary dictionary];
7474
NSString *errorCode;
7575

packages/firebase_auth/firebase_auth/ios/firebase_auth/Sources/firebase_auth/FLTFirebaseAuthPlugin.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,8 @@ + (NSNumber *_Nullable)storeAuthCredentialIfPresent:(NSError *)error {
650650
}
651651

652652
- (FIRAuth *_Nullable)getFIRAuthFromAppNameFromPigeon:(AuthPigeonFirebaseApp *)pigeonApp {
653-
FIRApp *app = [FIRApp appNamed:[FLTFirebasePluginHelper firebaseAppNameFromDartName:pigeonApp.appName]];
653+
FIRApp *app =
654+
[FIRApp appNamed:[FLTFirebasePluginHelper firebaseAppNameFromDartName:pigeonApp.appName]];
654655
FIRAuth *auth = [FIRAuth authWithApp:app];
655656

656657
auth.tenantID = pigeonApp.tenantId;

packages/firebase_auth/firebase_auth/ios/firebase_auth/Sources/firebase_auth/include/Public/FLTFirebaseAuthPlugin.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,15 @@
1515
@import firebase_core;
1616
#import "firebase_auth_messages.g.h"
1717

18-
@interface FLTFirebaseAuthPlugin
19-
: NSObject <FlutterPlugin,
20-
FirebaseAuthHostApi,
21-
FirebaseAuthUserHostApi,
22-
MultiFactorUserHostApi,
23-
MultiFactoResolverHostApi,
24-
MultiFactorTotpHostApi,
25-
MultiFactorTotpSecretHostApi,
26-
ASAuthorizationControllerDelegate,
27-
ASAuthorizationControllerPresentationContextProviding>
18+
@interface FLTFirebaseAuthPlugin : NSObject <FlutterPlugin,
19+
FirebaseAuthHostApi,
20+
FirebaseAuthUserHostApi,
21+
MultiFactorUserHostApi,
22+
MultiFactoResolverHostApi,
23+
MultiFactorTotpHostApi,
24+
MultiFactorTotpSecretHostApi,
25+
ASAuthorizationControllerDelegate,
26+
ASAuthorizationControllerPresentationContextProviding>
2827

2928
+ (FlutterError *)convertToFlutterError:(NSError *)error;
3029
@end

packages/firebase_core/firebase_core_platform_interface/lib/src/pigeon/messages.pigeon.dart

Lines changed: 68 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ PlatformException _createConnectionError(String channelName) {
1818
);
1919
}
2020

21-
List<Object?> wrapResponse({Object? result, PlatformException? error, bool empty = false}) {
21+
List<Object?> wrapResponse(
22+
{Object? result, PlatformException? error, bool empty = false}) {
2223
if (empty) {
2324
return <Object?>[];
2425
}
@@ -27,21 +28,22 @@ List<Object?> wrapResponse({Object? result, PlatformException? error, bool empty
2728
}
2829
return <Object?>[error.code, error.message, error.details];
2930
}
31+
3032
bool _deepEquals(Object? a, Object? b) {
3133
if (a is List && b is List) {
3234
return a.length == b.length &&
3335
a.indexed
34-
.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]));
36+
.every(((int, dynamic) item) => _deepEquals(item.$2, b[item.$1]));
3537
}
3638
if (a is Map && b is Map) {
37-
return a.length == b.length && a.entries.every((MapEntry<Object?, Object?> entry) =>
38-
(b as Map<Object?, Object?>).containsKey(entry.key) &&
39-
_deepEquals(entry.value, b[entry.key]));
39+
return a.length == b.length &&
40+
a.entries.every((MapEntry<Object?, Object?> entry) =>
41+
(b as Map<Object?, Object?>).containsKey(entry.key) &&
42+
_deepEquals(entry.value, b[entry.key]));
4043
}
4144
return a == b;
4245
}
4346

44-
4547
class CoreFirebaseOptions {
4648
CoreFirebaseOptions({
4749
required this.apiKey,
@@ -108,7 +110,8 @@ class CoreFirebaseOptions {
108110
}
109111

110112
Object encode() {
111-
return _toList(); }
113+
return _toList();
114+
}
112115

113116
static CoreFirebaseOptions decode(Object result) {
114117
result as List<Object?>;
@@ -144,8 +147,7 @@ class CoreFirebaseOptions {
144147

145148
@override
146149
// ignore: avoid_equals_and_hash_code_on_mutable_classes
147-
int get hashCode => Object.hashAll(_toList())
148-
;
150+
int get hashCode => Object.hashAll(_toList());
149151
}
150152

151153
class CoreInitializeResponse {
@@ -174,15 +176,17 @@ class CoreInitializeResponse {
174176
}
175177

176178
Object encode() {
177-
return _toList(); }
179+
return _toList();
180+
}
178181

179182
static CoreInitializeResponse decode(Object result) {
180183
result as List<Object?>;
181184
return CoreInitializeResponse(
182185
name: result[0]! as String,
183186
options: result[1]! as CoreFirebaseOptions,
184187
isAutomaticDataCollectionEnabled: result[2] as bool?,
185-
pluginConstants: (result[3] as Map<Object?, Object?>?)!.cast<String?, Object?>(),
188+
pluginConstants:
189+
(result[3] as Map<Object?, Object?>?)!.cast<String?, Object?>(),
186190
);
187191
}
188192

@@ -200,22 +204,20 @@ class CoreInitializeResponse {
200204

201205
@override
202206
// ignore: avoid_equals_and_hash_code_on_mutable_classes
203-
int get hashCode => Object.hashAll(_toList())
204-
;
207+
int get hashCode => Object.hashAll(_toList());
205208
}
206209

207-
208210
class _PigeonCodec extends StandardMessageCodec {
209211
const _PigeonCodec();
210212
@override
211213
void writeValue(WriteBuffer buffer, Object? value) {
212214
if (value is int) {
213215
buffer.putUint8(4);
214216
buffer.putInt64(value);
215-
} else if (value is CoreFirebaseOptions) {
217+
} else if (value is CoreFirebaseOptions) {
216218
buffer.putUint8(129);
217219
writeValue(buffer, value.encode());
218-
} else if (value is CoreInitializeResponse) {
220+
} else if (value is CoreInitializeResponse) {
219221
buffer.putUint8(130);
220222
writeValue(buffer, value.encode());
221223
} else {
@@ -226,9 +228,9 @@ class _PigeonCodec extends StandardMessageCodec {
226228
@override
227229
Object? readValueOfType(int type, ReadBuffer buffer) {
228230
switch (type) {
229-
case 129:
231+
case 129:
230232
return CoreFirebaseOptions.decode(readValue(buffer)!);
231-
case 130:
233+
case 130:
232234
return CoreInitializeResponse.decode(readValue(buffer)!);
233235
default:
234236
return super.readValueOfType(type, buffer);
@@ -240,23 +242,29 @@ class FirebaseCoreHostApi {
240242
/// Constructor for [FirebaseCoreHostApi]. The [binaryMessenger] named argument is
241243
/// available for dependency injection. If it is left null, the default
242244
/// BinaryMessenger will be used which routes to the host platform.
243-
FirebaseCoreHostApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
245+
FirebaseCoreHostApi(
246+
{BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
244247
: pigeonVar_binaryMessenger = binaryMessenger,
245-
pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
248+
pigeonVar_messageChannelSuffix =
249+
messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
246250
final BinaryMessenger? pigeonVar_binaryMessenger;
247251

248252
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
249253

250254
final String pigeonVar_messageChannelSuffix;
251255

252-
Future<CoreInitializeResponse> initializeApp(String appName, CoreFirebaseOptions initializeAppRequest) async {
253-
final String pigeonVar_channelName = 'dev.flutter.pigeon.firebase_core_platform_interface.FirebaseCoreHostApi.initializeApp$pigeonVar_messageChannelSuffix';
254-
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
256+
Future<CoreInitializeResponse> initializeApp(
257+
String appName, CoreFirebaseOptions initializeAppRequest) async {
258+
final String pigeonVar_channelName =
259+
'dev.flutter.pigeon.firebase_core_platform_interface.FirebaseCoreHostApi.initializeApp$pigeonVar_messageChannelSuffix';
260+
final BasicMessageChannel<Object?> pigeonVar_channel =
261+
BasicMessageChannel<Object?>(
255262
pigeonVar_channelName,
256263
pigeonChannelCodec,
257264
binaryMessenger: pigeonVar_binaryMessenger,
258265
);
259-
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[appName, initializeAppRequest]);
266+
final Future<Object?> pigeonVar_sendFuture =
267+
pigeonVar_channel.send(<Object?>[appName, initializeAppRequest]);
260268
final List<Object?>? pigeonVar_replyList =
261269
await pigeonVar_sendFuture as List<Object?>?;
262270
if (pigeonVar_replyList == null) {
@@ -278,8 +286,10 @@ class FirebaseCoreHostApi {
278286
}
279287

280288
Future<List<CoreInitializeResponse>> initializeCore() async {
281-
final String pigeonVar_channelName = 'dev.flutter.pigeon.firebase_core_platform_interface.FirebaseCoreHostApi.initializeCore$pigeonVar_messageChannelSuffix';
282-
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
289+
final String pigeonVar_channelName =
290+
'dev.flutter.pigeon.firebase_core_platform_interface.FirebaseCoreHostApi.initializeCore$pigeonVar_messageChannelSuffix';
291+
final BasicMessageChannel<Object?> pigeonVar_channel =
292+
BasicMessageChannel<Object?>(
283293
pigeonVar_channelName,
284294
pigeonChannelCodec,
285295
binaryMessenger: pigeonVar_binaryMessenger,
@@ -301,13 +311,16 @@ class FirebaseCoreHostApi {
301311
message: 'Host platform returned null value for non-null return value.',
302312
);
303313
} else {
304-
return (pigeonVar_replyList[0] as List<Object?>?)!.cast<CoreInitializeResponse>();
314+
return (pigeonVar_replyList[0] as List<Object?>?)!
315+
.cast<CoreInitializeResponse>();
305316
}
306317
}
307318

308319
Future<CoreFirebaseOptions> optionsFromResource() async {
309-
final String pigeonVar_channelName = 'dev.flutter.pigeon.firebase_core_platform_interface.FirebaseCoreHostApi.optionsFromResource$pigeonVar_messageChannelSuffix';
310-
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
320+
final String pigeonVar_channelName =
321+
'dev.flutter.pigeon.firebase_core_platform_interface.FirebaseCoreHostApi.optionsFromResource$pigeonVar_messageChannelSuffix';
322+
final BasicMessageChannel<Object?> pigeonVar_channel =
323+
BasicMessageChannel<Object?>(
311324
pigeonVar_channelName,
312325
pigeonChannelCodec,
313326
binaryMessenger: pigeonVar_binaryMessenger,
@@ -338,23 +351,29 @@ class FirebaseAppHostApi {
338351
/// Constructor for [FirebaseAppHostApi]. The [binaryMessenger] named argument is
339352
/// available for dependency injection. If it is left null, the default
340353
/// BinaryMessenger will be used which routes to the host platform.
341-
FirebaseAppHostApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
354+
FirebaseAppHostApi(
355+
{BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''})
342356
: pigeonVar_binaryMessenger = binaryMessenger,
343-
pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
357+
pigeonVar_messageChannelSuffix =
358+
messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : '';
344359
final BinaryMessenger? pigeonVar_binaryMessenger;
345360

346361
static const MessageCodec<Object?> pigeonChannelCodec = _PigeonCodec();
347362

348363
final String pigeonVar_messageChannelSuffix;
349364

350-
Future<void> setAutomaticDataCollectionEnabled(String appName, bool enabled) async {
351-
final String pigeonVar_channelName = 'dev.flutter.pigeon.firebase_core_platform_interface.FirebaseAppHostApi.setAutomaticDataCollectionEnabled$pigeonVar_messageChannelSuffix';
352-
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
365+
Future<void> setAutomaticDataCollectionEnabled(
366+
String appName, bool enabled) async {
367+
final String pigeonVar_channelName =
368+
'dev.flutter.pigeon.firebase_core_platform_interface.FirebaseAppHostApi.setAutomaticDataCollectionEnabled$pigeonVar_messageChannelSuffix';
369+
final BasicMessageChannel<Object?> pigeonVar_channel =
370+
BasicMessageChannel<Object?>(
353371
pigeonVar_channelName,
354372
pigeonChannelCodec,
355373
binaryMessenger: pigeonVar_binaryMessenger,
356374
);
357-
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[appName, enabled]);
375+
final Future<Object?> pigeonVar_sendFuture =
376+
pigeonVar_channel.send(<Object?>[appName, enabled]);
358377
final List<Object?>? pigeonVar_replyList =
359378
await pigeonVar_sendFuture as List<Object?>?;
360379
if (pigeonVar_replyList == null) {
@@ -370,14 +389,18 @@ class FirebaseAppHostApi {
370389
}
371390
}
372391

373-
Future<void> setAutomaticResourceManagementEnabled(String appName, bool enabled) async {
374-
final String pigeonVar_channelName = 'dev.flutter.pigeon.firebase_core_platform_interface.FirebaseAppHostApi.setAutomaticResourceManagementEnabled$pigeonVar_messageChannelSuffix';
375-
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
392+
Future<void> setAutomaticResourceManagementEnabled(
393+
String appName, bool enabled) async {
394+
final String pigeonVar_channelName =
395+
'dev.flutter.pigeon.firebase_core_platform_interface.FirebaseAppHostApi.setAutomaticResourceManagementEnabled$pigeonVar_messageChannelSuffix';
396+
final BasicMessageChannel<Object?> pigeonVar_channel =
397+
BasicMessageChannel<Object?>(
376398
pigeonVar_channelName,
377399
pigeonChannelCodec,
378400
binaryMessenger: pigeonVar_binaryMessenger,
379401
);
380-
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[appName, enabled]);
402+
final Future<Object?> pigeonVar_sendFuture =
403+
pigeonVar_channel.send(<Object?>[appName, enabled]);
381404
final List<Object?>? pigeonVar_replyList =
382405
await pigeonVar_sendFuture as List<Object?>?;
383406
if (pigeonVar_replyList == null) {
@@ -394,13 +417,16 @@ class FirebaseAppHostApi {
394417
}
395418

396419
Future<void> delete(String appName) async {
397-
final String pigeonVar_channelName = 'dev.flutter.pigeon.firebase_core_platform_interface.FirebaseAppHostApi.delete$pigeonVar_messageChannelSuffix';
398-
final BasicMessageChannel<Object?> pigeonVar_channel = BasicMessageChannel<Object?>(
420+
final String pigeonVar_channelName =
421+
'dev.flutter.pigeon.firebase_core_platform_interface.FirebaseAppHostApi.delete$pigeonVar_messageChannelSuffix';
422+
final BasicMessageChannel<Object?> pigeonVar_channel =
423+
BasicMessageChannel<Object?>(
399424
pigeonVar_channelName,
400425
pigeonChannelCodec,
401426
binaryMessenger: pigeonVar_binaryMessenger,
402427
);
403-
final Future<Object?> pigeonVar_sendFuture = pigeonVar_channel.send(<Object?>[appName]);
428+
final Future<Object?> pigeonVar_sendFuture =
429+
pigeonVar_channel.send(<Object?>[appName]);
404430
final List<Object?>? pigeonVar_replyList =
405431
await pigeonVar_sendFuture as List<Object?>?;
406432
if (pigeonVar_replyList == null) {

0 commit comments

Comments
 (0)