메뉴
HN
Hacker News • 55일 전

카이셀(Kaisel): 플러터를 위한 다트 3 네이티브 라우터

IMP
6/10
핵심 요약

Kaisel은 Flutter의 새로운 라우팅 라이브러리로, 복잡한 문자열 경로나 코드 제네레이션(codegen) 없이 타입 안전성을 보장합니다. Dart 3의 Sealed class를 활용하여 라우트를 값(Value)으로 다루며, 컴파일 단계에서 누락된 경로 처리를 완벽하게 추적할 수 있습니다. 네비게이션 스택을 List 객체로 관리해 위젯 트리 없이도 테스트와 상태 복원이 가능하다는 것이 핵심 강점입니다.

번역된 본문

콘텐츠 건너뛰기

Kaisel의 핵심 아이디어 — 값으로서의 플러터 라우트(Flutter Routes as Values) →

Kaisel. 값으로서의 라우트. Flutter를 위한 Dart 3 네이티브 라우터 — 문자열 경로와 코드 제네레이션(codegen)이 필요 없습니다.

시작하기 / GitHub에서 보기

시작하기 시작 가이드는 설치부터 타입화된 라우트(Type routes) 탐색 방법까지 단 몇 분 만에 안내해 드립니다. Sealed class, exhaustive switch를 사용하고 끝입니다.

Sealed 라우트, exhaustive 빌드 내비게이션은 sealed 타입에 대한 switch 문입니다. 새로운 라우트를 추가하면 컴파일러가 이를 처리해야 하는 모든 위치를 찾아내므로, 런타임에 발생하는 '알 수 없는 경로' 에러가 남지 않습니다.

스택은 하나의 값입니다 사용자의 히스토리는 라우트 객체의 List입니다. Push, pop, set은 모두 리스트 연산입니다. 따라서 위젯 트리 없이도 테스트가 가능하며, 프로세스 종료 후에도 상태를 복원할 수 있습니다.

모든 내비게이션, 단 하나의 옵저버 표준 NavigatorObserver를 한 번만 등록하세요. 탭 전환 및 다른 라우터에서는 라우트 이벤트를 발생시키지 않는 적응형 현재 위치 변경 사항까지 모두 감지할 수 있습니다.

제로(0) 코드 제네레이션 build_runner도, 생성된 파일도, 매직 문자열(magic strings)도 없습니다. 라우트는 개발자가 이미 작성 방법을 잘 알고 있는 일반적인 Dart 클래스입니다.

학습하기 튜토리얼: 첫 번째 앱 만들기 멘탈 모델 내비게이션 셸(Shells) 및 탭 모달 흐름(Modal flows) 적응형 레이아웃 가드(Guards) URL 및 딥 링크(Deep linking)

마이그레이션 마이그레이션 개요 go_router에서 마이그레이션 auto_route에서 마이그레이션 Navigator에서 마이그레이션 로드맵 API 레퍼런스

원문 보기
원문 보기 (영어)
Skip to content The idea behind kaisel — Flutter Routes as Values → kaisel Routes as values. A Dart 3-native router for Flutter — no string paths, no codegen. Get Started View on GitHub Get started The getting started guide takes you from install to navigating with typed routes in a few minutes — sealed class, exhaustive switch , done. Sealed routes, exhaustive builds Navigation is a switch over a sealed type. Add a route and the compiler finds every place that must handle it — no runtime “unknown route” left. The stack is a value Your history is a List of route objects. Push, pop, and set are list operations — testable without a widget tree, restorable across process death. Every navigation. One observer. Register a standard NavigatorObserver once — it sees tab switches and adaptive in-place changes that produce no route event in other routers. Zero codegen No build_runner , no generated files, no magic strings. Routes are plain Dart classes you already know how to write. Learn Tutorial: your first app The mental model Navigation Shells & tabs Modal flows Adaptive layouts Guards URLs & deep linking Migrate Migration overview From go_router From auto_route From Navigator Roadmap API reference