Testing Flutter code that uses a plugin and platform channel : <p>I have a flutter plugin which uses the platform channel to do some native work.</p>

<p>How do I properly write tests for my application that requires this plugin?</p>

<p>Unit tests only are good for pure dart functions. I don't believe Widget testing will be able to test things that use the platform channel to native. So that leaves integration testing.</p>

<p>From what I understand is that integration testing will start your main application and you can control it around your app and test things.</p>

<p>For my case, I want to test just the code that uses the plugin (that uses the platform channel for native stuff).</p>

<p>Also what is important is the values that come back from the platform channel, so it is important to call the native side using a real platform channel and not a mock one.</p>

<p>Is that possible? Can I tell the integration tester to open a dummy version of my application, kind of like an integrated widget tester?</p>
