2023-08-12 13:31:32 +00:00
|
|
|
import 'package:flutter_driver/flutter_driver.dart' as driver;
|
|
|
|
import 'package:integration_test/integration_test_driver.dart';
|
|
|
|
|
2023-10-02 09:53:26 +00:00
|
|
|
import 'utils/android_camera_permission.dart';
|
|
|
|
|
|
|
|
Future<void> main() async {
|
|
|
|
await grandCameraPermission();
|
|
|
|
await integrationDriver(
|
2023-08-12 13:31:32 +00:00
|
|
|
responseDataCallback: (data) async {
|
|
|
|
if (data != null) {
|
2023-10-02 09:53:26 +00:00
|
|
|
for (final String timelineName in data.keys) {
|
|
|
|
final timeline = driver.Timeline.fromJson(data[timelineName] as Map<String, dynamic>);
|
|
|
|
final summary = driver.TimelineSummary.summarize(timeline);
|
2023-08-12 13:31:32 +00:00
|
|
|
|
2023-10-02 09:53:26 +00:00
|
|
|
// Write the entire timeline and summary to disk in a json format.
|
|
|
|
// This file can be opened in the Chrome browser's tracing tools
|
|
|
|
// found by navigating to chrome://tracing.
|
|
|
|
await summary.writeTimelineToFile(
|
|
|
|
timelineName,
|
|
|
|
pretty: true,
|
|
|
|
);
|
|
|
|
}
|
2023-08-12 13:31:32 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
);
|
|
|
|
}
|