E2EWidgetsFlutterBinding constructor


Sets up a listener to report that the tests are finished when everything is torn down.


E2EWidgetsFlutterBinding() {
  // TODO(jackson): Report test results as they arrive
  tearDownAll(() async {
    try {
      // For web integration tests we are not using the
      // `plugins.flutter.io/e2e`. Mark the tests as complete before invoking
      // the channel.
      if (kIsWeb) {
        if (!_allTestsPassed.isCompleted) {
      await _channel.invokeMethod<void>(
        <String, dynamic>{'results': _results},
    } on MissingPluginException {
      print('Warning: E2E test plugin was not detected.');
    if (!_allTestsPassed.isCompleted) _allTestsPassed.complete(true);