Search
 
SCRIPT & CODE EXAMPLE
 

DART

with keyword in dart

mixin Human {
  String name;
  int age;

  void about();
}

class Doctor with Human {
  String specialization;
  Doctor(String doctorName, int doctorAge, String specialization) {
    name = doctorName;
    age = doctorAge;
    this.specialization = specialization;
  }

  void about() {
    print('$name is $age years old. He is $specialization specialist.');
  }
}


void main() {
  Doctor doctor = Doctor("Harish Chandra", 54, 'child');
  print(doctor.name);
  print(doctor.age);
  doctor.about();
}
Comment

PREVIOUS NEXT
Code Example
Dart :: widget capture in flutter 
Dart :: dart set final variable in constructor 
Dart :: dart static method 
Dart :: use a class variable in other class in flutter 
Dart :: var keys = snap.value.keys; 
Dart :: search functionality dart 
Dart :: flutter how to get height and width of screen 
Dart :: naming convention class names flutter 
Dart :: onpressed flutter calculate 
Dart :: flutter signing the app 
Dart :: geturedetector flutter 
Dart :: how to check if val only spaces in dart 
Dart :: how to change primary color in flutter 
Dart :: flutter fix problem keyboard resize screen 
Dart :: Cannot remove from an unmodifiable list dart 
Dart :: accumulator code example in flutter 
Dart :: how to show date only in flutter 
Swift :: swift ui int to binary 
Swift :: swift uitableview cell spacing 
Swift :: swift for loop index 
Swift :: gap between table header uitableview 
Swift :: swipe left to go back iphone swift 
Swift :: UICollectionView current visible cell index 
Swift :: swiftui text field 
Swift :: append new element to dictionary in swift 
Swift :: an in swift 
Swift :: define struct swift 
Swift :: swift array contains 
Swift :: swift pop view controller 
Swift :: if else if and else statments in swift language 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =