flutter_animate SwapEffect: Mid-Animation Widget Replacement Done Right
Learn how flutter_animate's SwapEffect lets you replace a widget mid-animation — with real code for button state changes, icon swaps, and content reveals.
Learn how flutter_animate's SwapEffect lets you replace a widget mid-animation — with real code for button state changes, icon swaps, and content reveals.
How to use flutter_animate's TintEffect, SaturateEffect, and ColorEffect to animate color transitions — with real code for dark mode, image loading states, and interactive feedback.
flutter_test의 TestDefaultBinaryMessenger.setMockMethodCallHandler로 BLE 권한, 배터리, 네이티브 API를 실기기 없이 unit/widget 테스트에서 격리하는 방법을 실제 코드로 정리했다.
realm.write() 내부 메서드는 Mockito로 mock이 안 된다. Configuration.inMemory()로 진짜 Realm을 인메모리로 열어 DeviceRepository를 실제처럼 단위 테스트하는 방법을 정리했다.
http 패키지 MockClient를 ApiService에 주입해 REST API 레이어를 격리 테스트하는 방법을 정리했다. 200 성공부터 401 토큰 만료, 네트워크 오류까지 실제 서버 없이 재현할 수 있다.
flutter_secure_storage를 사용하는 코드는 단위 테스트에서 MissingPluginException이 터진다. 추상화 레이어를 끼워 FakeSecureStorageService로 격리하고, JWT TokenRepository를 단위 테스트하는 방법을 실전 코드로 정리했다.
How to build looping animations in flutter_animate using onPlay and repeat. Covers pulse buttons, spinning loaders, breathing indicators, and cleanly stopping loops with a saved controller reference.
How to coordinate flutter_animate entrance effects with Flutter's Hero widget. Covers animating destination content after Hero lands, avoiding double-animation conflicts, and a practical card-to-detail pattern.
How to use ValueNotifier and Animate.target to trigger flutter_animate effects from outside the widget tree, keeping animation state in your business logic layer without converting to StatefulWidget.
Learn how to write Flutter widget tests for flutter_animate effects — assert opacity, position, and scale values at specific time offsets using tester.pump(duration).
테스트 코드를 먼저 작성하는 TDD를 Flutter IoT Controller에 적용한 실전 기록. Red-Green-Refactor 한 사이클로 BleController 의존성 설계가 어떻게 바뀌는지, TDD가 어울리는 레이어와 억지로 쓰면 오히려 느려지는 레이어를 구분해서 정리했다.
테스트 더블 5종류(Dummy·Stub·Fake·Spy·Mock)의 차이를 Flutter IoT 앱 코드로 실제 비교했다. BLE·MQTT·Repository 레이어에서 각각 어떤 패턴이 적합한지 판단 기준을 정리한다.
fakeAsync로 Flutter 비동기 테스트에서 Timer 타임아웃과 Stream 이벤트를 실시간 대기 없이 즉시 검증하는 방법을 MQTT 재연결·BLE 스캔 예제로 정리했다.
Flutter IoT 앱에서 테스트 커버리지를 레이어별로 어떻게 설정하는지, 커버리지 숫자가 높아도 품질이 낮은 상황과 CI에서 임계값을 강제하는 방법을 실제 경험으로 정리했다.
Flutter IoT 앱에서 테스트가 쌓일수록 setup 코드가 복붙으로 넘쳐난다. 공유 픽스처, TestHelper 클래스, Object Mother 패턴으로 중복을 제거하고 유지보수 가능한 테스트 구조를 만드는 방법을 정리했다.
Firebase.initializeApp() 없이도 단위 테스트를 돌리는 법. firebase_auth_mocks와 직접 만든 FakeRemoteConfig로 Firebase 의존성을 깔끔하게 격리하는 실전 패턴을 정리했다.
Drive flutter_animate effects directly from a ScrollController using ScrollAdapter. Covers parallax headers, fade-in cards, and sticky nav transforms with working Dart code.
Build polished skeleton loading UIs using flutter_animate's built-in ShimmerEffect. Covers looping setup, card skeletons, color customization, and a common iOS rendering gotcha.
Learn how to tie flutter_animate effects directly to user gestures using Animate.controller. Includes a swipe-to-reveal card example with manual AnimationController progress control.
Learn how to play exit animations in flutter_animate before a widget is removed from the tree. Covers the delayed-removal pattern, AnimatedSwitcher combo, and a dismissible notification card example.
GetX Controller를 주입해 보일러 제어 화면의 버튼·상태 텍스트를 WidgetTester로 검증하는 방법. pump 타이밍 실수부터 Binding 오류까지 실제로 막혔던 지점을 코드와 함께 정리했다.
기존 Unit Test CI에 Widget Test를 추가하고 lcov 커버리지를 합산하는 방법. Linux 러너에서 Widget Test가 되는 이유, coverage/lcov.info 충돌 해결, PR 커버리지 뱃지 설정까지 실제 workflow 파일과 함께 정리했다.
matchesGoldenFile()로 IoT 제어 카드의 픽셀 단위 UI를 스냅샷 테스트하는 방법. CI 환경에서 폰트·DPR 차이로 골든 파일이 안 맞는 문제와 alchemist 패키지로 해결한 과정을 정리했다.
unit·widget·golden 테스트 다음 단계, Flutter integration_test로 BLE 연결부터 기기 제어까지 실제 앱 흐름을 통째로 검증하는 방법을 정리했다. 타이밍 이슈로 flaky 해지는 원인과 CI 실행 전략도 포함.