Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
437 views
in Technique[技术] by (71.8m points)

Not getting an error when opening a file. How to show a toast when there is no proper app for viewing the content using OpenFile.open in flutter?

OpenFile.open is not showing error. Am trying to open an excel file, am not having a proper app for viewing that excel sheet. How can I show a toast message for this case.

OpenFile.open(file.path,
            type: "application/vnd.ms-excel",
            uti: "com.microsoft.excel.xls")
        .catchError((e, stackTrace) {
      print('hey error');
      print(e);
      return 
        DialogsService().showServerErrorMessageToast(
          "You may not have a proper app for viewing this content.");
    });

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...