Skip to content

Commit 350ea9f

Browse files
committed
Use block function for _debugSessionForTab
1 parent 51dba6e commit 350ea9f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

dwds/debug_extension/web/debug_session.dart

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -651,13 +651,14 @@ Future<bool> _sendStopDebuggingMessage(
651651
);
652652
}
653653

654-
_DebugSession? _debugSessionForTab(int tabId, {required TabType type}) =>
655-
switch (type) {
656-
TabType.dartApp =>
657-
_debugSessions.firstWhereOrNull((session) => session.appTabId == tabId),
658-
TabType.devTools => _debugSessions
659-
.firstWhereOrNull((session) => session.devToolsTabId == tabId)
660-
};
654+
_DebugSession? _debugSessionForTab(int tabId, {required TabType type}) {
655+
return switch (type) {
656+
TabType.dartApp =>
657+
_debugSessions.firstWhereOrNull((session) => session.appTabId == tabId),
658+
TabType.devTools => _debugSessions
659+
.firstWhereOrNull((session) => session.devToolsTabId == tabId)
660+
};
661+
}
661662

662663
Future<bool> _authenticateUser(int tabId) async {
663664
final isAlreadyAuthenticated = await _fetchIsAuthenticated(tabId);

0 commit comments

Comments
 (0)