DevAtlas

Learn

  • Dashboard
  • Learning Paths
  • All Categories
  • Topics

Practice

  • Interview Questions
  • Flashcards
  • Quizzes
  • Study Plans

Personal

  • Bookmarks
  • Notes
  • Progress
  • PDF Library
  • Settings
  • About
  1. Interview Questions
  2. What is the difference between initState and didChangeDependencies, and when do you use each?
0%
ComparisonIntermediateFlutter

What is the difference between initState and didChangeDependencies, and when do you use each?

Follow-up questions

  • Give an example where didChangeDependencies runs more than once.
  • Why can’t you rely on context for inherited widgets inside initState?

Related topics

Flutter Widget LifecycleBuildContext in Flutter
#flutter#lifecycle#initstate#context