printStackTraceIfType function
Implementation
void printStackTraceIfType(Object object, String type) {
if (!logOff && logStackTraces) {
bool shouldPrint;
if (object.runtimeType.toString() == type ||
(object is Element && object.widget.runtimeType.toString() == type)) {
shouldPrint = true;
} else shouldPrint = false;
if (shouldPrint) {
_print('************************************************');
_print(StackTrace.current);
_print('************************************************');
}
}
}