@@ -351,12 +351,9 @@ Future<bool> _connectToDwds({
351351 }
352352 final uri = Uri .parse (extensionUrl);
353353 // 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' ));
360357 final trigger = _tabIdToTrigger[dartAppTabId];
361358 debugLog ('Connecting to DWDS...' , verbose: true );
362359 final debugSession = _DebugSession (
@@ -386,14 +383,13 @@ Future<bool> _connectToDwds({
386383 final tabUrl = await _getTabUrl (dartAppTabId);
387384 debugSession.sendEvent (
388385 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' ,
397393 ),
398394 );
399395 return true ;
@@ -445,10 +441,9 @@ void _forwardDwdsEventToChromeDebugger(
445441) {
446442 try {
447443 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 ();
452447
453448 chrome.debugger.sendCommand (
454449 Debuggee (tabId: tabId),
@@ -461,11 +456,10 @@ void _forwardDwdsEventToChromeDebugger(
461456 jsonEncode (
462457 serializers.serialize (
463458 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),
469463 ),
470464 ),
471465 ),
@@ -475,11 +469,10 @@ void _forwardDwdsEventToChromeDebugger(
475469 jsonEncode (
476470 serializers.serialize (
477471 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),
483476 ),
484477 ),
485478 ),
@@ -612,10 +605,9 @@ Future<bool> _sendConnectFailureMessage(
612605 final json = jsonEncode (
613606 serializers.serialize (
614607 ConnectFailure (
615- (b) =>
616- b
617- ..tabId = dartAppTabId
618- ..reason = reason.name,
608+ (b) => b
609+ ..tabId = dartAppTabId
610+ ..reason = reason.name,
619611 ),
620612 ),
621613 );
@@ -634,11 +626,10 @@ Future<bool> _sendStopDebuggingMessage(
634626 final json = jsonEncode (
635627 serializers.serialize (
636628 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,
642633 ),
643634 ),
644635 );
@@ -747,10 +738,9 @@ DebuggerLocation? _debuggerLocation(int dartAppTabId) {
747738/// Construct an [ExtensionEvent] from [method] and [params] .
748739ExtensionEvent _extensionEventFor (String method, dynamic params) {
749740 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),
754744 );
755745}
756746
0 commit comments