testing library

Test helpers. Use FakeOkapiPlatform to unit-test permission logic and widget-test Okapi's UI without a device.

final fake = FakeOkapiPlatform(
  statuses: {OkapiPermission.camera: OkapiStatus.denied},
  requestResults: {OkapiPermission.camera: OkapiStatus.granted},
);
OkapiPlatform.instance = fake;

Classes

FakeOkapiPlatform
An in-memory OkapiPlatform for tests.

Functions

fakeAndroidDevice({OkapiOemBrand brand = OkapiOemBrand.xiaomi, int sdkInt = 34, String appName = 'Test App'}) → OkapiDeviceInfo
A ready-made Android phone for tests.