Unverified Commit 63c58a33 authored by Lau Ching Jun's avatar Lau Ching Jun Committed by GitHub

Make `handleJsonEvent` public so that it can be overridden internally. (#139531)

parent 2c613504
...@@ -472,7 +472,7 @@ class FlutterDebugAdapter extends FlutterBaseDebugAdapter with VmServiceInfoFile ...@@ -472,7 +472,7 @@ class FlutterDebugAdapter extends FlutterBaseDebugAdapter with VmServiceInfoFile
} }
/// Handles incoming JSON events from `flutter run --machine`. /// Handles incoming JSON events from `flutter run --machine`.
void _handleJsonEvent(String event, Map<String, Object?>? params) { void handleJsonEvent(String event, Map<String, Object?>? params) {
params ??= <String, Object?>{}; params ??= <String, Object?>{};
switch (event) { switch (event) {
case 'daemon.connected': case 'daemon.connected':
...@@ -646,7 +646,7 @@ class FlutterDebugAdapter extends FlutterBaseDebugAdapter with VmServiceInfoFile ...@@ -646,7 +646,7 @@ class FlutterDebugAdapter extends FlutterBaseDebugAdapter with VmServiceInfoFile
final Object? params = payload['params']; final Object? params = payload['params'];
final Object? id = payload['id']; final Object? id = payload['id'];
if (event is String && params is Map<String, Object?>?) { if (event is String && params is Map<String, Object?>?) {
_handleJsonEvent(event, params); handleJsonEvent(event, params);
} else if (id != null && method is String && params is Map<String, Object?>?) { } else if (id != null && method is String && params is Map<String, Object?>?) {
_handleJsonRequest(id, method, params); _handleJsonRequest(id, method, params);
} else if (id is int && _flutterRequestCompleters.containsKey(id)) { } else if (id is int && _flutterRequestCompleters.containsKey(id)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment