Add theme change event
Change-Id: Ie64b1181a87361dc10426d2941dfcac5e334c7b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/384322
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
diff --git a/pkg/dtd_impl/dtd_common_services_editor.md b/pkg/dtd_impl/dtd_common_services_editor.md
index f413c38..8a590d9 100644
--- a/pkg/dtd_impl/dtd_common_services_editor.md
+++ b/pkg/dtd_impl/dtd_common_services_editor.md
@@ -133,10 +133,18 @@
An event sent by an editor when a debug session is changed.
-This could be happen when a VM Service URI becomes available for a session
+This could happen when a VM Service URI becomes available for a session
launched in debug mode, for example.
+## themeChanged
+`ThemeChangedEvent`
+
+An event sent by an editor when its theme has changed.
+
+This could happen when a user changes their settings to toggle between light
+and dark mode or increase/decrease font size.
+
# Type Definitions
```dart
@@ -188,6 +196,11 @@
String? deviceId;
}
+/// An event sent by an editor when theme settings have changed.
+class ThemeChangedEvent {
+ Theme theme;
+}
+
/// A debug session running in the editor.
class EditorDebugSession {
String id;
@@ -218,6 +231,14 @@
bool supported;
}
+/// The description of an editor's theme.
+class Theme {
+ bool isDarkMode;
+ String? backgroundColor;
+ String? foregroundColor;
+ int? fontSize;
+}
+
/// Parameters for the `enablePlatformTypeParams` request.
class EnablePlatformTypeParams {
/// The `platformType` to enable.