Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/dart/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Flutter Dart解析首选使用空感知运算符错误_Flutter_Dart - Fatal编程技术网

Flutter Dart解析首选使用空感知运算符错误

Flutter Dart解析首选使用空感知运算符错误,flutter,dart,Flutter,Dart,如何解决此问题: 更喜欢使用空感知运算符 关于这个密码 AnimationControllerValue halfBoundValue; double get halfBound => halfBoundValue != null ? halfBoundValue.percentage : null; 文件: 这表明: AnimationControllerValue halfBoundValue; double get halfBound => halfBoundValue?.p

如何解决此问题:

更喜欢使用空感知运算符

关于这个密码

AnimationControllerValue halfBoundValue;
double get halfBound => halfBoundValue != null ? halfBoundValue.percentage : null;
文件: 这表明:

AnimationControllerValue halfBoundValue;
double get halfBound => halfBoundValue?.percentage;

将更具可读性和简洁性。

您链接到的文档中有一个触发lint的示例以及如何修复它。该示例中是否有不清楚的地方需要改进?