Cheatography
                https://cheatography.com
            
        
        
    
                   
                            
    
                    view Dart vs C++ in advance
                    
                 
                    
        
        
            
    
        
                            
        
                
        
            
                                
            
                
                                                | parse()
                        
                                    
                        | 
void main() { 
   print(num.parse('12')); 
   print(num.parse('10.91')); 
}
 |  The parse() static function allows parsing a string containing numeric literal into a number. sign
                        
                                                                                    
                                                                                            | num.sign | Returns minus one, zero or plus one depending on the sign and numerical value of the number. |  Useful functions
                        
                                                                                    
                                                                                            | Number.abs() | Number.ceil() |  
                                                                                            | Number.compareTo(x) |  0 if the values are equal. 1 if the current number object is greater than the specified numeric value.-1 if the current number object is lesser than the specified numeric value. |  
                                                                                            | Number.floor() | Number.remainder(x) |  
                                                                                            | Number.round() | Number.toDouble() |  
                                                                                            | Number.toInt() | Number.toString() |  
                                                                                            | Number.truncate() | Returns an int without decimal points. |  |  | hashcode
                        
                                    
                        | void main() { 
   int n = 5000; 
   print(n.hashCode); 
}  
syntax : num.hashcode
 |  isNan
                        
                                                                                    
                                                                                            | num.isNan | True if the number is the double Not-a-Number value; otherwise, false. |  iseven
                        
                                                                                    
                                                                                            | num.iseven | Returns true if the number is an even number. |  |  | isnegative
                        
                                                                                    
                                                                                            | num.isNegative | This property returns a Boolean value true if the number is a negative number. |  isodd
                        
                                                                                    
                                                                                            | num.isodd | Returns true if the number is an odd number. |  | 
            
                            
            
            
        
        
        
        
        
            
    
        
          
Created By
https://www.nimakarimian.ir
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by nimakarimian