Skip to content

Instantly share code, notes, and snippets.

@zolotyh
Created August 3, 2019 10:07
Show Gist options
  • Save zolotyh/4aae5704147036f38beafcf0bf4905b3 to your computer and use it in GitHub Desktop.
Save zolotyh/4aae5704147036f38beafcf0bf4905b3 to your computer and use it in GitHub Desktop.
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