Widget when({ required Widget Function() image, }) { switch (this) { case GiffyType.image: return image(); } }