Skip to content

Bug in ListTileThemeData.copyWith() introduced in https://github.com/flutter/flutter/pull/117965 #119734

@math1man

Description

@math1man

#117965 introduced a bug in ListTileThemeData.copyWith().

The code has these lines

titleTextStyle: titleTextStyle ?? this.titleTextStyle,
subtitleTextStyle: titleTextStyle ?? this.subtitleTextStyle,
leadingAndTrailingTextStyle: titleTextStyle ?? this.leadingAndTrailingTextStyle,

Note that titleTextStyle is assigned to each value. The correct code should be

titleTextStyle: titleTextStyle ?? this.titleTextStyle,
subtitleTextStyle: subtitleTextStyle ?? this.subtitleTextStyle,
leadingAndTrailingTextStyle: leadingAndTrailingTextStyle ?? this.leadingAndTrailingTextStyle,

Metadata

Metadata

Assignees

Labels

c: regressionIt was better in the past than it is nowcustomer: googleVarious Google teamsf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions