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:
@@ -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/).
|
||||
BIN
load_local_json/demo_img.gif
Normal file
BIN
load_local_json/demo_img.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 MiB |
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user