How Custom RenderObjects can make your life easier
summary
Custom RenderObjects let you do layouts that are otherwise impossible, faster, or simpler: examples show a reaction bar that needs a left gap when messages are narrow, a left gray bar matched to a sibling without using expensive IntrinsicHeight, and an avatar stack with up to five children laid out declaratively at render level. The demo implements a slotted multi-child render object widget with enum slots, uses a RenderBox performing layout, paint and parentData, positions a page at 2/3 of content and runs successfully; notes that ~70% of devs never build one and ~12% are afraid.
AI-written summary · about
chapters (9)
- 0:00Introduction and meet the speaker
- 1:30What are render objects
- 5:05Why create custom render objects
- 8:36Render object architecture overview
- 9:39Widget and render object relationship
- 12:50Choosing render object widget types
- 16:21Render object types and slivers
- 17:24Key points in render object protocol
- 21:40Live coding a custom render object
related talks
35mHow Custom RenderObjects can make your life easier
32mWhere did the OO go? Views Should be Objects Too!
09mKeeping It Simple
11mInterview with Kamil Klyta & Wiktoria Sobczyk
28mBuilding a Custom React Renderer
31mUnderstanding Rendering Patterns
26mThe Rendered Manifests Pattern: Reveal Your True Desired State
19mA plethora of rendering ideas
