In Java, I might have an interface IsSilly
and one or more concrete types that implement it:
public interfa
In Dart, every class defines an implicit interface. You can use an abstract class to define an interface that cannot be instantiated:
abstract class IsSilly {
void makePeopleLaugh();
}
class Clown implements IsSilly {
void makePeopleLaugh() {
// Here is where the magic happens
}
}
class Comedian implements IsSilly {
void makePeopleLaugh() {
// Here is where the magic happens
}
}