web을 local서버에서 띄우고, flutter project도 local에서 서버를 띄운 상황에서 상호간 데이터 전송이 원할했음. 하지만 둘 중 하나를 web에 hosting을 한 상태에서는 연결이 되지 않음.
flutter.js:3 Exception while loading service worker: Error: Service Worker API unavailable.
The current context is NOT secure.
Read more: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
at h.loadServiceWorker (flutter.js:3:99)
at g.loadEntrypoint (flutter.js:3:3296)
at (index):227:23
flutter에서 console로 확인해보니 secure contexts 뭐라뭐라 함. 에러메세지도 같이 올리고 싶었는데 무의식적으로 브라우저를 종료해버려서 여기에 포스팅을 할 수 없음.... ㅠ 로컬에서는 http든 https든 상관이 없었는데, 한쪽에서 http를 써버리니 발생한 문제.
둘 다 https를 하면 됨. 나도 웹에 호스팅을 하니 동작이 잘 됨.
[Mozilla] https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts