Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixed linting errors
  • Loading branch information
jyameo committed Nov 26, 2025
commit 7d9846114f4aa1cc1f98cd197244cbc2d4db9a18
4 changes: 2 additions & 2 deletions dwds/lib/src/debugging/debugger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Debugger {
this._streamNotify,
this._locations,
this._skipLists,
root,
String root,
) : _breakpoints = _Breakpoints(
locations: _locations,
remoteDebugger: _remoteDebugger,
Expand Down Expand Up @@ -757,7 +757,7 @@ Future<T> sendCommandAndValidateResult<T>(
params,
);
}
return result;
return result as T;
}

/// Returns the breakpoint ID for the provided Dart script ID and Dart line
Expand Down
3 changes: 2 additions & 1 deletion dwds/lib/src/debugging/inspector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ abstract class AppInspector {
final parts = scripts[uri];
final scriptRefs = [
ScriptRef(uri: uri, id: createId()),
for (final part in parts ?? []) ScriptRef(uri: part, id: createId()),
for (final part in parts ?? [])
ScriptRef(uri: part as String?, id: createId()),
];
final libraryRef = await libraryHelper.libraryRefFor(uri);
final libraryId = libraryRef?.id;
Expand Down
4 changes: 3 additions & 1 deletion dwds/lib/src/debugging/metadata/class.dart
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ class ChromeClassMetaDataHelper {

final typeName = metadata['typeName'];
final library = metadata['libraryId'];
final runtimeKind = RuntimeObjectKind.parse(metadata['runtimeKind']);
final runtimeKind = RuntimeObjectKind.parse(
metadata['runtimeKind'] as String,
);
final length = metadata['length'];

final classRef = classRefFor(library, className);
Expand Down
9 changes: 6 additions & 3 deletions dwds/lib/src/dwds_vm_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ abstract base class DwdsVmClient<
);
return;
}
_requestSink.add(Map<String, Object>.from(jsonDecode(request)));
_requestSink.add(Map<String, Object>.from(jsonDecode(request) as Map));
});
return client;
}
Expand Down Expand Up @@ -283,8 +283,11 @@ abstract base class DwdsVmClient<
return <String, Object>{
'result': <String, Object>{
'views': <Object>[
for (final isolate in isolates ?? [])
<String, Object>{'id': isolate.id, 'isolate': isolate.toJson()},
for (final IsolateRef isolate in isolates ?? [])
<String, Object>{
'id': isolate.id ?? '',
'isolate': isolate.toJson(),
},
],
},
};
Expand Down
2 changes: 1 addition & 1 deletion dwds/lib/src/services/batched_expression_evaluator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class BatchedExpressionEvaluator extends ExpressionEvaluator {
request.completer.complete(result);
}),
onError: (error, stackTrace) =>
request.completer.completeError(error, stackTrace),
request.completer.completeError(error as Object, stackTrace),
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion dwds/lib/src/services/chrome/chrome_debug_exception.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ final class ChromeDebugException extends ExceptionDetails implements Exception {
this.evalContents,
}) : super(exceptionDetails) {
final json = exceptionDetails['stackTrace'];
stackTrace = json == null ? null : StackTrace(json);
stackTrace = json == null ? null : StackTrace(json as Map<String, dynamic>);
}

@override
Expand Down
10 changes: 6 additions & 4 deletions dwds/lib/src/services/chrome/chrome_proxy_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import 'package:dwds/src/utilities/shared.dart';
import 'package:logging/logging.dart' hide LogRecord;
import 'package:vm_service/vm_service.dart' hide vmServiceVersion;
import 'package:vm_service_interface/vm_service_interface.dart';
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart';
import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'
hide StackTrace;

/// A proxy from the chrome debug protocol to the dart vm service protocol.
final class ChromeProxyService extends ProxyService<ChromeAppInspector> {
Expand Down Expand Up @@ -1254,7 +1255,7 @@ final class ChromeProxyService extends ProxyService<ChromeAppInspector> {
break;
case 'dart.developer.log':
await _handleDeveloperLog(isolateRef, event).catchError(
(error, stackTrace) => _logger.warning(
(Object error, StackTrace stackTrace) => _logger.warning(
'Error handling developer log:',
error,
stackTrace,
Expand All @@ -1277,7 +1278,7 @@ final class ChromeProxyService extends ProxyService<ChromeAppInspector> {
// `RemoteObject.preview` which only has truncated log messages:
// https://chromedevtools.github.io/devtools-protocol/tot/Runtime/#type-RemoteObject
final logParams = objectId != null
? await _fetchFullLogParams(objectId, logObject: logObject)
? await _fetchFullLogParams(objectId as String, logObject: logObject)
: _fetchAbbreviatedLogParams(logObject);

final logRecord = LogRecord(
Expand Down Expand Up @@ -1330,7 +1331,8 @@ final class ChromeProxyService extends ProxyService<ChromeAppInspector> {

Map<String, RemoteObject> _fetchAbbreviatedLogParams(Map? logObject) {
final logParams = <String, RemoteObject>{};
for (final dynamic property in logObject?['preview']?['properties'] ?? []) {
final properties = logObject?['preview']?['properties'] as List? ?? [];
for (final dynamic property in properties) {
if (property is Map<String, dynamic> && property['name'] != null) {
logParams[property['name'] as String] = RemoteObject(property);
}
Expand Down
4 changes: 3 additions & 1 deletion dwds/lib/src/services/debug_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ abstract class DebugService<T extends ProxyService> {
'socket, expected a List<int> or String.',
);
}
final request = Map<String, Object>.from(jsonDecode(value));
final request = Map<String, Object>.from(
jsonDecode(value as String) as Map,
);
if (onRequest != null) onRequest(request);
return request;
});
Expand Down
2 changes: 1 addition & 1 deletion dwds/lib/src/utilities/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,5 @@ Map<String, dynamic> getResultOrHandleError(
'text': 'null result from Chrome Devtools',
}, evalContents: evalContents);
}
return result;
return result as Map<String, dynamic>;
}