Closed theswerd closed 4 years ago
@Henrymarks1 Please update with
Commit #41eb20c
@Henrymarks1 please do a writeup on proper usage
Please add to the the apps readme.md when completed
@Henrymarks1 Are you able to write up the read me that Ben asked for? If you have questions @ Ben here for help.
import 'dart:io';
void readFileSync() { String contents = new File('./assets/user.json').readAsStringSync(); print(contents); }
Also please make the method take a string, so that it can be used for more than one feature
@Henrymarks1
Overview
Given .json assets, the app news to be able to access there data and populate its views with them.
Action Items
Resources/Instructions
Flutter packages Stack Overflow answer
String data = await DefaultAssetBundle.of(context).loadString("assets/data.json");
final jsonResult = json.decode(data);