title: How to read assets JSON file from different package in flutter?
body: <p>I am working on a flutter app where I'm using multiple plugins for main app </p>
  
  <pre><code>main_app
  -plugin1
   -example
  -plugin2
   -example
  -plugin3
   --example
  package as well 
  - &lt;package_name&gt;
  </code></pre>
  
  <p>every plugin have its own example folder which help me to test the UI and most of UI using common images  and icons which is kept in pure flutter package separately:</p>
  
  <pre><code>framework_utilities:&lt;--(package)
     assets:
      - assets/
      - assets/images/green/2x/
      - assets/mockup/reg_state.json &lt;--- JSON file
     lib
       src
         constant
  </code></pre>
  
  <p>and I'm able to access images and icons by passing the package reference :</p>
  
  <pre><code>Image.asset("assets/barcode.png", package: "framework_utilities", width: 70.0, height: pad_30),
  </code></pre>
  
  <p>now my requirement is I want to mockup whole app without including json file to main application level. </p>
  
  <p>It works fine if I include json file inside the assets folder in main application but I don't want to make the copy of json file inside the plugin and application i want to keep it in a single place and read it. </p>
  
  <p>I tried </p>
  
  <pre><code>rootBundle.loadString('assets/reg_state.json')
  </code></pre>
  
  <p>it works only individual plugin example level.</p>
  
  <p>Why I need to read json file ?</p>
  
  <p>If I mockup main app or individual plugin so I can provide a dummy json data to see the UI.</p>