Did you ever wonder how to get the context easily like GetX and use the properties like size, height, width, MediaQuery, theme and get platformBrightness?
Here is the complete guide for. Actually it's pretty easy. There's a feature in Flutter called extension methods.
We will start by writting extension and then a method name and then using on and then actual thing you want to extend.
Here our method name is ContextExt and extending on BuildContext. Then within the method we have getters for Dark mode and Light Mode.
And from our UI or presentation layer, we are calling the context and checking on the getters.