printError function

void printError(
  1. dynamic err, [
  2. dynamic trace,
  3. dynamic message
])

Implementation

void printError(dynamic err, [dynamic trace, dynamic message]) {
  if (!foundation.kDebugMode) {
    return;
  }

  final shouldHide = trace == null ||
      '$trace'.isEmpty ||
      '$trace'.contains('package:estore_ui');
  if (shouldHide) {
    logger.d(err, message, StackTrace.empty);
    return;
  }

  logger.e(err, message ?? 'Stack trace:', trace);
}