
// 이곳에 쓴 내용은 앱 만들기라는 버킷리스트를 달성하기 위해 플러터를 공부하면서 정리하고 있는 내용입니다.
플러터에 대해 아는 것이 거의 없기 때문에 정리하면서 오류가 있을 수 있습니다.
오류를 발견하신 분은 댓글 남겨 주시면 감사하겠습니다.
List, Set, Map은 비슷한 부류인가 보다. 이게 마지막 타입이라고..
Map은 key와 설명 또는 값이 1대 1 대응함. key의 이름은 같아서는 안 되나 값은 같을 수 있음.
<Map의 기능들>
기능 | 의미 |
length | 항목의 개수 |
runtimeType | 클래스 타입 확인 |
isNotEmpty | 항목이 비어 있지 않음을 확인 |
isEmpty | 항목이 비어 있음을 확인 |
addAll | 전달받은 항목 추가 |
containsKey | 특정 key가 포함되어 있는지 확인 |
containsValue | 특정 value가 포함되어 있는지 확인 |
remove | 특정 항목 삭제 |
clear | 모두 삭제 |

- List나 Set, Map의 메서드는 거의 비슷한 거 같다.

- 추가하는 방식이 독특하다. 대괄호를 쓰고, 그 안에는 큰따옴표를 써서 키를 감싸줬다. 그리고 값도 큰 따옴표로 넣어줬다. 나중에 List나 Set의 값을 추가하는 걸 따로 정리를 해두어야겠다. 헷갈리기 시작..

- 값 교체는 이외로 간단한 듯. 역시나 대괄호와 큰따옴표를 사용한다.

- remove로 키와 값을 한꺼번에 삭제를 한다.
- clear로 모든 키와 값도 지울 수 있다.
https://api.dart.dev/dart-core/Map-class.html
Map class - dart:core library - Dart API
A collection of key/value pairs, from which you retrieve a value using its associated key. There is a finite number of keys in the map, and each key has exactly one value associated with it. Maps, and their keys and values, can be iterated. The order of it
api.dart.dev
Map 클래스에 대한 자세한 내용은 위를 참조.
오늘은 너무 짧다. 큰 것을 위한 사전 작업인가..
뒷일은 뒤에 걱정하고 오늘은 감사히 오늘 공부 마무리~^^