# ValueListenableBuilder

First, we will declare a variable of type `ValueNotifier` which is a special type of class.

```dart
ValueNotifier<int> _counter = ValueNotifier<int>(0);
```

Now in the next step let’s see the widget code.

```dart
ValueListenableBuilder(
    valueListenable: _counter,
    builder: (context, value, child) {
       return Text('$value', style: Theme.of(context).textTheme.headline4,);
    },
)
```

To update the variable, you can do:

<pre class="language-dart"><code class="lang-dart"><strong>_varIndex.value++;
</strong></code></pre>
