Created with <3 with dartpad.dev.
Created
October 31, 2022 10:05
-
-
Save hongsw/9beef626a76d1120d3b5ede57e120b3c to your computer and use it in GitHub Desktop.
flying-ritual-7402
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:http/http.dart' as http; | |
import 'dart:convert'; | |
import 'package:flutter/material.dart'; | |
void main() async { | |
var jsonDomain = "gist.githubusercontent.com"; | |
var jsonUrl = "hongsw/67e0d72dffa2908e1715dc89a7b0e802/raw/9c5b1388bd52396ff1917b6928f3bda5fcd3b5c7/webtoon.json"; | |
var response = await http.get(Uri.https(jsonDomain,jsonUrl)); | |
var items = json.decode(utf8.decode(response.bodyBytes)); | |
var toons = items['toons']; | |
runApp(MaterialApp( | |
home: Scaffold( | |
appBar: AppBar(title: const Text("내폰내툰")), | |
body: Row( | |
children: toons.map((item) => | |
Column(children: [ | |
Image.network(item['image']!), | |
Text(item['title']!)]), | |
).toList() | |
)))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment