alexeyinkin commented on code in PR #22477:
URL: https://github.com/apache/beam/pull/22477#discussion_r931473171
##########
playground/frontend/lib/config/theme.dart:
##########
@@ -16,20 +16,46 @@
* limitations under the License.
*/
+import 'package:code_text_field/code_text_field.dart';
import 'package:flutter/material.dart';
import 'package:playground/constants/colors.dart';
import 'package:playground/constants/font_weight.dart';
import 'package:playground/constants/fonts.dart';
import 'package:playground/constants/sizes.dart';
+import 'package:playground/modules/editor/components/editor_themes.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
const kThemeMode = 'theme_mode';
-class ThemeProvider extends ChangeNotifier {
+class ThemeSwitchNotifier extends ChangeNotifier {
Review Comment:
The old theme handling was the following. The switch notifier was hanged in
the tree by `Provider`. Those who needed colors were getting the switch
notifier and then the theme from its `isDark` property. The theme itself was
not hanging in the tree so it could not be overridden.
Now we need to partially override theme colors for the semi-transparent
sharing button.
For this, I changed the following:
- Renamed the switch notifier so it is distinguished from theme provider
itself.
- Added a theme provider that listens to the switcher and provides the theme
to its children.
- Combined them into `ThemeSwitchNotifierProvider`.
- Added `ThemeColors.copyWith` for partial overriding.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]