kopia lustrzana https://gitlab.com/mysocialportal/relatica
Change link preview to be more space efficient with picture and text.
Addresses Issue #35merge-requests/67/merge
rodzic
5c54726ebb
commit
747132625f
|
@ -12,7 +12,6 @@ class LinkPreviewControl extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const width = 128.0;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
|
||||
child: Container(
|
||||
|
@ -23,17 +22,22 @@ class LinkPreviewControl extends StatelessWidget {
|
|||
onTap: () async {
|
||||
await openUrlStringInSystembrowser(context, preview.link, 'link');
|
||||
},
|
||||
child: Row(
|
||||
child: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
width: width,
|
||||
child: CachedNetworkImage(imageUrl: preview.selectedImageUrl),
|
||||
),
|
||||
Expanded(
|
||||
child: ListTile(
|
||||
title: Text(preview.title),
|
||||
subtitle: Text(preview.description.truncate(length: 128))),
|
||||
),
|
||||
CachedNetworkImage(imageUrl: preview.selectedImageUrl),
|
||||
ListTile(
|
||||
title: Text(preview.title,
|
||||
style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
preview.siteName,
|
||||
style: const TextStyle(fontStyle: FontStyle.italic),
|
||||
),
|
||||
Text(preview.description.truncate(length: 128)),
|
||||
],
|
||||
)),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
Ładowanie…
Reference in New Issue