怎么解决?颤振(6629):[错误:颤振/lib/ui/ui_dart_state.cc(209)]未处理的异常:NoSuchMethodError
Posted
技术标签:
【中文标题】怎么解决?颤振(6629):[错误:颤振/lib/ui/ui_dart_state.cc(209)]未处理的异常:NoSuchMethodError【英文标题】:How to solve? Flutter (6629): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: NoSuchMethodError 【发布时间】:2021-11-20 12:59:08 【问题描述】:谁能解决这个问题?
这是错误
E/flutter (6629): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: NoSuchMethodError: The method 'createUserWithEmailAndPassword' was called on null.
E/flutter (6629): Receiver: null
E/flutter(6629):尝试调用:createUserWithEmailAndPassword(电子邮件:“nehalt88@gmail.com”,密码:“123456”) E/flutter (6629):#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:63:5) E/flutter (6629): #1 RegistrationScreen.registerNewUser (package:rider_app/AllScreens/registrationScreen.dart:189:10) E/flutter(6629):#2 RegistrationScreen.build。 (包:rider_app/AllScreens/registrationScreen.dart:156:27) E/flutter (6629):#3 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:989:21) E/flutter(6629):#4 GestureRecognizer.invokeCallback(包:flutter/src/gestures/recognizer.dart:193:24) E/flutter (6629): #5 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:608:11) E/flutter (6629): #6 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:296:5) E/flutter(6629):#7 BaseTapGestureRecognizer.acceptGesture(包:flutter/src/gestures/tap.dart:267:7) E/flutter(6629):#8 GestureArenaManager.sweep(包:flutter/src/gestures/arena.dart:157:27) E/flutter(6629):#9 GestureBinding.handleEvent(包:flutter/src/gestures/binding.dart:444:20) E/flutter(6629):#10 GestureBinding.dispatchEvent(包:flutter/src/gestures/binding.dart:420:22) E/flutter(6629):#11 RendererBinding.dispatchEvent(包:flutter/src/rendering/binding.dart:278:11) E/flutter(6629):#12 GestureBinding._handlePointerEventImmediately(包:flutter/src/gestures/binding.dart:374:7) E/flutter(6629):#13 GestureBinding.handlePointerEvent(包:flutter/src/gestures/binding.dart:338:5) E/flutter(6629):#14 GestureBinding._flushPointerEventQueue(包:flutter/src/gestures/binding.dart:296:7) E/flutter(6629):#15 GestureBinding._handlePointerDataPacket(包:flutter/src/gestures/binding.dart:279:7) E/flutter (6629):#16 _rootRunUnary (dart:async/zone.dart:1444:13) E/flutter (6629): #17 _CustomZone.runUnary (dart:async/zone.dart:1335:19) E/flutter (6629): #18 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7) E/flutter (6629):#19 _invoke1 (dart:ui/hooks.dart:185:10) E/flutter (6629):#20 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:293:7) E/flutter (6629):#21 _dispatchPointerDataPacket (dart:ui/hooks.dart:98:31) E/颤动(6629): W/IInputConnectionWrapper(6629):非活动 InputConnection 上的 getSelectedText W/IInputConnectionWrapper(6629):非活动 InputConnection 上的 requestCursorAnchorInfo W/IInputConnectionWrapper(6629):非活动 InputConnection 上的 getTextBeforeCursor W/IInputConnectionWrapper(6629):非活动 InputConnection 上的 getTextBeforeCursor D/InputConnectionAdaptor(6629): 输入法开启光标监控
【问题讨论】:
您是否有尝试调用此createUserWithEmailPassword
方法的代码的sn-p?或者,更好的是,您调用此方法的整个文件。
请提供足够的代码,以便其他人更好地理解或重现问题。
【参考方案1】:
您没有导入包含方法createUserWithEmailAndPassword
的任何内容。如果您有代码 sn-p,我可以为您指明更具体的方向。
【讨论】:
以上是关于怎么解决?颤振(6629):[错误:颤振/lib/ui/ui_dart_state.cc(209)]未处理的异常:NoSuchMethodError的主要内容,如果未能解决你的问题,请参考以下文章