In Java, I might have an interface IsSilly
and one or more concrete types that implement it:
public interface IsSilly {
public void makePeopleLaugh();
}
public class Clown implements IsSilly {
@Override
public void makePeopleLaugh() {
// Here is where the magic happens
}
}
public class Comedian implements IsSilly {
@Override
public void makePeopleLaugh() {
// Here is where the magic happens
}
}
What's the equivalent to this code in Dart?
After perusing the official docs on classes, it doesn't seem that Dart has a native interface
type. So, how does the average Dartisan accomplish the interface segregation principle?