Last active
          August 11, 2022 08:10 
        
      - 
      
- 
        Save stillie/c655e00920d2078654a9277287e3e450 to your computer and use it in GitHub Desktop. 
    Null Safety Question
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | void main() { | |
| String? a; | |
| String b; | |
| a = "a"; | |
| b = "b"; | |
| print(a.test2); | |
| a = null; | |
| print(a.test2); | |
| print(b.test2); | |
| } | |
| extension Test on String?{ | |
| String get test2 => "$this test"; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment