Skip to content
CloseYourItdocsPages

Documentation / Connect / Connect your apps

Dart / Flutter

The closeyourit package captures the errors of Flutter apps, even when the phone is offline.

What it collects

On its own:

  • the app's unhandled exceptions;
  • user, tags and the history before the error.

When you ask for it:

  • logs, with CloseYourIt.log;
  • slow methods, with measure();
  • performance issues: interface stutter, too many rebuilds, slow or repeated HTTP calls;
  • usage telemetry.

An error that happens without a network is saved on the device and sent again at the next start.

Install

flutter pub add closeyourit

Configure

await CloseYourIt.init(
  CloseYourItOptions(
    endpointUrl: "https://bugs.example.com",
    publicKey: "<public key>",
    projectId: "<project id>",
  ),
  appRunner: () => runApp(const MyApp()),
);

appRunner starts the app in a guarded zone to capture Dart exceptions. Flutter web and mobile are in scope within documented limits. Native iOS/Android crashes require separate integrations still in development; desktop clients remain outside the roadmap.

Good to know

A distributed app uses publicKey, never a secret bearer token. From version 0.9.3 it sends public errors, logs, measure() and the four optional performance checks. Version 0.8.3 and earlier send public errors only.

Logs and metrics get one delivery attempt, without an offline queue or automatic retries. The existing offline queue applies to errors. Usage telemetry remains server-only.