install static method

FakeOsIntentsPlatform install({
  1. bool donationsAccepted = true,
  2. int shortcutSlots = 15,
})

Installs a fresh fake and forgets whatever a previous test installed.

OsIntents.install keeps a static instance, so without the reset a second test would dispatch through the first test's registry — and the handlers there answer, so the failure looks like a wrong result rather than like stale state.

Implementation

static FakeOsIntentsPlatform install({
  bool donationsAccepted = true,
  int shortcutSlots = 15,
}) {
  OsIntents.debugReset();
  final fake = FakeOsIntentsPlatform(
    donationsAccepted: donationsAccepted,
    shortcutSlots: shortcutSlots,
  );
  OsIntentsPlatform.instance = fake;
  return fake;
}