Flutter - Value Notifier Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report If you are a flutter developer then you must have heard about the state management. You have knowledge of that. If you are new to this topic then we will learn a little bit more about it. You can refer to Flutter – State Management. Do you know other than setState there is more state management you can use to store change the values you have stored in that state management? The name of the widget is ValueListenableBuilder. It will take two variable 1. valueListenable It will take a type of ValueNotifier of any data type which you want to use in your complete app. 2. builder It will be like a function that contains 3 variables with sequence (BuildContext context, value, Widget? child), and this function will take 1 widget which will return by the builder function. In this, you have to pass the materialapp widget. Now let's start Step By Step Implementation Step 1: Create a New Project in Android Studio To set up Flutter Development on Android Studio please refer to Android Studio Setup for Flutter Development, and then create a new project in Android Studio please refer to Creating a Simple Application in Flutter. Step 2: Create 1 variable below the main function of the value notifier type Note: Must Give the name without an underscore. Dart ValueNotifier<String> myValue = ValueNotifier(""); Step 3: Add value ValueListenableBuilder in the MyApp Function (Widget class you are passing in runApp function) like this Dart class MyApp extends StatelessWidget { const MyApp({super.key}); // This widget is the root of your application. @override Widget build(BuildContext context) { return ValueListenableBuilder( // Value define in previous steps valueListenable: myValue, builder: (BuildContext context, value, Widget? child) { return MaterialApp( title: 'Value Notifier', theme: ThemeData( primarySwatch: Colors.green, ), home: const MyHomePage(), ); }, ); } } Step 4: Now you can access the value of the variable myValue all over the app We will use the Center of the screen to show the value. Dart body: Center(child: Text(myValue.value,style: TextStyle( fontSize: 24, color:Colors.green,fontWeight:FontWeight.bold),),), Step 5: Now we will learn about how to update the value of myValue Dart // Here we have done setstate because we // have to update value locally also to show it myValue.value="GeeksForGeeks is Best"; setState(() { }); Now you have learned inbuilt state management. Output: 1. Default value we have added in step 2. 2. After updating the value Output Video: Comment More infoAdvertise with us Next Article Flutter - Value Notifier flutterwings Follow Improve Article Tags : Dart Flutter Similar Reads Flutter Tutorial This Flutter Tutorial is specifically designed for beginners and experienced professionals. It covers both the basics and advanced concepts of the Flutter framework.Flutter is Googleâs mobile SDK that builds native Android and iOS apps from a single codebase. It was developed in December 2017. When 7 min read Flutter - initState() There are two types of widgets provided in Flutter. The Stateless WidgetThe Stateful Widget As the name suggests Stateful Widgets are made up of some 'States'. The initState() is a method that is called when an object for your stateful widget is created and inserted inside the widget tree. It is bas 4 min read Retrieve the Value of the TextField in Flutter The text field is widely used in Android Applications for taking user input, using TextEditingController we can retrieve the data from the text field. A sample video gives you an idea of what we are going to do in this article. Step By Step ImplementationStep 1: Create a New Project in Android Studi 2 min read NotificationListener Widget in Flutter In Flutter, every Scrollable sends Notifications that contain information about the current scroll state. So to catch these notifications we use NotificationListener Widget. NotificationListener Widget will listen for Notifications bubbling up the tree. In this, article we will learn about Notificat 4 min read Flutter - Verified Tick In many Android applications, we need to make the user account verified. Showing the verified icon in the flutter application is pretty simple. We can use the visibility widget to show and hide the icon. A sample video is given below to get an idea about what we are going to do in this article. How 3 min read Flutter - Stepper Widget In this article, we will learn about the Stepper widget in Flutter. A stepper widget displays progress through a sequence of steps. A stepper is generally used in filling out forms online.For example, remember filling out an online form for applying to any university or passport, or driving license. 6 min read Jetpack for flutter Flutter Jetpack is a Collection of Abstract Class, useful to handle the state of a flutter application with low boiler code unlike BLOC, Provider, River Pod State management Patterns. Let's check an example implementing Flutter Jetpack.Key FeaturesLiveData : It works as a State holder and Change not 4 min read Flutter - State Management Provider In this article, we are going to learn how state management is achieved in Flutter using providers. But before that, we need to know what a state is. As we know that everything in Flutter is a widget, and there are mainly two kinds of widgets: Stateless Widgets and Stateful Widgets. Stateless widget 8 min read Motion Toast Widget in Flutter A Motion Toast widget in Flutter is a type of toast message that animates its appearance on the screen. It can be used to provide feedback or notifications to the user in a subtle, yet attention-grabbing way. One way to implement a Motion Toast in Flutter is to use the AnimatedContainer widget. You 3 min read Form Validation in Flutter Form Validation is an important part of every application. In the flutter application, there are many ways to validate form such as using a TextEditingController. But handling text controller for every Input can be messy in big applications. Hence, Form provides us a convenient way to validate user 3 min read Like