dartlatexdocumentoverleaf

How to highlight Flutter / DART code segment in Overleaf Latex?


I made a project with Flutter, with Dart language, and I'm trying to write a report on it. I need to copy code segments to the document, however I can't highlight my dart code. The closest I can get is with the java highlight, but it's still not quite right...

\begin{minted}{java} 
//my dart code
\end{minted}

Thanks, I appreciate the help!


Solution

  • The minted package is based on Pygments. Pygments lists Dart as a supported language, so it should work (for me it works). May be the problem is otherwise. Two possible problems/solutions: