void _experimentWithAnalyticsErrorReporting()

in web/main.dart [14:28]


void _experimentWithAnalyticsErrorReporting() {
  const target = 'error';
  var input = '';
  window.onKeyPress.listen((event) {
    input = '$input${event.key}';
    if (input == target) {
      input = '';
      throw StateError('you typed error');
    } else if (target.startsWith(input)) {
      print('"$input" of "$target"');
    } else {
      input = '';
    }
  });
}