Created with <3 with dartpad.dev.
Created
October 27, 2022 09:50
-
-
Save hongsw/16cd07100566fc3f2391e418b71d3b65 to your computer and use it in GitHub Desktop.
Flutter K-Web Toon Mini with JSON
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 '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