Skip to main content

relia_flutter 0.1.1 copy "relia_flutter: ^0.1.1" to clipboard
relia_flutter: ^0.1.1 copied to clipboard

Relia for Flutter apps: sessions, screens, taps, API calls and crashes, joined to your backend in one incident.

relia_flutter #

Relia for Flutter apps (Android and iOS): what people did, what broke, and which API call came just before it, joined to your backend in one incident.

Setup guide: https://tryrelia.com/docs/flutter-setup. A free Relia account: https://tryrelia.com.

import 'package:flutter/material.dart';
import 'package:relia_flutter/relia_flutter.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Relia.init(const ReliaOptions(projectId: '…', key: 'relia_live_…', serviceName: 'shop-app'));
  runApp(Relia.wrap(const MyApp()));
}

// screens: give routes names, and add the observer
MaterialApp(navigatorObservers: [Relia.navigatorObserver], …)
GoRouter(observers: [Relia.navigatorObserver], …)

Call Relia.init before runApp and before the app creates its HTTP clients: every HttpClient made after it is watched (the http package, dio, and HttpClient itself), with no change to your code.

Optional: Relia.identify(id, {'email': …, 'name': …, 'plan': …}), Relia.reset(), Relia.track(name), Relia.screen(name), Relia.captureError(error, stack), Relia.logWarning(message), Relia.testCrash() (also kind: 'java' or 'freeze' on Android).

What it records #

Screens the route's name (settings.name, go_router's route name or path template), never its arguments; dialogs and sheets are not screens
Taps the button's Key, else its tooltip / Semantics label, else its widget type; its text only with captureText: true, never from a text field
API calls method, address without its query, status, duration; a traceparent header only to the hosts in propagateTo (your backend, never a third party)
Why a call failed failed_online, timeout, offline, cancelled (the last two are never counted as failures)
Crashes a widget that fails to build or draw (the person saw it break) counts against crash-free people; other uncaught errors are recorded as crash groups that don't
Android crashes Java / Kotlin exceptions (a plugin's too), freezes ("app not responding": the main thread stuck 5 s), native crashes and memory kills, with the screen and the steps before them; sent when the app is opened again
The app start Android: from the process start to the first frame
The phone app version and build, model, system version, low / mid / high RAM, network type

A crash is kept on the phone until Relia has it (sent at once, and again on the next launch if it did not arrive). It never records typed text, screen pixels, a URL's query or an advertising id, and it chains Flutter's error hooks: Crashlytics, Sentry and your own handlers keep working.

Readable crashes #

A Flutter build without --obfuscate keeps function names and lines: crashes point at lib/…:line at once. Builds with --obfuscate --split-debug-info print addresses only; reading those needs the symbol upload, which is not built yet.

Not yet #

iOS native crashes and start time, and symbol upload for obfuscated builds (the default flutter build is not obfuscated: nothing to do).

Develop #

flutter pub get
flutter test      # a fake phone (test/fake.dart), a real local HTTP server, Flutter widget tests
flutter analyze

test/contract/ingest-body.json is what the SDK sends; backend/tests/test_flutter_contract.py reads the same file through the server's code. Change the wire format and both sides tell you (RELIA_UPDATE_CONTRACT=1 flutter test to accept a deliberate change). The demo app is examples/flutter-app.

0
likes
130
points
82
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Relia for Flutter apps: sessions, screens, taps, API calls and crashes, joined to your backend in one incident.

Homepage

License

MIT (license)

Dependencies

device_info_plus, flutter, package_info_plus, shared_preferences

More

Packages that depend on relia_flutter

Packages that implement relia_flutter