---
title: "Discussion on \"What is setState() in flutter and when to use it?\" | Hashnode"
description: "Discussion on \"What is setState() in flutter and when to use it?\". setState() is used to dynamically update UI in flutter apps. It is called inside the State class of a StatefulWidget. Element of a widget manages State."
url: "https://hashnode.com/posts/what-is-setstate-in-flutter-and-when-to-use-it-1/60d84f94de92ef110afdf15f"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What is setState() in flutter and when to use it?](https://blog.nikkigoel.com/what-is-setstate-in-flutter-and-when-to-use-it-1?utm_source=hashnode&utm_medium=feed)

setState() is used to dynamically update UI in flutter apps. It is called inside the State class of a StatefulWidget. Element of a widget manages State.

Jun 27, 2021 · 14 min read · blog.nikkigoel.com  
Updated Jun 4  
Read the article

-   [#flutter](https://hashnode.com/tag/flutter)
-   [#mobile-development](https://hashnode.com/tag/mobile-development)
-   [#flutter-examples](https://hashnode.com/tag/flutter-examples)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#tutorial](https://hashnode.com/tag/tutorial)

## Written by

[Nikki Goel](https://hashnode.com/@nicks101)

@nicks101 · India

  
[View profile](https://hashnode.com/@nicks101)

Software Engineer | Blogger | Flutter Developer

I build apps, internal tools, and sketch stuff on my iPad. Into side projects, and occasionally sharing thoughts here.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
