1
0
mirror of https://github.com/nisrulz/flutter-examples.git synced 2026-03-21 22:18:28 +00:00

updated readme of each example with a screenshot/gif and more details about the example.

added more comments to code
This commit is contained in:
Nishant Srivastava
2017-08-26 18:08:28 -07:00
parent defc273b1e
commit b526955129
28 changed files with 134 additions and 51 deletions

View File

@@ -1,8 +1,10 @@
# load_local_json
# Load Local JSON
Example app showing implementation which loads up a json file from a local folder.
<img src="demo_img.gif" height="600em" />
A new Flutter project.
## Getting Started
For help getting started with Flutter, view our online
[documentation](http://flutter.io/).
For help getting started with Flutter, view online [documentation](http://flutter.io/).

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

View File

@@ -30,9 +30,11 @@ class MyAppState extends State<MyApp> {
.of(context)
.loadString('data_repo/starwars_data.json'),
builder: (context, snapshot) {
// Decode the JSON
var new_data = JSON.decode(snapshot.data.toString());
return new ListView.builder(
// Build the ListView
itemBuilder: (BuildContext context, int index) {
return new Card(
child: new Column(