I had encountered the same error on flutter web(3.27.1), but after upgrading it to 3.27.3 error disappeared