嗨, 我正在尝试显示使用以下代码保存在Firestore中的Map()数据。
snapshot.data.data['MyMobile'].forEach((key,value)=> Text("$key $value"))
它显示下面的错误
I/flutter (23045): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (23045): The following NoSuchMethodError was thrown building StreamBuilder<DocumentSnapshot>(dirty,
I/flutter (23045): dependencies: [MediaQuery], state: _StreamBuilderBaseState<DocumentSnapshot,
I/flutter (23045): AsyncSnapshot<DocumentSnapshot>>#46607):
I/flutter (23045): The method 'forEach' was called on null.
I/flutter (23045): Receiver: null
I/flutter (23045): Tried calling: forEach(Closure: (dynamic, dynamic) => Text)