flutter在编写的过程中出现了如下的报错:
The parameter 'showLocation' can't have a value of 'null' because of its type, but the implicit default value is 'null'.
解决方法:
在 Dart 类的成员变量定义时 , 在类型后面添加 ? 符号 , 将其声明为可空类型。如图
flutter在编写的过程中出现了如下的报错:
The parameter 'showLocation' can't have a value of 'null' because of its type, but the implicit default value is 'null'.
解决方法:
在 Dart 类的成员变量定义时 , 在类型后面添加 ? 符号 , 将其声明为可空类型。如图