Skip to content

[M3] Checkbox MaterialStateBorderSide does not lerp correctly #118724

@esouthren

Description

@esouthren

A null operator is thrown in checkbox_theme.dart at this point -

  static BorderSide? _lerpSides(BorderSide? a, BorderSide? b, double t) {
    if (a == null && b == null) {
      return null;
    }
    return BorderSide.lerp(a!, b!, t);
  }

-because BorderSide.lerp immediately asserts that a and b are both non-null.

In M3, a MaterialStateBorderSide value can now be provided to the theme's side property, which causes this assertion to throw.

The _lerpSides method should be modified to return null when a == null || a == null, not &&.

Metadata

Metadata

Assignees

Labels

f: material designflutter/packages/flutter/material repository.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions