Created
April 8, 2021 15:13
-
-
Save RipplesCode/9c0ea7523fb60fd69817ab4824a5b541 to your computer and use it in GitHub Desktop.
Reactive State Manager Obx== User defined class
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:get/get.dart'; | |
class Student { | |
/* Classes can be made observable by making individuals variables Rx | |
or by making the entire class observable. | |
*/ | |
// Individuals variables Rx | |
var name = "Tom".obs; | |
var age = 25.obs; | |
// To make the entire class observable | |
// var name; | |
// var age; | |
// Student({this.name, this.age}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment