🧲Flutter에서 websocket 오류인 경우

windows 환경에서 Flutter 와 AGENT 연결할 때 javascript 를 지원 해 주고 있습니다.

가.순서

  1. js 패키지 설치

  2. 빌드된 JS 라이브러리 준비

  3. 플러터 프로젝트의 web폴더 밑의 index.html 수정

  4. JS 라이브러리 연결

  5. 사용

1. js 패키지 설치

pubspec.yaml에 다음과 같이 js 패키지를 추가합니다.

dependencies:
  flutter:
    sdk: flutter
  js: ^0.6.3

추가하고 패키지를 설치합니다.

$ flutter pub get

2. JS 라이브러리 파일 준비

3. web 폴더 구조

4. web폴더의 index.html 에 websocketSample.html 소스 복사

5. 사용

AGENT PAY STOP

Last updated