• Jonah Williams's avatar
    [flutter_tools] add toggle `b` and service extension to change platform brightness (#59571) · e1f4cfb4
    Jonah Williams authored
    A frequent request from the last Flutter developer survey was for an easier method of testing light/dark mode changes. Currently, a user needs to manually change the theme settings or adjust phone settings to see the difference. Instead we should add a toggle from the CLI, and eventually devtools/Intellij/Vscode that allows developers to override the current setting.
    
    Fixes #59495
    
    Adds flutter.ext.brightnessOverride service protocol which either queries the current platform brightness, or overrides it to a new value. This accepts either Brightness.light or Brightness.dark as a value.
    
    Adds a CLI toggle b which allows the setting to be toggled manually.
    
    Requires an update to the MediaQuery, to conditionally use a debug override when not in release mode
    e1f4cfb4
Name
Last commit
Last update
..
README.md Loading commit data...
_bitfield_io.dart Loading commit data...
_bitfield_web.dart Loading commit data...
_isolates_io.dart Loading commit data...
_isolates_web.dart Loading commit data...
_platform_io.dart Loading commit data...
_platform_web.dart Loading commit data...
annotations.dart Loading commit data...
assertions.dart Loading commit data...
basic_types.dart Loading commit data...
binding.dart Loading commit data...
bitfield.dart Loading commit data...
change_notifier.dart Loading commit data...
collections.dart Loading commit data...
consolidate_response.dart Loading commit data...
constants.dart Loading commit data...
debug.dart Loading commit data...
diagnostics.dart Loading commit data...
isolates.dart Loading commit data...
key.dart Loading commit data...
licenses.dart Loading commit data...
node.dart Loading commit data...
object.dart Loading commit data...
observer_list.dart Loading commit data...
platform.dart Loading commit data...
print.dart Loading commit data...
serialization.dart Loading commit data...
stack_frame.dart Loading commit data...
synchronous_future.dart Loading commit data...
unicode.dart Loading commit data...