Skip to content

Instantly share code, notes, and snippets.

@RipplesCode
Created April 8, 2021 15:13
Show Gist options
  • Save RipplesCode/9c0ea7523fb60fd69817ab4824a5b541 to your computer and use it in GitHub Desktop.
Save RipplesCode/9c0ea7523fb60fd69817ab4824a5b541 to your computer and use it in GitHub Desktop.
Reactive State Manager Obx== User defined class
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