我这样做了,但它不起作用
type buttonWithID struct {
widget.ListItemID
}
func newButtonWithID(button widget.Button) *buttonWithID {
newButton := &buttonWithID{}
newButton.ExtendBaseWidget(newButton)
newButton.ListItemID = 0
return newButton
}
它返回此错误:
newButton.ExtendBaseWidget undefined (type *buttonWithID has no field or method ExtendBaseWidget)