Fyne API "fyne.Resource"
fyne.Resource
import "fyne.io/fyne/v2"
Usage
type Resource
type Resource interface {
Name() string
Content() []byte
}
Resource represents a single binary resource, such as an image or font. A resource has an identifying name and byte array content. The serialised path of a resource can be obtained which may result in a blocking filesystem write operation.
func LoadResourceFromPath
func LoadResourceFromPath(path string) (Resource, error)
LoadResourceFromPath creates a new StaticResource in memory using the contents of the specified file.
func LoadResourceFromURLString
func LoadResourceFromURLString(urlStr string) (Resource, error)
LoadResourceFromURLString creates a new StaticResource in memory using the body of the specified URL.