Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Was the "interface" keyword removed from Dart?

Just to be sure, has Dart removed explicitly defining an interface now in favor of implicitly defining it via abstract?

I see it mentioned in Dart and Interface Segregation Principle, however I'm also finding a lot of content still referencing the explicit definition, such as When to use interfaces in Dart?

like image 468
Will Squire Avatar asked Feb 18 '15 22:02

Will Squire


1 Answers

Yes. The interface keyword was removed from Dart. Instead all classes have implicit interfaces. So if you want to define an interface you can use an abstract class instead.

See this blog post from 2012 about eliminating the interface keyword.

like image 80
Greg Lowe Avatar answered Sep 20 '22 18:09

Greg Lowe