---
title: "Comment by Rahul Vyas on \"All I Know about BuildContext\" | Hashnode"
description: "I would like to know one thing that what is the best approach to use globalnavigator key?"
url: "https://hashnode.com/posts/all-i-know-about-buildcontext/676e6c2cf9d9d3e659945702/comment/677582f62dda6e1d2b8ecc0a"
---

[Discussion](https://hashnode.com/posts/all-i-know-about-buildcontext/676e6c2cf9d9d3e659945702)

Comment [All I Know about BuildContext](https://hashnode.com/posts/all-i-know-about-buildcontext/676e6c2cf9d9d3e659945702)

[Rahul Vyas](https://hashnode.com/@rahulvyas09)

[Jan 1, 2025](https://hashnode.com/posts/all-i-know-about-buildcontext/676e6c2cf9d9d3e659945702/comment/677582f62dda6e1d2b8ecc0a)

I would like to know one thing that what is the best approach to use globalnavigator key?

[Tsuyoshi Chujo](https://hashnode.com/@chooyan-eng)

[Jan 4, 2025](https://hashnode.com/posts/all-i-know-about-buildcontext/676e6c2cf9d9d3e659945702/comment/677582f62dda6e1d2b8ecc0a#reply-6778f86a304ffe075d664457)

Basically it depends, but if you only need a GlobalKey that can be accessed from anywhere, a simple global variable is enough with few drawbacks.

[Tsuyoshi Chujo](https://hashnode.com/@chooyan-eng)

[Jan 4, 2025](https://hashnode.com/posts/all-i-know-about-buildcontext/676e6c2cf9d9d3e659945702/comment/677582f62dda6e1d2b8ecc0a#reply-6778f8debb9592235d2c5088)

Kindly consider reading this article about GlobalKey as well if you need additional knowledge. [chooyan.hashnode.dev/all-i-know-about-globalkey](https://chooyan.hashnode.dev/all-i-know-about-globalkey)
