Flutter 遇到的问题汇总(还没全部理清原因)

  1. 静态问题:

Instance members can't be accessed from a static method.

(实例成员不能从静态方法访问。)

  1. 漏写return返回

The body might complete normally, causing 'null' to be returned, but the return type, 'FutureOr>', is a potentially non-nullable type.

(主体可能正常完成,导致返回'null',但返回类型'FutureOr>'是一个潜在的非空类型。)

解决:1、检查是否写清return返回

详解:https://blog.csdn.net/qq_49583834/article/details/120617472

  1. 字符越界:

RangeError (index): Invalid value: Not in inclusive range 0..2: 3

(RangeError(index):无效值:不在包含范围0..2: 3)

解决:请检查Flutter的字符是否越界,

你可能感兴趣的:(Flutter,flutter)