Start Debugging

testing

28 posts · Page 1 of 3

2026-11-11 flutterdarttesting

How to call the real path_provider in a Flutter test instead of getting MissingPluginException

flutter test never runs the Dart plugin registrant, so getTemporaryDirectory() hits the MethodChannel default and throws MissingPluginException. On a macOS, Windows or Linux host you can register the host implementation (PathProviderFoundation 2.6.0+ is FFI, not a channel), use a temp-dir PathProviderPlatform fake, or run integration_test on desktop. Checked on Flutter 3.44.8 with path_provider 2.1.6.
Next