-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyAndroid applications specifically
Description
Since Froyo, Android has had a Dark Mode feature. We should implement it.
This Java code detects if it's enabled:
(mContext.getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_YES;The activity or fragment's onConfigurationChange apparently triggers when this changes.
We should propagate this state to the MediaQuery somehow (via a system channel, I guess, though we would need to find a way to send the data early in the process so that it's available on first build).
MaterialApp should switch between its regular theme and a darkTheme automatically based on this setting.
audkar
Metadata
Metadata
Assignees
Labels
engineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyAndroid applications specifically