$tick static method

PeriodicBindableProperty<int> $tick({
  1. required Duration duration,
  2. int initial = 0,
  3. int initialTick = 0,
  4. bool autostart = false,
  5. int? repeat,
  6. void onTick(
    1. int tick
    )?,
  7. void statusChanged(
    1. PeriodicBindableProperty<int>
    )?,
  8. PropertyValueChanged<int>? valueChanged,
})

创建具有周期性的绑定属性

duration 指定周期间隔时长

initialTick 指定初始 tick 值,默认为 0

autostart 是否自动开始,默认为 false

repeat 指定重复次数,其值为 null0 时为不限次数,默认为 null

onTick 指定每次 tick 的回调方法

statusChanged 指定属性状态变更后的回调方法

valueChanged 指定属性值变更后的回调方法

Implementation

static PeriodicBindableProperty<int> $tick(
        {required Duration duration,
        int initial = 0,
        int initialTick = 0,
        bool autostart = false,
        int? repeat,
        void Function(int tick)? onTick,
        void Function(PeriodicBindableProperty<int>)? statusChanged,
        PropertyValueChanged<int>? valueChanged}) =>
    PeriodicBindableProperty(
        duration: duration,
        tickToValue: identity,
        initial: initial,
        initialTick: initialTick,
        autostart: autostart,
        repeat: repeat,
        onTick: onTick,
        statusChanged: statusChanged,
        valueChanged: valueChanged);