title: Is it possible to use a flutter plugin's platform code from my app's platform code?
body: <p>I've been working with Flutter for more than a year now and that's how I got started to Android development.</p>
  <p>As the need for android services and other things came to our requirements, I began immersing myself to more and more Java Android, which I'm not really that used to working with admittedly.</p>
  <p>So the question really is, can I use a flutter plugin's Java code and use the exposed methods?</p>
  <p>I'm specifically interested in <code>flutter_secure_storage</code>'s functions so that I could use them outside of Dart.</p>
  <p>I know I could just copy the code over, but if there's a better way to reference the project over, I don't have to have the same code on 2 different places.</p>
  <p>Additional Info: I initially felt that I can just use the following code:</p>
  <pre><code>final HashMap&lt;String, String&gt; args = new HashMap&lt;&gt;();
  args.put(&quot;key&quot;, &quot;some-key&quot;);
  args.put(&quot;value&quot;, &quot;some-value&quot;);
  final MethodCall mc = new MethodCall(&quot;put&quot;, args);
  new FlutterSecureStoragePlugin().onMethodCall(mc, new MethodChannel.Result() {
     @Override
     public void success(@Nullable Object result) {
         // do something
     }
  
     // other overrides
          
  });
  </code></pre>
  <p>But the plugins require an instance of a <code>BinaryMessenger</code> to initialize the <code>MethodChannel</code> - at the very least, what I think I can do is to create an instance of the <code>FlutterEngine</code> to initialize the plugin first before calling <code>onMethodCall</code>.</p>