Last active
May 31, 2020 06:53
-
-
Save jmewes/3cb5a843b371a0afa4b321f1b7e1025a to your computer and use it in GitHub Desktop.
Define interface for variables #dart
This file contains hidden or 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() { | |
| var obj = ConcreteClass("test"); | |
| print(obj.myVariable); | |
| } | |
| class ConcreteClass extends AbstractClass { | |
| String myVariable; | |
| ConcreteClass(String myVariable) { | |
| this.myVariable = myVariable; | |
| } | |
| } | |
| abstract class AbstractClass { | |
| String get myVariable; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment