akvelon / dart-highlighting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Export "allLanguages" map to be able to retrieve language id from a language name

javiermrz opened this issue · comments

  • Issue type: Feature request
  • Package: flutter_highlighting

Hi! I checked the docs and went through the code a little bit and I didn't find a way of retrieving the language id from the language name as string, i.e. "dart". I saw in the code a Map<String, Language> allLanguages which is exactly what I need to do something like int? languageId = allLanguages[languageName];, but I think this variable is not being exported and cannot be used outside the project.

Thanks a lot!

I'm closing this as I saw you can actually import this variable, but you have to import the file import 'package:highlighting/languages/all.dart'; manually (at least my IDE wasn't capable of automatically import it.