inheriting Theme from app #218
Answered
by
hm21
amirharati
asked this question in
Q&A
-
Hi, I wonder if there is a way to inherent the general them like background color, navbar and app bar themes from the main app? |
Beta Was this translation helpful? Give feedback.
Answered by
hm21
Sep 13, 2024
Replies: 1 comment 4 replies
-
Currently, there is no direct method to inherit the general theme. To apply the general theme in the editor, you will need to manually add it to the editor's theme, as shown below. var theme = Theme.of(context);
return ProImageEditor.asset(
ExampleConstants.of(context)!.demoAssetPath,
key: editorKey,
configs: ProImageEditorConfigs(
imageEditorTheme: ImageEditorTheme(
background: theme.scaffoldBackgroundColor,
appBarBackgroundColor:
theme.appBarTheme.backgroundColor ?? const Color(0xFF000000)),
/// more...
),
); |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If no parameter is set to modify the bottom-navbar, the editor will default to the standard theme. Additionally, you can apply a custom theme to the editor directly, as shown below:
If you want to modify an entire widget, such as replacing the full app-bar, you can refer to this example, which demonstrates how to replace most widgets.