meta.go 502 B

12345678910111213141516171819202122232425262728
  1. package app
  2. import (
  3. "fyne.io/fyne/v2"
  4. )
  5. var meta = fyne.AppMetadata{
  6. ID: "",
  7. Name: "",
  8. Version: "0.0.1",
  9. Build: 1,
  10. Release: false,
  11. Custom: map[string]string{},
  12. }
  13. // SetMetadata overrides the packaged application metadata.
  14. // This data can be used in many places like notifications and about screens.
  15. func SetMetadata(m fyne.AppMetadata) {
  16. meta = m
  17. if meta.Custom == nil {
  18. meta.Custom = map[string]string{}
  19. }
  20. }
  21. func (a *fyneApp) Metadata() fyne.AppMetadata {
  22. return meta
  23. }