logTest function

  1. @Deprecated('Remove TEST calls before release')
void logTest(
  1. String message, {
  2. int stackSkip = 0,
  3. int stackDeep = 3,
})

Implementation

@Deprecated('Remove TEST calls before release')
void logTest(String message, {int stackSkip = 0, int stackDeep = 3}) {
  final date = DateTime.now().toIso8601String();
  debugPrint(DSAnsiColor.fg(11)('$date\tTEST: ')
      + DSAnsiColor.bg(153)(message));

  final stackLines = StackTrace.current.toString().split('\n');
  final stackPart = stackLines.getRange(stackSkip + 1, stackLines.length + stackSkip - 1).take(stackDeep);
  for (final line in stackPart) {
    debugPrint(DSAnsiColor.fg(11)(line));
  }
}