mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-12-25 12:28:50 +00:00
Add support for PDFs
This commit is contained in:
parent
527927da82
commit
1be499f242
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user