add url launcher to open links
This commit is contained in:
parent
1754d6a588
commit
2bfdc67fae
3 changed files with 53 additions and 28 deletions
|
|
@ -103,10 +103,13 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||
iconSize: 35,
|
||||
padding: const EdgeInsets.all(0),
|
||||
onPressed: () {
|
||||
html.window.open(
|
||||
widget.link,
|
||||
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||
'download');
|
||||
if (MzanziInnovationHub.of(context)!.theme.getPlatform() ==
|
||||
"Web") {
|
||||
html.window.open(
|
||||
widget.link,
|
||||
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||
'download');
|
||||
} else {}
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.download,
|
||||
|
|
@ -164,10 +167,17 @@ class _BuildFileViewState extends State<BuildFileView> {
|
|||
iconSize: 35,
|
||||
padding: const EdgeInsets.all(0),
|
||||
onPressed: () {
|
||||
html.window.open(
|
||||
widget.link,
|
||||
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||
'download');
|
||||
if (MzanziInnovationHub.of(context)!.theme.getPlatform() ==
|
||||
"Web") {
|
||||
html.window.open(
|
||||
widget.link,
|
||||
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||
'download');
|
||||
} else {}
|
||||
// html.window.open(
|
||||
// widget.link,
|
||||
// // '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||
// 'download');
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.download,
|
||||
|
|
|
|||
|
|
@ -210,10 +210,12 @@ class _FullScreenFileViewerState extends State<FullScreenFileViewer> {
|
|||
iconSize: 30,
|
||||
padding: const EdgeInsets.all(0),
|
||||
onPressed: () {
|
||||
html.window.open(
|
||||
widget.arguments.link,
|
||||
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||
'download');
|
||||
if (MzanziInnovationHub.of(context)!.theme.getPlatform() == "Web") {
|
||||
html.window.open(
|
||||
widget.arguments.link,
|
||||
// '${AppEnviroment.baseFileUrl}/mih/$filePath',
|
||||
'download');
|
||||
} else {}
|
||||
},
|
||||
icon: Icon(
|
||||
Icons.download,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue