Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

dart nullable variable

// type? variable; 		variable can be null.
int a?; 		// a can be null
e1?.[e2] 		// null if e1 is null; otherwise it’s e1[e2]
/* This requires the 'non-nullable' language feature to be enabled.  
In pubspec.yaml, set the minimum SDK constraint to 2.12.0 or higher
and running 'pub get'. */
environment:
  sdk: ">=2.12.0 <3.0.0"
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #dart #nullable #variable
ADD COMMENT
Topic
Name
9+7 =