Created
November 19, 2019 07:31
-
-
Save JOSHIMOH/df93ad0afefd974fa09a47d5f78e9a3b to your computer and use it in GitHub Desktop.
computed observable
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
| import 'package:mobx/mobx.dart'; | |
| part 'contact.g.dart'; | |
| class Contact = ContactBase with _$Contact; | |
| abstract class ContactBase with Store { | |
| @observable | |
| String firstName; | |
| @observable | |
| String lastName; | |
| @computed | |
| String get fullName => '$firstName, $lastName'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment