html говорит, что ему нужна определенная высота (не может быть динамической). А мне нужна динамическая высота.
Вот мой код:
Код: Выделить всё
Widget getContent() {
final textTheme = Theme.of(context).textTheme;
return Container(
child: ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
itemBuilder: (context, index) {
final item = dataReview[index];
final comment = item['comment'];
return Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.symmetric(vertical: 12.0),
child: Text(
item['name'],
style: textTheme.titleLarge?.copyWith(
fontWeight: FontWeight.bold,
),
),
),
Text(
item['date'],
style: textTheme.bodyMedium?.copyWith(
color: Colors.grey,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 6.0),
Row(
children: [
for (int i = 5; i > 0; i--) ...[
Container(
padding: EdgeInsets.symmetric(vertical: 2.0),
child: SvgPicture.asset(
iconStarSolid,
colorFilter: ColorFilter.mode(
i
Подробнее здесь: [url]https://stackoverflow.com/questions/78651399/flutter-html-with-intrinsicheight[/url]