Skip to content

Instantly share code, notes, and snippets.

View hongsw's full-sized avatar
🕹️
Focusing

Seungwoo hong hongsw

🕹️
Focusing
View GitHub Profile
@hongsw
hongsw / main.dart
Last active October 11, 2022 04:56
레이아웃 위젯을 사용해보자
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text("내폰내툰"),
),
body:
@hongsw
hongsw / main.dart
Last active October 17, 2022 05:20
나의 첫번째 플러터앱
import 'package:flutter/material.dart';
void main() {
runApp(
const MaterialApp(
home: Scaffold(
body: Text("안녕! 나의 첫번째 플러터 앱")
)
)
);
@hongsw
hongsw / json-server.json
Created October 26, 2022 00:59
Use gist json data as a json server
{
"webtoon": [
{
"id": "1",
"title": "이상한 변호사 우영우",
"author": "유일 / 화음조,이예지",
"desc": "인턴 변호사가 된 우영우. 자신의 능력을 증명..",
"link": "https://comic.naver.com/webtoon/list?titleId=798173",
"image": "https://my-k-toon.firebaseapp.com/images/ktoon/1-only-image.png"
},
@hongsw
hongsw / main.dart
Last active October 27, 2022 09:38
Flutter K-Web Toon Mini with Gist JSON 
import 'dart:core';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void main(){
runApp(MainFullDemo());
}
class MainFullDemo extends StatelessWidget {
@hongsw
hongsw / main.dart
Created October 27, 2022 09:50
Flutter K-Web Toon Mini with JSON 
import 'dart:core';
import 'package:flutter/material.dart';
void main(){
runApp(MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
theme: ThemeData(
primarySwatch: Colors.lightGreen,
),
@hongsw
hongsw / main.dart
Created October 31, 2022 07:51
3.3-변수이용하여 화면구성
import 'package:flutter/material.dart';
void main() {
final toon = [
{
"title": "이상한 변호사 우영우",
"image": "https://my-k-toon.web.app/webtoon/1.png"
},
{
"title": "외모지상주의",
@hongsw
hongsw / main.dart
Last active October 31, 2022 09:05
3.3-변수이용하여 화면구성 toons.map
import 'package:flutter/material.dart';
void main() {
final toons = [
{
"title": "이상한 변호사 우영우",
"image": "https://my-k-toon.web.app/webtoon/1.png"
},
{
"title": "외모지상주의",
@hongsw
hongsw / main.dart
Created October 31, 2022 10:05
flying-ritual-7402
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'];
@hongsw
hongsw / main.dart
Created October 31, 2022 10:21
3.3-변수이용하여 화면구성 http.get
import 'dart:convert';
import 'package:http/http.dart';
import 'package:flutter/material.dart';
void main() async {
const jsonUrl = "hongsw/67e0d72dffa2908e1715dc89a7b0e802/raw/9c5b1388bd52396ff1917b6928f3bda5fcd3b5c7/webtoon.json";
var toons = [];
try{
var response = await get(Uri.https("gist.githubusercontent.com", jsonUrl));
toons = json.decode(response.body)['webtoon'];