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 :: dart exit function 
Dart :: remove .0 flutter 
Dart :: flutter splash on tap 
Dart :: anonymous function in dart 
Dart :: how to get real time data flutter 
Dart :: how to store special characters in dart string 
Dart :: dart map values 
Dart :: flutter text padding 
Dart :: opendrawer without appbar 
Dart :: restrick platform orientation flutter 
Dart :: quebrar linha texto flutter 
Dart :: text widget not recognize the currency symbol flutter 
Dart :: flutter ignore keyboard 
Dart :: flutter gesturedetector space also clickable 
Dart :: seach flutter 
Dart :: showing ads every x seconds flutter 
Dart :: loob in dart 
Dart :: convert to string flutter 
Swift :: center text swiftui 
Swift :: convert image to base64 in swift ui 
Swift :: swift pop to specific view controller 
Swift :: remove divider list swiftui 
Swift :: swipe left to go back iphone swift 
Swift :: how to get rid of excess space in swift 
Swift :: generate random bool swift 
Swift :: rotate image animated swift 
Swift :: swift date difference in days 
Swift :: how to set the spacing of a collection view swift 
Swift :: hide scroll view indicators bar swiftui 
Swift :: concatenate string swift 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =