• 전화하지 마셈
  • hyungseob@ssim.pe.kr
Codeigniter 3.x에서 4.x로 갈아 엎느라 기존 게시판 주소로 접근시 새 주소로 리다이렉션 된다.

Developerment [Flutter]

json.decode() 에서 컴파일러 에러 발생시

  • 빛그림
  • 395
Compiler message:
lib/home.dart:29:25: Error: The method 'decode' isn't defined for the class 'dart.core::String'.
Try correcting the name to the name of an existing method, or defining a method named 'decode'.
        var data = json.decode(json);
                        ^^^^^^
Compiler failed on /Volumes/RamDisk/flute/lib/main.dart
Finished with error: Gradle task assembleDebug failed with exit code 1


json.decode(json) 코드에서 컴파일 에러가 계속 되어 확인 해보니 Dart2 에서는 json.decode()를 jsonDecode()로 써줘야 했다.

새댓글 등록