title: How to access assets in package
body: <blockquote>
  <p>The original question comes from flutter <a href="https://github.com/flutter/flutter/issues/32799" rel="nofollow noreferrer">issue 32799</a></p>
  </blockquote>
  <p>I develop a dart package, i need load some json file in runtime, but when I do this occur an error. load image is no problem ,the code:</p>
  <pre class="lang-dart prettyprint-override"><code>void main() {
    Future&lt;void&gt; loadAsset() async {
      String value = await rootBundle
          .loadString('lib/src/assets/JsonConfig/test.json');
  
      //Image img = Image.asset('lib/src/assets/default-logo.png');
    }
  
    test('adds one to input values', () async {
      await loadAsset();
    });
  }
  </code></pre>
  <p>my pubspec.yaml file like this:</p>
  <pre class="lang-yaml prettyprint-override"><code>flutter:
    # To add assets to your package, add an assets section, like this:
     assets:
     - lib/src/assets/default-logo.png
     - lib/src/assets/JsonConfig/test.json
     - lib/src/assets/
  </code></pre>