Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

dart class and object

// Class Declaration 
class AClass {}

void main() {
  // Object creation
  var a = AClass();

  // Access Object property
  print(a.hashCode);
  print(a.runtimeType);
  
  // Access String Object method
  print("vel".toUpperCase());

  // Access int property
  print(2.isNegative);
  print(2.runtimeType);
  
}
Source by api.flutter.dev #
 
PREVIOUS NEXT
Tagged: #dart #class #object
ADD COMMENT
Topic
Name
5+5 =