testing library

Test doubles for code built on flutter_local_ai.

Kept out of the main library so production code never pulls a fake in by accident:

import 'package:flutter_local_ai/testing.dart';

There is no OS model behind flutter test on any platform, so without a substitute host every AI path in an app is untestable. Install one with debugLocalAiHost, which the main library exports.

Classes

FakeLocalAiHost
A scriptable LocalAiHost that records what reached it and lets a test push events back the way a real platform would.
FakeLocalAiSession
One session the fake was asked to create, and everything sent to it.