Documentation
¶
Overview ¶
Package widget updates the app's home-screen widget.
widget.Update(a, widget.Content{Title: "Inbox", Text: "3 unread"})
Android: the host's AppWidget (org.tango.host.TangoWidget), added to the manifest when tan.json "permissions" lists "widget". It shows a title and a text; tapping it opens the app. The content is stored and survives restarts and reboots, so the widget shows the last value even while the app is not running.
iOS widgets are WidgetKit extensions written in SwiftUI and are not built by tan yet (see docs/specs/mobile-extensions.md): Update returns ErrUnsupported there, as on desktop.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnsupported = platform.ErrUnsupported ErrNotConfigured = platform.ErrNotConfigured // the app does not declare the widget )
Functions ¶
Types ¶
type Content ¶
type Content = platform.WidgetContent