2
votes

I am one of contributors of go-flutter-desktop plugin and would like to share url_launcher plugin just released

How does this project "go-flutter-desktop" compare to the "official" flutter desktop? please refer https://github.com/go-flutter-desktop/go-flutter/issues/191#issuecomment-511384007

you can use url_launcher plugin to open web, file , Lotus Notes document, etc..

1
Voting to close this as off-topic because this is not a question. Stack Overflow isn't intended for announcing the availability of a project or library. - smorgan
actually, this is another solution of my previous question stackoverflow.com/questions/56143104/…. thanks for your opions - chunhunghan
previous question was solved with Dart and then I learn Go Lang. so in this question I solved with Go Lang - chunhunghan
If you have a new answer to an existing question, it should be posted as a new answer on that question rather than as a new "question" that isn't actually asking a question. And FWIW, I'm not describing my opinion, but the structure of Stack Overflow. - smorgan

1 Answers

3
votes

For Windows 10,
you can open Excel or Lotus Notes document with the following code snippet

  ...
  RaisedButton(
    onPressed: () => setState(() {
      _launched = _makeCall('tel:$_urlStr');
    }),
    child: const Text('Make phone call'),
  ),
  RaisedButton(
    onPressed: () => setState(() {
      _launched = _makeCall('sms:$_urlStr');
    }),
    child: const Text('Make sms call'),
  ),
  RaisedButton(
    onPressed: () => setState(() {
      _launched = _makeCall('notes://$_urlStr');
    }),
    child: const Text('Make notes call'),
  ),
  RaisedButton(
    onPressed: () => setState(() {
      _launched = _makeCall('file:$_urlStr');
    }),
    child: const Text('Make excel call'),
  ),

 ...

 Future<void> _makeCall(String url) async {
    if (await canLaunch(url)) {
      await launch(url);
    } else {
      throw 'Could not launch $url';
    }
}

demo on Windows 10

enter image description here