import 'dart:developer';

void main() {
  Timeline.startSync('interesting function');
  // iWonderHowLongThisTakes();
  Timeline.finishSync();
}


            Then open DevTools’ Timeline events chart while connected to your app, 
verify the Dart recording option is checked in the Performance settings,
and perform the function you want to measure.

            Be sure to run your app in profile mode to ensure that the
runtime performance characteristics closely match that of your
final product.

            
Performance overlay

            
               Note:
  You can toggle display of the performance overlay on
  your app using the Performance Overlay button in the
  Flutter inspector. If you prefer to do it in code,
  use the following instructions.