$periodic<TValue> static method
PeriodicBindableProperty<TValue>
$periodic<TValue>({
- required Duration duration,
- required TValue tickToValue(
- int tick
- required TValue initial,
- int initialTick = 0,
- bool autostart = false,
- int? repeat,
- void onTick(
- int tick
- void statusChanged(
- PeriodicBindableProperty<
TValue>
- PeriodicBindableProperty<
- PropertyValueChanged<
TValue> ? valueChanged,
创建具有周期性的绑定属性
duration
指定周期间隔时长
tickToValue
指定将 tick
转换为值的方法
initial
指定初始值
initialTick
指定初始 tick
值,默认为 0
autostart
是否自动开始,默认为 false
repeat
指定重复次数,其值为 null
或 0
时为不限次数,默认为 null
onTick
指定每次 tick
的回调方法
statusChanged
指定属性状态变更后的回调方法
valueChanged
指定属性值变更后的回调方法
Implementation
static PeriodicBindableProperty<TValue> $periodic<TValue>(
{required Duration duration,
required TValue Function(int tick) tickToValue,
required TValue initial,
int initialTick = 0,
bool autostart = false,
int? repeat,
void Function(int tick)? onTick,
void Function(PeriodicBindableProperty<TValue>)? statusChanged,
PropertyValueChanged<TValue>? valueChanged}) =>
PeriodicBindableProperty(
duration: duration,
tickToValue: tickToValue,
initial: initial,
initialTick: initialTick,
autostart: autostart,
repeat: repeat,
onTick: onTick,
statusChanged: statusChanged,
valueChanged: valueChanged);