This is a revival of my patch to add the necessary mechanisms for: https://github.com/flutter/flutter/issues/131632 ... since it turns out we need it sooner than later for https://github.com/flutter/flutter/issues/131182.