1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-22 04:49:21 +00:00

Add support for PDFs

This commit is contained in:
Pierre HUBERT 2019-11-16 09:24:20 +01:00
parent 527927da82
commit 1be499f242

View File

@ -177,6 +177,10 @@ class _PostTileState extends State<PostTile> {
postContent = _buildPostWebLink();
break;
case PostKind.PDF:
postContent = _buildPostPDF();
break;
case PostKind.COUNTDOWN:
postContent = _buildCountDownTimer();
break;
@ -325,6 +329,16 @@ class _PostTileState extends State<PostTile> {
);
}
Widget _buildPostPDF() {
return RaisedButton.icon(
onPressed: () {
launch(widget.post.fileURL);
},
icon: Icon(Icons.picture_as_pdf),
label: Text(tr("PDF")),
);
}
Widget _buildCountDownTimer() {
return CountdownWidget(
startTime: widget.post.timeSent,