profile function

  1. @Deprecated('Use `if (!kReleaseMode) { function(); }` instead. ' 'This feature was deprecated after v1.3.9.')
void profile (VoidCallback function)

DEPRECATED. function cannot be tree-shaken out of release builds.

Instead use:

if (!kReleaseMode) {
  function();
}

Implementation

@Deprecated(
  'Use `if (!kReleaseMode) { function(); }` instead. '
  'This feature was deprecated after v1.3.9.'
)
void profile(VoidCallback function) {
  if (kReleaseMode)
    return;
  function();
}