Quantcast
Channel: How to read local json import in flutter? - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Christopher Moore for How to read local json import in flutter?

You should look into loading assets in flutter. You can't simply import an arbitrary file. Importing is for source code/libraries.You need to declare this file as an asset in your pubspec.yamlflutter:...

View Article



How to read local json import in flutter?

I have a JSON file in the flutter directory, not in assets.json_data.json:- {"foo" : "bar" }I want to read this JSON on different files.likemyfile.dart:- import "package:mypackage/json_data.json" as...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>