In Flutter or Dart projects texts printed with print function are colored like other texts. How to print colored texts? My editor is VSCode.
There is a package named logger which prints texts colored and well structured. You can use it as following:
import 'package:logger/logger.dart';
void main() {
final logger = Logger();
logger.e('Error');
logger.i('Info');
logger.w('Warning');
logger.d('Debug');
logger.f('Fatal');
logger.log(Level.error, 'Error message');
}
The result in the console:

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With