How to set default colour when adding text #594
PhantomRay
started this conversation in
General
Replies: 1 comment
-
|
Currently, setting the initial color through the configs isn’t supported. This will be possible starting with version In the meantime, you can use callbacks to achieve that, like in the example below: return ProImageEditor.asset(
kImageEditorExampleAssetPath,
key: editorKey,
callbacks: ProImageEditorCallbacks(
textEditorCallbacks: TextEditorCallbacks(
onAfterViewInit: () {
final mainEditor = editorKey.currentState!;
mainEditor.textEditor.currentState!
..primaryColor = Color(0xFFFF0000)
..secondaryColor = Color(0xFF0000FF)
..backgroundColorMode =
LayerBackgroundMode.backgroundAndColorWithOpacity;
},
),
),
); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, when adding text to the photo, it is default to black. If I were to set it to red by default, how to do that?
I could remove the background by default though.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions