Reland https://github.com/flutter/flutter/pull/155476 with test fix. The test fix uses the method mentioned in https://github.com/flutter/flutter/pull/155476#issuecomment-2377287606.
Reland https://github.com/flutter/flutter/pull/155476 with test fix. The test fix uses the method mentioned in https://github.com/flutter/flutter/pull/155476#issuecomment-2377287606.