Vishal Tyagi
← Writing
·blog

Extract the package while the app is still shipping

image_hotspot and floor_plan_builder exist because a restaurant layout needed tap regions — and a second app was about to copy-paste them. Extraction timing beats perfection.

The temptation is to wait until the abstraction is “ready.” The reality: the second consumer is the readiness signal.

A seating layout needed tappable tables on an image. An events app needed the same idea. Copying the widget would have worked for a week. Extracting two focused packages worked for years:

Neither is a full editor suite. That narrowness is why they stayed publishable on pub.dev with tests and a CHANGELOG.

If you’re mid-feature and you can name the boundary in one sentence (“consumers pass regions; we own hit tests”), extract now. Polish the README after the second app imports it — that’s when you’ll know which sentences were lies.