• 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
..
assertions_test.dart Loading commit data...
bit_field_test.dart Loading commit data...
caching_iterable_test.dart Loading commit data...
capture_output.dart Loading commit data...
change_notifier_test.dart Loading commit data...
collections_test.dart Loading commit data...
consolidate_response_test.dart Loading commit data...
constants_test.dart Loading commit data...
covariant_templates_test.dart Loading commit data...
debug_test.dart Loading commit data...
defines_test.dart Loading commit data...
diagnostics_json_test.dart Loading commit data...
diagnostics_test.dart Loading commit data...
double_precision_test.dart Loading commit data...
error_reporting_test.dart Loading commit data...
isolates_test.dart Loading commit data...
licenses_test.dart Loading commit data...
observer_list_test.dart Loading commit data...
platform_helper.dart Loading commit data...
print_test.dart Loading commit data...
reassemble_test.dart Loading commit data...
serialization_test.dart Loading commit data...
service_extensions_test.dart Loading commit data...
stack_frame_test.dart Loading commit data...
stack_trace_test.dart Loading commit data...
synchronous_future_test.dart Loading commit data...