How to add data to an existing json file in assets folder in flutter based on input given by user?
CodePudding user response:
Create a model as your JSON and add the fromJson toJson method. Call the model class and pass your new data init. Read this documation: https://docs.flutter.dev/development/data-and-backend/json
CodePudding user response:
You cannot do this. Assets are read-only. Read this for options on how to persist data between app runs: https://docs.flutter.dev/cookbook/persistence