Add null check to _IndicatorPainter._tabOffsetsEqual() to prevent crash (#40009)
* Add tabOffsetEqual null check with TODO
This commit is contained in:
@@ -419,7 +419,9 @@ class _IndicatorPainter extends CustomPainter {
|
||||
}
|
||||
|
||||
static bool _tabOffsetsEqual(List<double> a, List<double> b) {
|
||||
if (a?.length != b?.length)
|
||||
// TODO(shihaohong): The following null check should be replaced when a fix
|
||||
// for https://github.com/flutter/flutter/issues/40014 is available.
|
||||
if (a == null || b == null || a.length != b.length)
|
||||
return false;
|
||||
for (int i = 0; i < a.length; i += 1) {
|
||||
if (a[i] != b[i])
|
||||
|
||||
Reference in New Issue
Block a user