Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

How to change widget state using setState from inside a Timer callback (如何从Timer回调内部使用setState更改小部件状态) #462

@nitdrive

Description

@nitdrive

I am working on building something similar to a digital clock, that needs to update the text of a widget periodically every 2 seconds, I tried to do this by calling SetState from inside the Timer callback but the widget does not update, what am I missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions