Closed CodingSmiles closed 1 year ago
I can't see this comment on Github, so I'm replying with an email. Unfortunately, I don't know any solutions to the error. There must be something but I'm definitely not the right person to ask this to. I left that project months ago now 😅
On Tue, Oct 3, 2023 at 11:30 AM SunMin,Kim @.***> wrote:
@CodingSmiles https://github.com/CodingSmiles Is there a solution to this error?
— Reply to this email directly, view it on GitHub https://github.com/BertrandBev/code_field/issues/77#issuecomment-1744262270, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW2BCF6HGED7T72RMXMVZ3LX5OSZLAVCNFSM6AAAAAAYB5E6EOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBUGI3DEMRXGA . You are receiving this because you were mentioned.Message ID: @.***>
Replying to myself here, I did a little bit of work and made it work
[image: image.png]
Sorry if I'm doing it wrong or nobody asked about this.
On Tue, Oct 3, 2023 at 2:30 PM Aadiraj Anil @.***> wrote:
I can't see this comment on Github, so I'm replying with an email. Unfortunately, I don't know any solutions to the error. There must be something but I'm definitely not the right person to ask this to. I left that project months ago now 😅
On Tue, Oct 3, 2023 at 11:30 AM SunMin,Kim @.***> wrote:
@CodingSmiles https://github.com/CodingSmiles Is there a solution to this error?
— Reply to this email directly, view it on GitHub https://github.com/BertrandBev/code_field/issues/77#issuecomment-1744262270, or unsubscribe https://github.com/notifications/unsubscribe-auth/AW2BCF6HGED7T72RMXMVZ3LX5OSZLAVCNFSM6AAAAAAYB5E6EOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONBUGI3DEMRXGA . You are receiving this because you were mentioned.Message ID: @.***>
Replying to myself here, I did a little bit of work and made it work [image: image.png] Sorry if I'm doing it wrong or nobody asked about this.
Your image isn't showing. How did you get themes to work?
So instead of returning a CodeField
:
return CodeField(
controller: _codeController!,
textStyle: TextStyle(fontFamily: 'SourceCode'),
);
We need to return a CodeTheme
with the CodeField
as a child:
return CodeTheme(
data: const CodeThemeData(styles: monokaiSublimeTheme),
child: CodeField(
controller: _codeController!,
textStyle: const TextStyle(fontFamily: 'SourceCode'),
),
);
I am not able to use the CodeController's option to add a theme. Here is my issue My error message: The named parameter 'theme' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'theme'.