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 ArticleHow 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
More Pages to Explore .....