mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-22 17:02:58 +02:00
fix: topic content
The statement was not true, as technically, global variables are also able to be declared
This commit is contained in:
@@ -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.
|
||||
|
||||
|
Reference in New Issue
Block a user