Skip to content

Instantly share code, notes, and snippets.

@comigor
Created March 13, 2019 13:43
Show Gist options
  • Save comigor/11c619da884f7a0a9d7ecb393713e3a3 to your computer and use it in GitHub Desktop.
Save comigor/11c619da884f7a0a9d7ecb393713e3a3 to your computer and use it in GitHub Desktop.
import 'package:flutter/material.dart';
class Feed extends StatelessWidget {
@override
Widget build(BuildContext context) {
final items = [
'Small description',
'Medium description and text which will be bigger',
'Large description and text which will be even bigger and occupy a lot of lines and more and more and more and more',
];
return Scaffold(
body: ListView.builder(
itemBuilder: (context, index) {
return IntrinsicHeight(
child: Row(
children: [
Column(
children: [
Container(
decoration: BoxDecoration(border: Border.all(width: 1.0)),
height: 25.0,
),
Icon(Icons.dock, size: 25.0),
Expanded(
child: Container(
decoration:
BoxDecoration(border: Border.all(width: 1.0)),
),
),
],
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text('Title',
style: TextStyle(
fontWeight: FontWeight.w700, fontSize: 32.0)),
Text(items.elementAt(index),
style: TextStyle(fontSize: 26.0)),
],
),
),
],
),
);
},
itemCount: items.length,
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment