Created with <3 with dartpad.dev.
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 StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| theme: ThemeData( | |
| primarySwatch: Colors.blue, |
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 StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return 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'; | |
| // μ°Έκ³ : https://docs.flutter.dev/cookbook/navigation/navigation-basics | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { |
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'; | |
| // μ°Έμ‘° : https://api.flutter.dev/flutter/material/ListTile-class.html#material.ListTile.3 | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { |
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
| void main() { | |
| for (int i = 1; i <= 100; i++) { | |
| String output = ""; | |
| var fizz = ["", "Fizz"]; | |
| var buzz = ["", "Buzz"]; | |
| output += fizz[i % 3 == 0 ? 1 : 0]; | |
| output += buzz[i % 5 == 0 ? 1 : 0]; |
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
| void main() { | |
| // λ¨κ³ 1: π + π = ππ | |
| String pen = 'π'; | |
| print('Pen: $pen'); // π | |
| String apple = 'π'; | |
| print('Apple: $apple'); // π | |
| String ap = apple + pen; | |
| print('AP: $ap'); // ππ | |
| // λ¨κ³ 2: π + π = ππ |
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
| void main() { | |
| var hello = 'Hello, π!'; | |
| print(hello.toUpperCase()); // Output: "HELLO, π!" | |
| hello = 'Hello, π!'; | |
| print(hello.toLowerCase()); // Output: "hello, π!" | |
| hello = ' Hello, π! '; | |
| print(hello.trim()); // Output: "Hello, π!" |
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
| git clone --filter=blob:none --no-checkout --depth 1 --sparse https://github.com/flutter/samples.git | |
| cd samples | |
| ls | |
| git sparse-checkout add game_template | |
| git checkout | |
| ls |
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' as http; | |
| Future<void> fetchPosts() async { | |
| final response = | |
| await http.get(Uri.parse('https://content.guardianapis.com/search?show-fields=thumbnail&q=food%20korean&api-key=test')); | |
| if (response.statusCode == 200) { | |
| // API μλ²μμ λ°μ΄ν°λ₯Ό μ μμ μΌλ‘ κ°μ Έμμ λ |