Search
 
SCRIPT & CODE EXAMPLE
 

DART

@override in dart

abstract class InterfaceClass {
  String? foo;

  void testFunction();
}

class BaseClass extends InterfaceClass {
  @override
  void testFunction() {
    // TODO: implement testFunction
    foo = 'bar';
  }
}
Comment

@override dart

void main() {
  Point point1 = Point(1, 1);
  Point2 point2 = Point2(10, 10);

  print(point2);
  print("toString has been override");
  print(point1);
}

class Point {
  double x, y;
  Point(this.x, this.y);

  @override
  String toString() {
    return "$x : $y";
  }
}

class Point2 {
  double x, y;
  Point2(this.x, this.y);
}
Comment

PREVIOUS NEXT
Code Example
Dart :: flutter concat string list 
Dart :: widget capture in flutter 
Dart :: speedometer in flutter 
Dart :: comments in dart 
Dart :: flutter login pop to index 1 
Dart :: dart program name 
Dart :: ruby on rails db migrate 
Dart :: how to use $ input in dart as a string 
Dart :: flutter remove item from list 
Dart :: check if animation complete in flutter 
Dart :: multi-dimensional list in dart 
Dart :: flutter dollar sign interpolation 
Dart :: random element from list dart 
Dart :: flutter sliver app bar remove top padding 
Dart :: allow background service in flutter app 
Dart :: dart class with 
Dart :: factory in dart 
Swift :: swift text align center 
Swift :: swift stackview content inset 
Swift :: swift 5 btn change image 
Swift :: this love taylor swift 
Swift :: swift uiswitch change size 
Swift :: how to get the last element of an array in swift 
Swift :: how to download swift 
Swift :: swift button 
Swift :: and in swift 
Swift :: swift string concatenation 
Swift :: change font swiftui 
Swift :: transform string to url swift 
Swift :: remove key by index dictionary swift 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =