From 22e814311e994dc8599d7fb7e89eae3f71ab1647 Mon Sep 17 00:00:00 2001 From: Michal Freriks Date: Sun, 22 Dec 2024 20:57:33 +0100 Subject: [PATCH] Update 101-variables.md The statement was not true, as technically, global variables are also able to be declared --- .../roadmaps/flutter/content/100-dart-basics/101-variables.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/data/roadmaps/flutter/content/100-dart-basics/101-variables.md b/src/data/roadmaps/flutter/content/100-dart-basics/101-variables.md index 47806b934..f321b5867 100644 --- a/src/data/roadmaps/flutter/content/100-dart-basics/101-variables.md +++ b/src/data/roadmaps/flutter/content/100-dart-basics/101-variables.md @@ -4,6 +4,7 @@ In Flutter, variables are used to store values. There are two types of variables - local variables: These are declared within a function and are only accessible within that function - Instance variables: They are declared within a class and are accessible throughout the entire class. +- Global Variables: While not always recommended, Dart does allow variables to be declared globally (outside any class or function). These variables are accessible throughout the file in which they are declared and can also be accessed across libraries if properly imported. Variables in Flutter can store values of different data types, such as numbers, strings, booleans, and more.