flutter-isar-testing

Installation
SKILL.md

Flutter Isar Testing — In-Memory Setup

Problem

flutter test runs headless and can't find libisar.dylib on macOS. Isar.open() requires a real directory path (not null). Widget tests with the app's root widget crash (SIGTERM) because the app initializes Isar + all providers.

Solution: 3-Part Setup

1. Symlink libisar.dylib to project root

Isar looks for the native library in the project root. isar_flutter_libs has it but flutter test doesn't link it automatically.

ln -sf "$HOME/.pub-cache/hosted/pub.dev/isar_flutter_libs-*/macos/libisar.dylib" \
  "$PWD/libisar.dylib"

2. Test helper — openTestIsar()

Create test/helpers/test_helpers.dart:

Installs
1
GitHub Stars
1
First Seen
Sep 12, 2026
flutter-isar-testing — jahfaliabdulrahman-dev/hermes-skills