Go-flutter: File dialogs

Created on 23 Jan 2019  路  6Comments  路  Source: go-flutter-desktop/go-flutter

https://github.com/gen2brain/dlgs

Also has other dialogues and notifications and beeps.

Needed for any desktop app :)

Works on all desktops with only golang

plugin

All 6 comments

I suppose this could be a neat plugin. It's not required for this library to function. The plugin could be a very nice cross-platform example for plugins with this library.

The use case i have in mind was for when a user needs to save a file or open a file.
For example:

  • when you export a report
  • want to add an image to an app.

Here is what i have found. It would be good to provide these basics as a plugin for go-flutter-desktop.

dialogs

Flutter-go needs to interact with the Desktop os for:

  • Printer dialog, where we send it a PDF to print
  • Select File (s) to upload
  • Select where to download a file
  • Show Notifications
  • Other.

Libs Research:

Inputs

https://github.com/gen2brain/dlgs/
dlgs is a cross-platform library for displaying dialogs and input boxes.

  • WORKS :)
  • All OS's
  • No CGO :)
  • Select from a list. Not needed as Flutter does that.
  • ask question with true false. Again not needed as flutter does that.
  • Enter Password. Maybe needed

Notify

https://github.com/gen2brain/beeep
beeep provides a cross-platform library for sending desktop notifications, alerts and beeps.

  • WORKS :)
  • no CGO :)
  • PLay sound. Maybe Needed
  • Show Notifications. Needed.
  • Show Alerts. Needed.

    • For icons to work its needs to be bundled as an App, so it can use the App icon.

Screenshot.

https://github.com/kbinani/screenshot

  • WORKS :)
  • All OS's
  • Uses CGO, which is not so good :( . Maybe look around for other libs.

File

https://github.com/sqweek/dialog

  • WORKS :)
  • no cgo. :)
  • All Os's :)
  • Select Directory to Write to.
  • Select File to read form
  • Select File to write to.

Clipboard

https://github.com/atotto/clipboard

  • no cgo :)
  • All Os's :)
  • have not tried yet.

console

Show console, can be useful.

keyring

https://github.com/zalando/go-keyring

Show Printer dialog.

https://github.com/alexbrainman/printer

  • no dialog, just sends text file to the print spooler on Darwin

https://github.com/google/cloud-print-connector

https://github.com/Limard/winprint

  • ?

Scanning

Scan from the program

  • Bring up the scannng dialog

Webview

  • Somtimes you need a Webview for whatever reason as part of your desktop app.
  • https://github.com/zserge/webview
  • Works very well
  • On Windows its not using Edge, but old MSHTML, so no Javascript.

systray

  • For times when you need a systray running.
  • YOu can run a Flutter GUI in the systray. For example the TunnelBear systray is an excellent example.
    https://github.com/getlantern/systray/
  • WORKS :)
  • All Os's
  • No CGO :)

Thanks for @drdgvhbh 's amazing work.
I have modified @drdgvhbh 's code and provide an example since I really need to use this plugin in my project.
I did an example PR, perhaps you want to check it.
https://github.com/go-flutter-desktop/examples/pull/2

test result https://github.com/chunhunghan/examples/blob/master/file_picker/file_picker_example.png

Somewhat related. I've added initial work for a desktop compatibility with Flutter's image_picker.

It can be found here: https://github.com/go-flutter-desktop/plugins/tree/master/image_picker

Closing duplicate of #205.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ohsory1324 picture ohsory1324  路  4Comments

Tokenyet picture Tokenyet  路  7Comments

GeertJohan picture GeertJohan  路  4Comments

MathiasDeWeerdt picture MathiasDeWeerdt  路  4Comments

inaxium picture inaxium  路  4Comments