iLog function

void iLog(
  1. String message, {
  2. String tag = "iTwo",
  3. int framesIndex = 1,
  4. bool stack = true,
})

Implementation

void iLog(String message, {String tag = "iTwo", int framesIndex = 1,bool stack=true}) {
  bool kReleaseMode = bool.fromEnvironment('dart.vm.product', defaultValue: false);
  bool kProfileMode = bool.fromEnvironment('dart.vm.profile', defaultValue: false);
  if (kReleaseMode || kProfileMode) return;
  if(stack){
    var chain = Chain.current();
    var stackInfo = chain.traces[0].frames[framesIndex].toString();
    developer.log('$tag  ----> $stackInfo');
  }
  developer.log("$message");
}