Created
August 3, 2019 10:07
-
-
Save zolotyh/4aae5704147036f38beafcf0bf4905b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void main(){ | |
final bar2= Bar2(); | |
assert(bar2.bar1 =='test1'); | |
assert(bar2.bar1 =='test2'); | |
final bar = Bar('test1'); | |
assert(bar.bar1 == 'test1'); | |
assert(bar.bar2 == 'test2'); | |
} | |
abstract class Foo { | |
String get bar2 => 'test1'; | |
final String foo2; | |
Foo(this.foo2); | |
} | |
class Bar extends Foo { | |
final String bar1; | |
Bar(this.bar1) : super('test2'); | |
} | |
class Foo1 { | |
String get bar1 => 'test1'; | |
} | |
mixin Foo2 { | |
String get bar2 => 'test2'; | |
} | |
class Bar2 with Foo1, Foo2 { | |
} | |
m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment