Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Flutter has a strict type system, which means that variables must have a specific non-null data type. If a variable is declared as being of a non-null type (such as String), it cannot be assigned a null value. This is done to prevent null pointer exceptions, which are a common cause of bugs in other programming languages. Therefore, Flutter throws an error when trying to access null data because it ensures that the data is not null before accessing it.