Skip to content

Expose Ticker.startTime so users know the start time and the absolute time #115901

@fzyzcjy

Description

@fzyzcjy

Related: #113828 - This PR is closed and is requested to submit an issue here.

I will submit PRs once there is an approach that is allowed :)

Use case

The https://github.com/fzyzcjy/flutter_smooth is a package that "achieve ~60 FPS, no matter how heavy the tree is to build/layout". In order to implement it, this change seems to be needed.

More specifically, when implementing the ballistic shifting animation of (Smooth)ListView, I need to synchronize the clock of real ListView and the SmoothShift. If it is not synchronized, for example, ListView may think it should shift 50px by ballistic animation at frame 10, while SmoothShift wrongly thinks it is 60px, thus causing weird jump feeling when users look at it.

Related code is around https://github.com/fzyzcjy/flutter_smooth/blob/f8bc23932c9cd75e787e17029b249c48bfdee044/packages/smooth/lib/src/drop_in/list_view/shift.dart#L352.

Proposal

As is shown in the PR, I originally proposed to allow users to know the (absolute) start time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.team-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions