mirror of
https://github.com/ChangJoo-Park/learn-flutter.git
synced 2025-06-08 05:33:14 +00:00
feat: update collections
This commit is contained in:
parent
0795f6e536
commit
2323f0960a
4 changed files with 17 additions and 5 deletions
|
@ -17,8 +17,8 @@ export const sidebars = [
|
||||||
{ label: "기본 문법 및 변수", slug: "part2/basic-syntax" },
|
{ label: "기본 문법 및 변수", slug: "part2/basic-syntax" },
|
||||||
{ label: "타입 시스템 & 제네릭", slug: "part2/type-system" },
|
{ label: "타입 시스템 & 제네릭", slug: "part2/type-system" },
|
||||||
{ label: "클래스, 생성자, 팩토리", slug: "part2/classes" },
|
{ label: "클래스, 생성자, 팩토리", slug: "part2/classes" },
|
||||||
{ label: "비동기 프로그래밍", slug: "part2/async" },
|
|
||||||
{ label: "컬렉션과 반복문", slug: "part2/collections" },
|
{ label: "컬렉션과 반복문", slug: "part2/collections" },
|
||||||
|
{ label: "비동기 프로그래밍", slug: "part2/async" },
|
||||||
{ label: "예외 처리", slug: "part2/exceptions" },
|
{ label: "예외 처리", slug: "part2/exceptions" },
|
||||||
{ label: "Extension / Mixin", slug: "part2/extensions" },
|
{ label: "Extension / Mixin", slug: "part2/extensions" },
|
||||||
{ label: "레코드 & 패턴매칭", slug: "part2/records" },
|
{ label: "레코드 & 패턴매칭", slug: "part2/records" },
|
||||||
|
|
|
@ -5,8 +5,9 @@ title: 변경사항
|
||||||
|
|
||||||
### 2025년 05월 15일
|
### 2025년 05월 15일
|
||||||
|
|
||||||
- 1. 시작하기에 **LLM 설정** 추가
|
- 📦 1. 시작하기에 **LLM 설정** 추가
|
||||||
- 1. 시작하기에 **변경사항** 추가
|
- 📦 1. 시작하기에 **변경사항** 추가
|
||||||
|
- 💡 2. Dart 언어 기초 중 컬렉션과 반복문에 collection 패키지 안내 추가
|
||||||
|
|
||||||
### 2025년 05월 14일
|
### 2025년 05월 14일
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,17 @@ title: 컬렉션과 반복문
|
||||||
|
|
||||||
Dart는 데이터를 저장하고 조작하기 위한 다양한 컬렉션 타입과 반복문을 제공합니다. 이 장에서는 Dart의 컬렉션 타입(List, Set, Map)과 이를 처리하기 위한 다양한 반복문 및 반복 연산을 알아보겠습니다.
|
Dart는 데이터를 저장하고 조작하기 위한 다양한 컬렉션 타입과 반복문을 제공합니다. 이 장에서는 Dart의 컬렉션 타입(List, Set, Map)과 이를 처리하기 위한 다양한 반복문 및 반복 연산을 알아보겠습니다.
|
||||||
|
|
||||||
|
<Aside type="tip">
|
||||||
|
|
||||||
|
아래 내용 외에 컬렉션 타입을 조작하는 일이 잦은 경우 [collection](https://pub.dev/packages/collection) 패키지를 사용하세요.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
dart pub add collection
|
||||||
|
```
|
||||||
|
|
||||||
|
</Aside>
|
||||||
|
|
||||||
|
|
||||||
## 컬렉션 타입
|
## 컬렉션 타입
|
||||||
|
|
||||||
### 1. List (리스트)
|
### 1. List (리스트)
|
||||||
|
|
|
@ -57,7 +57,7 @@ final height = 175.5; // double로 추론
|
||||||
|
|
||||||
### 3. 비동기 프로그래밍 지원
|
### 3. 비동기 프로그래밍 지원
|
||||||
|
|
||||||
Dart는 `Future`, `Stream`, `async`, `await` 등을 통해 비동기 프로그래밍을 자연스럽게 지원합니다.
|
Dart는 `Future`, `Stream`, `async`, `await` 등을 통해 비동기 프로그래밍을 지원합니다.
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
Future<String> fetchData() async {
|
Future<String> fetchData() async {
|
||||||
|
@ -75,7 +75,7 @@ void main() async {
|
||||||
|
|
||||||
### 4. Null 안전성
|
### 4. Null 안전성
|
||||||
|
|
||||||
Dart 2.12부터 Null 안전성을 도입하여, 변수가 null이 될 수 있는지 여부를 타입 시스템에서 명시합니다.
|
Dart 2.12부터 Null 안전성을 도입하여, 변수가 null 가능성을 타입 시스템에서 명시합니다.
|
||||||
|
|
||||||
```dart
|
```dart
|
||||||
// null이 될 수 없는 변수
|
// null이 될 수 없는 변수
|
||||||
|
|
Loading…
Add table
Reference in a new issue