問題タブ [nosuchmethod]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
flutter - Flutter、NoSuchMethod: getter 'notes' が null で呼び出されました
私はフラッターを学んでおり、継承されたウィジェットとマップのリストを使用してメモアプリとハードコード 3 つのメモを作成しようとしています。問題は、これまでアプリを実行しようとすると、このエラーがスローされることです。
I/flutter (32083): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
I/flutter (32083): The following NoSuchMethodError was thrown building HomeScreen(dirty, state:
I/flutter (32083): _HomeScreenState#050b1):
I/flutter (32083): The getter 'notes' was called on null.
I/flutter (32083): Receiver: null
I/flutter (32083): Tried calling: notes
I/flutter (32083):
これまでのコードは次のとおりです。
main.dart:
home_screen.dart
note_inherited_widget.dart
継承されたウィジェットメソッドを実装しようとしても問題がありました。理解できない間違いがあるかもしれません。それで、あなたの誰かがこれで私を助けることができれば、それは素晴らしいことです. @{11488366}
前もって感謝します!