• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 Flutter 게시판 firebase로 새 서버로 교체한뒤에 데이터 바인딩

firebase로 새 서버로 교체한뒤에 데이터 바인딩

5 글 보임 - 1 에서 5 까지 (총 5 중에서)
  • 글쓴이
  • #49284

    산딸기
    참가자
    data =[];
    (3step 했음)
    getData() async {
      var result =  await firestore.collection('posts').get();
      data= result.docs;
    }
    .....중략...
    
    return Column(
      children: [
        widget.data[i]['image'],
        Container(
          constraints: BoxConstraints(maxWidth: 600),
          padding: EdgeInsets.all(20),
          width: double.infinity,
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text('좋아요${widget.data[i]['likes']}'),
              Text(widget.data[i]['date']),
              Text(widget.data[i]['content']),
            ],
    파이어 베이스에 새 데이터 넣어서 빈 데이터는 아니에요.... 근데 에러 뜨면서 안됩니다. 문법적인 오류인듯 한데 뭐가 문제일까요,,
    
    
     
     
     
     
     
     
     
     
     
    #49297

    codingapple
    키 마스터
    data변수에 데이터가 있으면 보여달라고 if문을 추가합시다
    #49300

    산딸기
    참가자
    로딩중임 뜨는건 null이란 것인가요?? 파이어베이스 가면 분명히 제가 직접 넣은 데이터 있습니다. 그리고 collection().doc().get()을 쓰면 result.docs를 쓸때 에러가 납니다. 왜죠? 또 맵 자료형식이 오브젝트자료아닌가요? 에러메세지에 파이어스토어에 접근할 수 없다는데 문법오류같아요. 위의 저 문법 어레이 자료 뽑기 문법 그게 맞나여,,,,구글 플레이 스토어가 없다는것도 에뮬레이터 문제인가요..구글 플레이 스토어 있는 에뮬레이터로 변경하니 안드로이드 스튜디오 옵션에 에뮬레이터가 안뜹니다 ,,,,Syncing files to device Android SDK built for x86...
    I/FirebaseApp( 7841): Device unlocked: initializing all Firebase APIs for app [DEFAULT]
    W/GooglePlayServicesUtil( 7841): com.example.bokcherry requires the Google Play Store, but it is missing.
    E/GooglePlayServicesUtil( 7841): GooglePlayServices not available due to error 9
    W/Firestore( 7841): (24.3.1) [GrpcCallProvider]: Failed to update ssl context: com.google.android.gms.common.GooglePlayServicesNotAvailableException
    I/TetheringManager( 7841): registerTetheringEventCallback:com.example.bokcherry
    I/OpenGLRenderer( 7841): Davey! duration=783ms; Flags=0, IntendedVsync=12947463941173, Vsync=12947463941173, OldestInputEvent=9223372036854775807, NewestInputEvent=0, HandleInputStart=12947465793300, AnimationStart=12947465832300, PerformTraversalsStart=12947465908500, DrawStart=12947466345600, SyncQueued=12947471717500, SyncStart=12947717538600, IssueDrawCommandsStart=12947723066700, SwapBuffers=12948109973900, FrameCompleted=12948493303300, DequeueBufferDuration=192739600, QueueBufferDuration=1786700, GpuCompleted=0, 
    W/Firestore( 7841): (24.3.1) [OnlineStateTracker]: Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds
    W/Firestore( 7841): 
    W/Firestore( 7841): This typically indicates that your device does not have a healthy Internet connection at the moment. The client will operate in offline mode until it is able to successfully connect to the backend.
    W/GooglePlayServicesUtil( 7841): com.example.bokcherry requires the Google Play Store, but it is missing.
    W/Firestore( 7841): (24.3.1) [WatchStream]: (10f1d09) Stream closed with status: Status{code=UNAVAILABLE, description=Channel shutdownNow invoked, cause=null}.
    E/GooglePlayServicesUtil( 7841): GooglePlayServices not available due to error 9
    W/Firestore( 7841): (24.3.1) [GrpcCallProvider]: Failed to update ssl context: com.google.android.gms.common.GooglePlayServicesNotAvailableException
    
    #49314

    산딸기
    참가자
    var result =  await firestore.collection('posts').get()
    data= result.docs;
    이게(result) 위젯이 리스트(data)에 박혀있다고 마우스 오버하면 설명이 나와있는데요, 쌤은 Json decode를해서 데이터 바인딩을 했는데 저는 이 위젯을 어떻게 스트링으로 바꿔야 하는지 모르겠습니다, toString()해도 위젯자료형엔 스트링변환이 안된다고 그러네요, 이게 문제 인 것 같고 나머지는 해결했습니다.
    
    
     
    #49368

    codingapple
    키 마스터
    위젯넣어야될 자리에 문자넣었다는소리인데 문자넣고있는 부분을 확인해봅시다
5 글 보임 - 1 에서 5 까지 (총 5 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠