notification

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: ISC Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C

type C = layout.Context

type D

type D = layout.Dimensions

type SystemNotification

type SystemNotification struct {
	// contains filtered or unexported fields
}

func NewSystemNotification

func NewSystemNotification() (*SystemNotification, error)

func (*SystemNotification) Notify

func (s *SystemNotification) Notify(message string) error

type Toast

type Toast struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewToast

func NewToast(th *cryptomaterial.Theme) *Toast

NewToast returns an initialized instance of the toast UI component. To avoid poor user experience on the UI, this component should sparingly used.

func (*Toast) Layout

func (t *Toast) Layout(gtx layout.Context) layout.Dimensions

Layout uses the provided dimensions and constraints to construct a toast UI component.

func (*Toast) Notify

func (t *Toast) Notify(message string, isLongDelay ...bool)

Notify is called to display a message indicating a successful action. It updates the toast object with the toast message and duration. isLongDelay parameter is optional.

func (*Toast) NotifyError

func (t *Toast) NotifyError(message string, isLongDelay ...bool)

Notify is called to display a message indicating a failed action. It updates the toast object with the toast message and duration. isLongDelay parameter is optional.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL