@@ -351,12 +351,9 @@ Future<bool> _connectToDwds({
351
351
}
352
352
final uri = Uri .parse (extensionUrl);
353
353
// Start the client connection with DWDS:
354
- final client =
355
- uri.isScheme ('ws' ) || uri.isScheme ('wss' )
356
- ? WebSocketClient (WebSocketChannel .connect (uri))
357
- : SseSocketClient (
358
- SseClient (uri.toString (), debugKey: 'DebugExtension' ),
359
- );
354
+ final client = uri.isScheme ('ws' ) || uri.isScheme ('wss' )
355
+ ? WebSocketClient (WebSocketChannel .connect (uri))
356
+ : SseSocketClient (SseClient (uri.toString (), debugKey: 'DebugExtension' ));
360
357
final trigger = _tabIdToTrigger[dartAppTabId];
361
358
debugLog ('Connecting to DWDS...' , verbose: true );
362
359
final debugSession = _DebugSession (
@@ -386,14 +383,13 @@ Future<bool> _connectToDwds({
386
383
final tabUrl = await _getTabUrl (dartAppTabId);
387
384
debugSession.sendEvent (
388
385
DevToolsRequest (
389
- (b) =>
390
- b
391
- ..appId = debugInfo.appId
392
- ..instanceId = debugInfo.appInstanceId
393
- ..contextId = dartAppContextId
394
- ..tabUrl = tabUrl
395
- ..uriOnly = true
396
- ..client = trigger? .clientName ?? 'unknown' ,
386
+ (b) => b
387
+ ..appId = debugInfo.appId
388
+ ..instanceId = debugInfo.appInstanceId
389
+ ..contextId = dartAppContextId
390
+ ..tabUrl = tabUrl
391
+ ..uriOnly = true
392
+ ..client = trigger? .clientName ?? 'unknown' ,
397
393
),
398
394
);
399
395
return true ;
@@ -445,10 +441,9 @@ void _forwardDwdsEventToChromeDebugger(
445
441
) {
446
442
try {
447
443
final messageParams = message.commandParams;
448
- final params =
449
- messageParams == null
450
- ? < String , Object > {}
451
- : BuiltMap <String , Object >(json.decode (messageParams)).toMap ();
444
+ final params = messageParams == null
445
+ ? < String , Object > {}
446
+ : BuiltMap <String , Object >(json.decode (messageParams)).toMap ();
452
447
453
448
chrome.debugger.sendCommand (
454
449
Debuggee (tabId: tabId),
@@ -461,11 +456,10 @@ void _forwardDwdsEventToChromeDebugger(
461
456
jsonEncode (
462
457
serializers.serialize (
463
458
ExtensionResponse (
464
- (b) =>
465
- b
466
- ..id = message.id
467
- ..success = false
468
- ..result = JSON .stringify (chrome.runtime.lastError),
459
+ (b) => b
460
+ ..id = message.id
461
+ ..success = false
462
+ ..result = JSON .stringify (chrome.runtime.lastError),
469
463
),
470
464
),
471
465
),
@@ -475,11 +469,10 @@ void _forwardDwdsEventToChromeDebugger(
475
469
jsonEncode (
476
470
serializers.serialize (
477
471
ExtensionResponse (
478
- (b) =>
479
- b
480
- ..id = message.id
481
- ..success = true
482
- ..result = JSON .stringify (e),
472
+ (b) => b
473
+ ..id = message.id
474
+ ..success = true
475
+ ..result = JSON .stringify (e),
483
476
),
484
477
),
485
478
),
@@ -612,10 +605,9 @@ Future<bool> _sendConnectFailureMessage(
612
605
final json = jsonEncode (
613
606
serializers.serialize (
614
607
ConnectFailure (
615
- (b) =>
616
- b
617
- ..tabId = dartAppTabId
618
- ..reason = reason.name,
608
+ (b) => b
609
+ ..tabId = dartAppTabId
610
+ ..reason = reason.name,
619
611
),
620
612
),
621
613
);
@@ -634,11 +626,10 @@ Future<bool> _sendStopDebuggingMessage(
634
626
final json = jsonEncode (
635
627
serializers.serialize (
636
628
DebugStateChange (
637
- (b) =>
638
- b
639
- ..tabId = dartAppTabId
640
- ..reason = reason.name
641
- ..newState = DebugStateChange .stopDebugging,
629
+ (b) => b
630
+ ..tabId = dartAppTabId
631
+ ..reason = reason.name
632
+ ..newState = DebugStateChange .stopDebugging,
642
633
),
643
634
),
644
635
);
@@ -747,10 +738,9 @@ DebuggerLocation? _debuggerLocation(int dartAppTabId) {
747
738
/// Construct an [ExtensionEvent] from [method] and [params] .
748
739
ExtensionEvent _extensionEventFor (String method, dynamic params) {
749
740
return ExtensionEvent (
750
- (b) =>
751
- b
752
- ..params = jsonEncode (json.decode (JSON .stringify (params)))
753
- ..method = jsonEncode (method),
741
+ (b) => b
742
+ ..params = jsonEncode (json.decode (JSON .stringify (params)))
743
+ ..method = jsonEncode (method),
754
744
);
755
745
}
756
746
0 commit comments