fix pdf viewing in prod
This commit is contained in:
parent
00015c1415
commit
91ec3fb53b
1 changed files with 3 additions and 1 deletions
|
|
@ -14,12 +14,13 @@ class _BuildFileViewState extends State<BuildFileView> {
|
||||||
|
|
||||||
String getExtType(String pdfLink) {
|
String getExtType(String pdfLink) {
|
||||||
//print(pdfLink.split(".")[1]);
|
//print(pdfLink.split(".")[1]);
|
||||||
return pdfLink.split(".")[1];
|
return pdfLink.split(".").last;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if (getExtType(widget.pdfLink).toLowerCase() == "pdf") {
|
if (getExtType(widget.pdfLink).toLowerCase() == "pdf") {
|
||||||
|
//print(widget.pdfLink);
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: 700,
|
width: 700,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
@ -34,6 +35,7 @@ class _BuildFileViewState extends State<BuildFileView> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
print("Image");
|
||||||
return InteractiveViewer(
|
return InteractiveViewer(
|
||||||
maxScale: 5.0,
|
maxScale: 5.0,
|
||||||
//minScale: 0.,
|
//minScale: 0.,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue