Skip to content

Instantly share code, notes, and snippets.

@hongsw
Created October 27, 2022 09:50
Show Gist options
  • Save hongsw/16cd07100566fc3f2391e418b71d3b65 to your computer and use it in GitHub Desktop.
Save hongsw/16cd07100566fc3f2391e418b71d3b65 to your computer and use it in GitHub Desktop.
Flutter K-Web Toon Mini with JSON 

Flutter K-Web Toon Mini with JSON 

Created with <3 with dartpad.dev.

import 'dart:core';
import 'package:flutter/material.dart';
void main(){
runApp(MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.lightGreen,
),
home: WebtoonHomePage(),
));
}
class WebtoonHomePage extends StatelessWidget {
final toon = [
{
"title": "이상한 변호사 우영우",
"image": "https://my-k-toon.web.app/webtoon/1.png"
},
{
"title": "외모지상주의",
"image": "https://my-k-toon.web.app/webtoon/2.png"
}
];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
toolbarHeight: 80,
title: const Text('내폰내툰',
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 36.0,
color: Colors.black)),
centerTitle: true),
body: Center(
child:
Column(children: <Widget>[
Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
Column(children: <Widget>[
Image.network(toon[0]['image']),
Text(toon[0]['title']),
]),
Column(children: <Widget>[
Image.network(toon[1]['image']),
Text(toon[1]['title']),
]),
]),
]),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment