I’m trying to compile a dart project by using the command
However, this will generate random identifiers for all objects, which will ruin all logging information when it prints the object name.
For example, “Object = K1” is printed instead of “Object = Mirror”.
Is there a way to keep all dart names, while compiling to
I also tried:
pub build --mode=debug
…but the downside is that for production builds, debug mode is now allowed.
Is there any production build approach for this issue?
You can disable minification in pubspec.yaml:
transformers: - $dart2js: minify: false
See here for more details about the pub transformer.
Answered By – Danny Tuppeny
Answer Checked By – Mary Flores (FlutterFixes Volunteer)