profile function

  1. @Deprecated('Use `if (!kReleaseMode) { function(); }` instead')
void profile (VoidCallback function)

DEPRECATED. function cannot be treeshaken out of release builds.

Instead use:

if (!kReleaseMode) {
  function();
}

Implementation

@Deprecated('Use `if (!kReleaseMode) { function(); }` instead')
void profile(VoidCallback function) {
  if (kReleaseMode)
    return;
  function();
}