buildBody method
- BuildContext context
override
Implementation
Widget buildBody(BuildContext context) {
return AspectRatio(
aspectRatio: 0.8,
child: InkWell(
onTap: () {
_navigationService.launchLink(article.fullArticleLink);
},
child: Column(
children: [
AspectRatio(
aspectRatio: 1.8,
// FIXME ink animation doesn't cover image
child: CustomNetworkImage(
headerImage,
fit: BoxFit.cover,
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
title,
style: Theme.of(context).primaryTextTheme.headline2!,
textScaleFactor: .7,
maxLines: 2,
overflow: TextOverflow.ellipsis,
),
Text(
subtitle,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: Theme.of(context)
.primaryTextTheme
.bodyText2!
.apply(fontStyle: FontStyle.normal),
),
Text(
dateString,
)
],
),
),
),
Ink(
padding: const EdgeInsets.symmetric(vertical: 8),
decoration:
const BoxDecoration(color: Color.fromRGBO(247, 248, 252, 1)),
child: Align(
alignment: Alignment.center,
child: Text(
shortUrl,
style: Theme.of(context).primaryTextTheme.bodyText1?.apply(
color: const Color.fromRGBO(255, 136, 0, 1),
),
textScaleFactor: .7,
),
),
),
],
),
),
);
}