Created
January 31, 2020 22:23
-
-
Save savioserra/5553ac0e5bf1ceb63b1159101ebb50da 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
abstract class Test { | |
final String value; | |
Test(this.value); | |
} | |
abstract class Test2 { | |
final String value; | |
Test2(String i) : value = i; | |
} | |
class Store {} | |
class AppController = Test with Store; | |
class AppController2 = Test2 with Store; | |
void main() { | |
var test1 = AppController(inject()); // prints 'dynamic' | |
var test2 = AppController2(inject()); // prints 'String' | |
} | |
T inject<T>() { | |
print(T); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment