testing library

Test doubles for apps that use flutter_device_ai.

FlutterDeviceAiPlatform.instance = FakeOnDeviceAiPlatform(
  responder: (prompt, history) => 'Echo: $prompt',
);

Classes

FakeOnDeviceAiPlatform
In-memory platform implementation for unit and widget tests.
FakeSession
State of one fake conversation.

Typedefs

FakeResponder = FutureOr<String> Function(String prompt, List<String> transcript)
Computes the model's reply from the latest user text and the transcript (User: ... / Assistant: ... lines, oldest first).