Skip to content

ListTile "leading" parameter stopped working #28765

@brian-dunn

Description

@brian-dunn

Before the update, I had a ListView with a set of ListTiles that rendered an image on the left side of each tile with the "leading" parameter and a title on the right using the "title" parameter. Now, the image is stretched across the entire tile, and the title value is not displayed on the screen.

Steps to Reproduce

Here is my code. The products variable contains a list of maps with the following structure:
"image" : (name of image file in assets folder)
"title": title of item

import 'package:flutter/material.dart';

class ProductListPage extends StatelessWidget{

final List<Map<String, dynamic>> products;

ProductListPage (this.products);

@OverRide
Widget build(BuildContext context) {
return ListView.builder(
itemBuilder: (BuildContext context, int index) {
return ListTile(
leading: Image.asset(products[index]['image']),
title: Text(products[index]['title']),
// title: Text('test')
);
},
itemCount: products.length,
);
}
}
Attached screen shots show how the program ran before and after the version 1.2 upgrade.

afterupgrade
beforeupgrade

Metadata

Metadata

Assignees

Labels

c: regressionIt was better in the past than it is nowf: material designflutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions