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:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatefulWidget { | |
@override | |
_MyAppState createState() => _MyAppState(); | |
} | |
class _MyAppState extends State<MyApp> { |
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/bda2f942a8a8c32f5cd0a49b5650b062/raw/01c789addcab42ed3ff6e8587b21f31c92abd55c/webtoon.json"; | |
var response = await http.get(Uri.https(jsonDomain, jsonUrl)); | |
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:flutter/material.dart'; | |
void main() { | |
final toons = [ | |
{ | |
"title": "이상한 변호사 우영우", | |
"image": "https://my-k-toon.web.app/webtoon/1.png" | |
}, | |
{ | |
"title": "외모지상주의", | |
"image": "https://my-k-toon.web.app/webtoon/2.png" |
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:flutter/material.dart'; | |
void main() { | |
final toons = [ | |
{ | |
"title": "이상한 변호사 우영우", | |
"image": "https://my-k-toon.web.app/webtoon/1.png" | |
}, | |
{ | |
"title": "외모지상주의", | |
"image": "https://my-k-toon.web.app/webtoon/2.png" |
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
fizzBuzz(turn) { | |
var str = ''; | |
if (turn % 3 == 0 && turn % 5 == 0){ | |
str += 'FizzBuzz'; | |
} else if (turn % 3 == 0) { | |
str += 'Fizz'; | |
} else if (turn % 5 == 0) { | |
str += 'Buzz'; | |
} if (str.isEmpty){ | |
str = turn.toString(); |
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:cloud_firestore/cloud_firestore.dart'; | |
import 'package:firebase_auth/firebase_auth.dart'; | |
import 'package:firebase_core/firebase_core.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:intl/intl.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
const messageLimit = 30; |
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/bda2f942a8a8c32f5cd0a49b5650b062/raw/01c789addcab42ed3ff6e8587b21f31c92abd55c/webtoon.json"; | |
var response = await http.get(Uri.https(jsonDomain,jsonUrl)); | |
var toons = json.decode(utf8.decode(response.bodyBytes)); | |
runApp(MaterialApp( |
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:flutter/material.dart'; | |
class Webtoon extends StatelessWidget { | |
String image, title; | |
Webtoon({required this.image, required this.title}); | |
@override | |
Widget build(BuildContext context) { | |
return Column( | |
children: [ |
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:flutter/material.dart'; | |
class Webtoon extends StatelessWidget { | |
Webtoon({key, required this.image, required this.title}) : super(key: key); | |
String image; | |
String title; | |
@override | |
Widget build(BuildContext context) { | |
return Column(children: [ |
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: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']; |