title: Flutter: Unable to load text assets
body: <p>My file <code>endpoints.json</code> is in <code>/WORKPLACE_DIR/assets/json/endpoints.json</code></p>
  
  <pre><code>{
    "key": "value"
  }
  </code></pre>
  
  <p>I have updated my <code>pubspec.yaml</code></p>
  
  <pre><code>assets:
      - assets/json/endpoints.json
  </code></pre>
  
  <p>In <code>/tests/some_test.dart</code></p>
  
  <p>I do</p>
  
  <pre><code>test('my test', () async {
        final endpoints = json.decode(await rootBundle.loadString("assets/json/endpoints.json"));
      }
  </code></pre>
  
  <p>It still gives an error</p>
  
  <pre><code>ERROR: Unable to load asset: assets/json/endpoints.json
  package:flutter/src/services/asset_bundle.dart 221:7  PlatformAssetBundle.load
  ===== asynchronous gap ===========================
  dart:async                                            _AsyncAwaitCompleter.completeError
  package:flutter/src/services/asset_bundle.dart        PlatformAssetBundle.load
  ===== asynchronous gap ===========================
  dart:async                                            _asyncThenWrapperHelper
  package:flutter/src/services/asset_bundle.dart        PlatformAssetBundle.load
  package:flutter/src/services/asset_bundle.dart 67:33  AssetBundle.loadString
  </code></pre>
  
  <p>I have tried <code>flutter clean</code> but it still gives this error. I am not sure what to do.</p>