fix(R3): wrap flutter_html in error boundary to prevent screen crash #35

Merged
guettlibot merged 1 commits from task/r3-html-error-boundary into main 2026-05-14 06:27:03 +00:00
guettlibot commented 2026-05-14 06:22:26 +00:00 (Migrated from codeberg.org)

Summary

  • Adds _SafeHtml widget that intercepts build-phase exceptions from flutter_html via ErrorWidget.builder
  • Falls back to an inline error message so a malformed HTML body cannot crash the entire EmailDetailScreen
  • Properly saves and restores ErrorWidget.builder via addPostFrameCallback so other widgets are unaffected
  • Closes issue #19 item R3

Test plan

  • task check-fast passes (285 tests, 81% coverage)
  • Pre-commit hook passes

🤖 Generated with Claude Code

## Summary - Adds `_SafeHtml` widget that intercepts build-phase exceptions from `flutter_html` via `ErrorWidget.builder` - Falls back to an inline error message so a malformed HTML body cannot crash the entire `EmailDetailScreen` - Properly saves and restores `ErrorWidget.builder` via `addPostFrameCallback` so other widgets are unaffected - Closes issue #19 item R3 ## Test plan - [x] `task check-fast` passes (285 tests, 81% coverage) - [x] Pre-commit hook passes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.