hackforla / new-schools-today

An open-source project to modernize online school resources led by students
16 stars 7 forks source link

App interpreting JSON Data #30

Closed theswerd closed 4 years ago

theswerd commented 4 years ago

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);

ExperimentsInHonesty commented 4 years ago

@Henrymarks1 Please update with

  1. Progress
  2. Blocks
  3. Availability
  4. ETA.
theswerd commented 4 years ago

Commit #41eb20c

theswerd commented 4 years ago

@Henrymarks1 please do a writeup on proper usage

theswerd commented 4 years ago

Please add to the the apps readme.md when completed

JacobZwang commented 4 years ago

@Henrymarks1 Are you able to write up the read me that Ben asked for? If you have questions @ Ben here for help.

theswerd commented 4 years ago

import 'dart:io'; void readFileSync() { String contents = new File('./assets/user.json').readAsStringSync(); print(contents); }

theswerd commented 4 years ago

Also please make the method take a string, so that it can be used for more than one feature

@Henrymarks1