Skip to content

[docs] Improve ChangeNotifier and AnimatedBuilder documentation #98624

@albertodev01

Description

@albertodev01

Use case

Right now, there isn't enough (or probably not at all) documentation describing that a ChangeNotifier can be plugged into an AnimatedBuilder widget to listen for rebuilds. The name is misleading but it's not going to change so, at least, we should write more documentation to make the users aware of the use-case

Proposal

Enhance the documentation of both classes:

  • For ChangeNotifier, explicitly write that it can be listened in an AnimatedBuilder widget
  • For AnimatedBuilder, add a short Flutter example showing how an InheritedWidget exposing a ChangeNotifier can listen to changes to rebuild only specific parts of the UI (rather than the entire subtree)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listd: api docsIssues with https://api.flutter.dev/frameworkflutter/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