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
class Recipe { | |
String title; | |
List<String> ingredients; | |
Recipe(this.title, this.ingredients); | |
// ๊ณตํต์ผ๋ก ์ฌ์ฉํ ์ฌ๋ฃ ๋ชฉ๋ก ๋ฉ์๋ | |
void getIngredientList() { | |
print("Ingredients for $title: ${ingredients.join(', ')}"); | |
} |
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
// ํ์ Material Design ์์ ฏ์ ํฌํจํ๋ ํจํค์ง ์ํฌํธ | |
import 'package:flutter/material.dart'; | |
// ์ฑ์ ์์์ | |
void main() { | |
runApp(const MyApp()); | |
} | |
/// ์ฑ์ ๋ฃจํธ ์์ ฏ | |
/// 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'; | |
void main() async { | |
runApp(MaterialApp( | |
initialRoute: '/', | |
routes: { | |
// When navigating to the "/" route, build the FirstScreen widget. | |
'/': (context) => FirstScreen(), | |
// When navigating to the "/second" route, build the SecondScreen widget. | |
'/second': (context) => QuizPage(), |
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
class Book { | |
String title; | |
String? author; // ์ ์ ์ ๋ณด๋ฅผ ์ ํ์ ์ผ๋ก ์ถ๊ฐ | |
Book(this.title, [this.author]); | |
@override | |
String toString() { | |
return '$title'; | |
} |
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() { | |
String str1 = 'h1'; | |
String str2 = 'h1'; | |
print(str1); | |
} |
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 = 0; i < 10; i++) { | |
print('hello Hong ${i + 1}'); | |
} | |
} |
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
GPTs |
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'; | |
import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
import 'package:riverpod_annotation/riverpod_annotation.dart'; | |
part 'main.g.dart'; | |
// A Counter example implemented with riverpod | |
void main() { | |
runApp( |
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'; | |
import 'package:flutter_riverpod/flutter_riverpod.dart'; | |
import 'package:riverpod_annotation/riverpod_annotation.dart'; | |
part 'main.g.dart'; | |
// A Counter example implemented with riverpod | |
void main() { | |
runApp( |
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'; | |
// ์๊ตฌ์ฌํญ : ์ด๋ก ์ ๋๋ฉ์ด์ ๊ณผ ํด๋์ค๋ฅผ ์์ฉํ ๊ณผ์ ๋ก์จ, | |
// ๋ค๋ชจ๋ชจ์์ ์กฐ์ ํ๊ณ ์์๋ ๋ณ๊ฒฝํ๋ ๋ณ๋์ ํด๋์ค๋ฅผ ๋ง๋ค๊ณ | |
// ์ด๋ฅผ ํํ๋ฉด์ 2๊ฐ๋ฅผ ์์๋๋ก ํํํ๋ค. | |
// ๋ง๋ ํด๋์ค์์ ๋ค์๋๋ ํ๋ผ๋ฏธํฐ๋ฅผ ์ด์ฉํ์ฌ | |
// Tween Animation์ ์ต์ข ์ฌ์ด์ฆ์ ์์์ ์ง์ ํ์ฌ | |
// ๋ฒํผ์ ํด๋ฆญํ์๋ ๋์๋๋๋ก ํ๋ค. | |
void main() => runApp(const MyApp()); |