Field Track 360

What your app must implement

01 Sept 2026 · Field Track 360

1. Startup order - subscribe first, but do not block your first frame

ready() is what reports a session a crash left open, and the event stream has no replay, so a listener attached afterwards misses it.

``` void main() { WidgetsFlutterBinding.ensureInitialized(); TrackIt.instance.events.listen(handleEvent); // subscribe FIRST

// Started here, awaited in the UI. Not awaited before runApp. final ready = TrackIt.instance.ready().timeout(const Duration(seconds: 15));

runApp(MyApp(ready: ready)); } ```

Awaiting a platform-channel call before runApp means any stall on the native side shows up as an app frozen on its splash screen, with nothing on screen to say why. Paint first, resolve readiness behind a visible state, and keep SDK-dependent controls disabled until it answers.

2. Permissions are yours to trigger

The SDK decides which permissions this OS version needs and in what order; your app decides when to ask and provides the rationale. Nothing is requested automatically. Requesting the whole ladder at launch is the reliable way to get permanently denied.

3. Use the SDK's own one-shot fix for map centring

A second location package answers from its own permissions, provider choice and accuracy settings, so it will quietly disagree with the puck the engine draws.

4. Rendering is yours; the geometry is not

Decode with decodePolyline at track.precision and place track.arrows where the SDK put them rather than computing your own.

5. Recover interrupted sessions at launch

Handle it by event and by pull - a session can still be open after a crash or kill.

6. Branch on the typed error code, never the message