Skip to content

Chip widget's avatar padding changing if label text is more than 1 line #136892

@Nandhini-Saravanakumar

Description

@Nandhini-Saravanakumar

Is there an existing issue for this?

Steps to reproduce

please run the below code

Expected results

Chip widget's icon padding should not change based on label text length

Actual results

Chip widget's icon padding is changing based on label text length

Code sample

Code sample
 Widget getAmenitiesList() {
    List<String> nameList = [
      'hello abc',
      'hello good morning abc',
      'good morning',
      'hello good morning hello good morning hello good morning  '
    ];
    return ListView.builder(
      itemCount: nameList.length,
      shrinkWrap: true,
      physics: const ScrollPhysics(),
      itemBuilder: (context, index) {
        return SizedBox(
          width: 300,
          child: ChoiceChip(
            label: SizedBox(
                width: 150,
                child: Text(
                  nameList[index],
                  maxLines: 3,
                  overflow: TextOverflow.ellipsis,
                )),
            selected: false,
            avatar: Icon(Icons.settings),
          ),
        );
      },
    );
}

Screenshots or Video

image

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
Flutter version 3.7.12

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listf: material designflutter/packages/flutter/material repository.found in release: 3.13Found to occur in 3.13found in release: 3.16Found to occur in 3.16frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versionteam-designOwned by Design Languages teamtriaged-designTriaged by Design Languages team

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions