Picker

A widget with a drop-down list of items to choose from.

Import this type with “”

Type: Color

The color of the border of the Picker. On iOS this is a rectangular border around the Picker, on Android it is a single line below the Picker.

fillColor

iOS

Type: Color

The color of the background of the Picker - applies only to iOS.

itemCount

Type: number

The number of items to display.

itemText

Type: (index: number) => string

A function that returns the string to display for a given index.

Type: number

textColor

Type: Color

The color of the text.

borderColorChanged

Fired when the borderColor property has changed.

Event Parameters

  • value: Color The new value of .

fillColorChanged

Fired when the property has changed.

Event Parameters

  • target: this The widget the event was fired on.

  • value: The new value of fillColor.

Fired when the property has changed.

Event Parameters

  • target: this The widget the event was fired on.

itemTextChanged

Fired when the itemText property has changed.

Event Parameters

  • value: (index: number) => string The new value of itemText.

select

Fired when an item was selected by the user.

Event Parameters

  • target: this The widget the event was fired on.

  • index: number Contains the index of the selected item.

selectionIndexChanged

Fired when the selectionIndex property has changed.

Event Parameters

Fired when the property has changed.

Event Parameters

  • target: this The widget the event was fired on.

  • value: The new value of textColor.

原文: