import 'package:flutter_driver/flutter_driver.dart' as driver; import 'package:integration_test/integration_test_driver.dart'; Future main() { return integrationDriver( responseDataCallback: (Map? data) async { if (data != null) { final driver.Timeline timeline = driver.Timeline.fromJson( data['scrolling_timeline'] as Map, ); // Convert the Timeline into a TimelineSummary that's easier to // read and understand. final driver.TimelineSummary summary = driver.TimelineSummary.summarize(timeline); // Then, write the entire timeline to disk in a json format. // This file can be opened in the Chrome browser's tracing tools // found by navigating to chrome://tracing. // Optionally, save the summary to disk by setting includeSummary // to true await summary.writeTimelineToFile( 'scrolling_timeline', pretty: true, ); } }, ); }