인벤토리 화면 한글 주석 추가

This commit is contained in:
JiWoong Sul
2025-09-29 17:25:53 +09:00
parent 2a0db08079
commit 1b7033d35d
4 changed files with 18 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ class InventoryProductAutocompleteField extends StatefulWidget {
_InventoryProductAutocompleteFieldState();
}
/// 자동완성 로직을 구현한 상태 클래스.
class _InventoryProductAutocompleteFieldState
extends State<InventoryProductAutocompleteField> {
InventoryProductCatalogItem? _catalogMatch;
@@ -58,6 +59,7 @@ class _InventoryProductAutocompleteFieldState
}
}
/// 텍스트 입력 변화를 감지해 자동완성 결과를 적용한다.
void _handleTextChanged() {
final text = widget.productController.text.trim();
final match = InventoryProductCatalog.match(text);
@@ -80,6 +82,7 @@ class _InventoryProductAutocompleteFieldState
widget.onChanged?.call();
}
/// 선택된 카탈로그 정보를 관련 필드에 적용한다.
void _applyCatalog(
InventoryProductCatalogItem match, {
bool updateProduct = true,
@@ -103,6 +106,7 @@ class _InventoryProductAutocompleteFieldState
widget.onChanged?.call();
}
/// 주어진 검색어에 매칭되는 제품 목록을 반환한다.
Iterable<InventoryProductCatalogItem> _options(String query) {
return InventoryProductCatalog.filter(query);
}